diff --git a/src/main/java/com/avaje/ebean/meta/MetaAutoFetchStatistic.java b/src/main/java/com/avaje/ebean/meta/MetaAutoFetchStatistic.java deleted file mode 100644 index 1c55e5c48..000000000 --- a/src/main/java/com/avaje/ebean/meta/MetaAutoFetchStatistic.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.avaje.ebean.meta; - -import java.io.Serializable; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Transient; - -import com.avaje.ebean.bean.ObjectGraphOrigin; - -/** - * Statistics collected by AutoFetch profiling. - */ -@Entity -public class MetaAutoFetchStatistic implements Serializable { - - private static final long serialVersionUID = -6640406753257176803L; - - @Id - private String id; - - private ObjectGraphOrigin origin; - - private String beanType; - - private int counter; - - @Transient - private List queryStats; - - @Transient - private List nodeUsageStats; - - public MetaAutoFetchStatistic() { - } - - public MetaAutoFetchStatistic(ObjectGraphOrigin origin, int counter, List queryStats, - List nodeUsageStats) { - - this.origin = origin; - this.beanType = origin == null ? null : origin.getBeanType(); - this.id = origin == null ? null : origin.getKey(); - this.counter = counter; - this.queryStats = queryStats; - this.nodeUsageStats = nodeUsageStats; - } - - /** - * This is the query point key. - */ - public String getId() { - return id; - } - - /** - * Return the bean type. - */ - public String getBeanType() { - return beanType; - } - - /** - * Return the query point. - */ - public ObjectGraphOrigin getOrigin() { - return origin; - } - - /** - * Return the number of profiled queries the statistics is based on. - */ - public int getCounter() { - return counter; - } - - /** - * Return the query execution statistics. - */ - public List getQueryStats() { - return queryStats; - } - - /** - * Return the node usage statistics. - */ - public List getNodeUsageStats() { - return nodeUsageStats; - } - - /** - * FIXME: This will likely be deprecated in favour of a separate object graph - * cost. - */ - public static class QueryStats implements Serializable { - - private static final long serialVersionUID = -5517935732867671387L; - - private final String path; - - private final long exeCount; - - private final long totalBeanLoaded; - - private final long totalMicros; - - public QueryStats(String path, long exeCount, long totalBeanLoaded, long totalMicros) { - this.path = path; - this.exeCount = exeCount; - this.totalBeanLoaded = totalBeanLoaded; - this.totalMicros = totalMicros; - } - - /** - * Return the path. This is empty string for the origin query and otherwise - * the path for the associated lazy loading queries. - */ - public String getPath() { - return path; - } - - /** - * The number of queries executed. - */ - public long getExeCount() { - return exeCount; - } - - /** - * The total number of beans loaded by the query. - */ - public long getTotalBeanLoaded() { - return totalBeanLoaded; - } - - /** - * The total time in microseconds of the queries. - */ - public long getTotalMicros() { - return totalMicros; - } - - public String toString() { - long avgMicros = exeCount == 0 ? 0 : totalMicros / exeCount; - - return "queryExe path[" + path + "] count[" + exeCount + "] totalBeansLoaded[" - + totalBeanLoaded + "] avgMicros[" + avgMicros + "] totalMicros[" + totalMicros - + "]"; - } - } - - /** - * Collects usages statistics for a given node in the object graph. - */ - public static class NodeUsageStats implements Serializable { - - private static final long serialVersionUID = 1786787832374844739L; - - private final String path; - - private final int profileCount; - - private final int profileUsedCount; - - private final String[] usedProperties; - - public NodeUsageStats(String path, int profileCount, int profileUsedCount, - String[] usedProperties) { - this.path = path == null ? "" : path; - this.profileCount = profileCount; - this.profileUsedCount = profileUsedCount; - this.usedProperties = usedProperties; - } - - /** - * Return the path. This is empty string for the origin and otherwise the - * path for the associated nodes. - */ - public String getPath() { - return path; - } - - /** - * The number of profiled beans for this node. - */ - public int getProfileCount() { - return profileCount; - } - - /** - * The number of profiled beans that where actually used for this node. - *

- * The difference between profiled and used could show uneven traversal of - * the object graph. UI paging through results means the traversal for the - * first x beans can be much higher than the last x beans. - *

- */ - public int getProfileUsedCount() { - return profileUsedCount; - } - - /** - * The properties used at this node. - */ - public String[] getUsedProperties() { - return usedProperties; - } - - /** - * Return the properties as a Set rather than an Array. - */ - public Set getUsedPropertiesSet() { - LinkedHashSet s = new LinkedHashSet(); - for (int i = 0; i < usedProperties.length; i++) { - s.add(usedProperties[i]); - } - return s; - } - - public String toString() { - return "path[" + path + "] profileCount[" + profileCount + "] used[" + profileUsedCount - + "] props" + Arrays.toString(usedProperties); - } - } -} diff --git a/src/main/java/com/avaje/ebean/meta/MetaAutoFetchTunedQueryInfo.java b/src/main/java/com/avaje/ebean/meta/MetaAutoFetchTunedQueryInfo.java deleted file mode 100644 index 9549e2a03..000000000 --- a/src/main/java/com/avaje/ebean/meta/MetaAutoFetchTunedQueryInfo.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.avaje.ebean.meta; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; - -import com.avaje.ebean.bean.ObjectGraphOrigin; - -/** - * "Tuned fetch" information used by AutoFetch. - *

- * Note that the queryPoint is effectively the Id field for this bean. - *

- *

- * The queryPoint identifies both the query and call stack. - *

- */ -@Entity -public class MetaAutoFetchTunedQueryInfo implements Serializable { - - private static final long serialVersionUID = 3119991928889170215L; - - @Id - private String id; - - private String beanType; - - /** - * The profile query point (call stack and query). - */ - private ObjectGraphOrigin origin; - - /** - * The tuned query details with joins and properties. - */ - private String tunedDetail; - - /** - * The number of times profiling has been collected for this query point. - */ - private int profileCount; - - /** - * The number of queries tuned by this info. - */ - private int tunedCount; - - private long lastTuneTime; - - public MetaAutoFetchTunedQueryInfo() { - - } - - public MetaAutoFetchTunedQueryInfo(final ObjectGraphOrigin origin, String tunedDetail, - int profileCount, int tunedCount, long lastTuneTime) { - - this.origin = origin; - this.beanType = origin == null ? null : origin.getBeanType(); - this.id = origin == null ? null : origin.getKey(); - this.tunedDetail = tunedDetail; - this.profileCount = profileCount; - this.tunedCount = tunedCount; - this.lastTuneTime = lastTuneTime; - } - - /** - * Return the query point key. - */ - public String getId() { - return id; - } - - /** - * Return the type of bean this is tuned for. - */ - public String getBeanType() { - return beanType; - } - - /** - * Return the query point. - */ - public ObjectGraphOrigin getOrigin() { - return origin; - } - - /** - * The tuned query detail in string form. - */ - public String getTunedDetail() { - return tunedDetail; - } - - /** - * The number of profiled queries the tuned query is based on. - */ - public int getProfileCount() { - return profileCount; - } - - /** - * Return the number of queries tuned. - */ - public int getTunedCount() { - return tunedCount; - } - - /** - * Return the time of the last tune (that changed the query). - */ - public long getLastTuneTime() { - return lastTuneTime; - } - - public String toString() { - return "origin[" + origin + "] query[" + tunedDetail + "] profileCount[" + profileCount + "]"; - } -} diff --git a/src/main/java/com/avaje/ebeaninternal/server/autofetch/Statistics.java b/src/main/java/com/avaje/ebeaninternal/server/autofetch/Statistics.java index 95b8add62..14ad6e9f7 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/autofetch/Statistics.java +++ b/src/main/java/com/avaje/ebeaninternal/server/autofetch/Statistics.java @@ -1,19 +1,14 @@ package com.avaje.ebeaninternal.server.autofetch; import java.io.Serializable; -import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import com.avaje.ebean.bean.NodeUsageCollector; import com.avaje.ebean.bean.ObjectGraphNode; import com.avaje.ebean.bean.ObjectGraphOrigin; -import com.avaje.ebean.meta.MetaAutoFetchStatistic; -import com.avaje.ebean.meta.MetaAutoFetchStatistic.NodeUsageStats; -import com.avaje.ebean.meta.MetaAutoFetchStatistic.QueryStats; import com.avaje.ebean.text.PathProperties; import com.avaje.ebean.text.PathProperties.Props; import com.avaje.ebeaninternal.server.deploy.BeanDescriptor; @@ -53,30 +48,6 @@ public class Statistics implements Serializable { } } - public MetaAutoFetchStatistic createPublicMeta() { - - synchronized (monitor) { - - StatisticsQuery[] sourceQueryStats = queryStatsMap.values().toArray(new StatisticsQuery[queryStatsMap.size()]); - List destQueryStats = new ArrayList(sourceQueryStats.length); - - // copy the query statistics - for (int i = 0; i < sourceQueryStats.length; i++) { - destQueryStats.add(sourceQueryStats[i].createPublicMeta()); - } - - StatisticsNodeUsage[] sourceNodeUsage = nodeUsageMap.values().toArray(new StatisticsNodeUsage[nodeUsageMap.size()]); - List destNodeUsage = new ArrayList(sourceNodeUsage.length); - - // copy the node usage statistics - for (int i = 0; i < sourceNodeUsage.length; i++) { - destNodeUsage.add(sourceNodeUsage[i].createPublicMeta()); - } - - return new MetaAutoFetchStatistic(origin, counter, destQueryStats, destNodeUsage); - } - } - /** * Return the number of times the root query has executed. *

diff --git a/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsNodeUsage.java b/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsNodeUsage.java index c806f4138..105b765d2 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsNodeUsage.java +++ b/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsNodeUsage.java @@ -5,16 +5,16 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.avaje.ebean.bean.NodeUsageCollector; -import com.avaje.ebean.meta.MetaAutoFetchStatistic.NodeUsageStats; import com.avaje.ebean.text.PathProperties; import com.avaje.ebeaninternal.server.deploy.BeanDescriptor; import com.avaje.ebeaninternal.server.deploy.BeanProperty; import com.avaje.ebeaninternal.server.deploy.BeanPropertyAssoc; import com.avaje.ebeaninternal.server.el.ElPropertyValue; import com.avaje.ebeaninternal.server.query.SplitName; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Collects usages statistics for a given node in the object graph. @@ -44,13 +44,6 @@ public class StatisticsNodeUsage implements Serializable { this.queryTuningAddVersion = queryTuningAddVersion; } - public NodeUsageStats createPublicMeta() { - synchronized(monitor){ - String[] usedProps = aggregateUsed.toArray(new String[aggregateUsed.size()]); - return new NodeUsageStats(path, profileCount, profileUsedCount, usedProps); - } - } - public void buildTunedFetch(PathProperties pathProps, BeanDescriptor rootDesc) { synchronized(monitor){ diff --git a/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsQuery.java b/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsQuery.java index dcf9e335c..3670990db 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsQuery.java +++ b/src/main/java/com/avaje/ebeaninternal/server/autofetch/StatisticsQuery.java @@ -2,8 +2,6 @@ package com.avaje.ebeaninternal.server.autofetch; import java.io.Serializable; -import com.avaje.ebean.meta.MetaAutoFetchStatistic.QueryStats; - /** * Used to accumulate query execution statistics. */ @@ -22,10 +20,6 @@ public class StatisticsQuery implements Serializable { public StatisticsQuery(String path){ this.path = path; } - - public QueryStats createPublicMeta() { - return new QueryStats(path, exeCount, totalBeanLoaded, totalMicros); - } public void add(long beansLoaded, long micros) { exeCount++; diff --git a/src/main/java/com/avaje/ebeaninternal/server/autofetch/TunedQueryInfo.java b/src/main/java/com/avaje/ebeaninternal/server/autofetch/TunedQueryInfo.java index 1a5dc9586..a6ed7e675 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/autofetch/TunedQueryInfo.java +++ b/src/main/java/com/avaje/ebeaninternal/server/autofetch/TunedQueryInfo.java @@ -3,7 +3,6 @@ package com.avaje.ebeaninternal.server.autofetch; import java.io.Serializable; import com.avaje.ebean.bean.ObjectGraphOrigin; -import com.avaje.ebean.meta.MetaAutoFetchTunedQueryInfo; import com.avaje.ebeaninternal.api.SpiQuery; import com.avaje.ebeaninternal.server.querydefn.OrmQueryDetail; @@ -73,13 +72,6 @@ public class TunedQueryInfo implements Serializable { } } - /** - * Create a copy of this tuned fetch data for public consumption. - */ - public MetaAutoFetchTunedQueryInfo createPublicMeta() { - return new MetaAutoFetchTunedQueryInfo(origin, tunedDetail.toString(), profileCount, tunedCount, lastTuneTime); - } - /** * Set the number of times profiling has been collected for this query * point. diff --git a/src/main/java/com/avaje/ebeaninternal/server/core/BootupClasses.java b/src/main/java/com/avaje/ebeaninternal/server/core/BootupClasses.java index c90022ab7..138b52d8c 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/core/BootupClasses.java +++ b/src/main/java/com/avaje/ebeaninternal/server/core/BootupClasses.java @@ -8,8 +8,9 @@ import java.util.List; import javax.persistence.Embeddable; import javax.persistence.Entity; import javax.persistence.Table; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.avaje.ebean.config.CompoundType; import com.avaje.ebean.config.ScalarTypeConverter; @@ -22,8 +23,6 @@ import com.avaje.ebean.event.ServerConfigStartup; import com.avaje.ebean.event.TransactionEventListener; import com.avaje.ebeaninternal.server.type.ScalarType; import com.avaje.ebeaninternal.server.util.ClassPathSearchMatcher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Interesting classes for a EbeanServer such as Embeddable, Entity, @@ -33,8 +32,6 @@ public class BootupClasses implements ClassPathSearchMatcher { private static final Logger logger = LoggerFactory.getLogger(BootupClasses.class); - private ArrayList> xmlBeanList = new ArrayList>(); - private ArrayList> embeddableList = new ArrayList>(); private ArrayList> entityList = new ArrayList>(); @@ -55,8 +52,6 @@ public class BootupClasses implements ClassPathSearchMatcher { private ArrayList> beanQueryAdapterList = new ArrayList>(); - private ArrayList> luceneIndexList = new ArrayList>(); - private ArrayList> serverConfigStartupList = new ArrayList>(); private ArrayList serverConfigStartupInstances = new ArrayList(); @@ -75,7 +70,6 @@ public class BootupClasses implements ClassPathSearchMatcher { } private BootupClasses(BootupClasses parent) { - this.xmlBeanList.addAll(parent.xmlBeanList); this.embeddableList.addAll(parent.embeddableList); this.entityList.addAll(parent.entityList); this.scalarTypeList.addAll(parent.scalarTypeList); @@ -86,7 +80,6 @@ public class BootupClasses implements ClassPathSearchMatcher { this.beanFinderList.addAll(parent.beanFinderList); this.beanListenerList.addAll(parent.beanListenerList); this.beanQueryAdapterList.addAll(parent.beanQueryAdapterList); - this.luceneIndexList.addAll(parent.luceneIndexList); this.serverConfigStartupList.addAll(parent.serverConfigStartupList); } @@ -304,13 +297,6 @@ public class BootupClasses implements ClassPathSearchMatcher { return beanListenerList; } - /** - * Return the list of XML Beans. - */ - public ArrayList> getXmlBeanList() { - return xmlBeanList; - } - public void add(Iterator> it) { while (it.hasNext()) { Class clazz = it.next(); @@ -325,11 +311,7 @@ public class BootupClasses implements ClassPathSearchMatcher { } else if (isEntity(cls)) { entityList.add(cls); - - } else if (isXmlBean(cls)){ - entityList.add(cls); - //xmlBeanList.add(cls); - + } else if (isInterestingInterface(cls)) { return true; @@ -419,18 +401,4 @@ public class BootupClasses implements ClassPathSearchMatcher { } return false; } - - private boolean isXmlBean(Class cls) { - - Annotation ann = cls.getAnnotation(XmlRootElement.class); - if (ann != null) { - return true; - } - ann = cls.getAnnotation(XmlType.class); - if (ann != null) { - // Only looking for Beans and not Enums - return !cls.isEnum(); - } - return false; - } } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptor.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptor.java index 23eae6644..f27a2d019 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptor.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptor.java @@ -97,7 +97,7 @@ public class BeanDescriptor implements MetaBeanInfo { private final ConcurrentHashMap fkeyMap = new ConcurrentHashMap(); public enum EntityType { - ORM, EMBEDDED, SQL, META, XMLELEMENT + ORM, EMBEDDED, SQL } /** @@ -2403,13 +2403,6 @@ public class BeanDescriptor implements MetaBeanInfo { @SuppressWarnings("unchecked") private T createJsonBean() { - if (EntityType.XMLELEMENT.equals(entityType)) { - try { - return beanType.newInstance(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } return (T)createEntityBean(); } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptorManager.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptorManager.java index 787839547..c5714d1ee 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptorManager.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanDescriptorManager.java @@ -106,9 +106,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap { private final BeanManagerFactory beanManagerFactory; private int enhancedClassCount; - private int subclassClassCount; - private final HashSet subclassedEntities = new HashSet(); - + private final boolean updateChangesOnly; private final BootupClasses bootupClasses; @@ -447,26 +445,8 @@ public class BeanDescriptorManager implements BeanDescriptorMap { logger.debug("BeanPersistControllers[" + cc + "] BeanFinders[" + fc + "] BeanPersistListeners[" + lc + "] BeanQueryAdapters[" + qa + "]"); } - /** - * Log Warning if mixing subclass and enhancement. - *

- * If enhancement is used for some classes it is expected to be used for all - * and vice versa. - *

- */ private void logStatus() { - - String msg = "Entities enhanced[" + enhancedClassCount + "] subclassed[" + subclassClassCount + "]"; - logger.info(msg); - - if (enhancedClassCount > 0) { - if (subclassClassCount > 0) { - String subclassEntityNames = subclassedEntities.toString(); - - String m = "Mixing enhanced and subclassed entities. Subclassed classes:" + subclassEntityNames; - logger.warn(m); - } - } + logger.info("Entities enhanced[" + enhancedClassCount + "]"); } private BeanDescriptor createEmbedded(Class beanClass) { @@ -1462,25 +1442,13 @@ public class BeanDescriptorManager implements BeanDescriptorMap { private void checkEnhanced(DeployBeanDescriptor desc, Class beanClass) { // the bean already implements EntityBean checkInheritedClasses(true, beanClass); - desc.setFactoryType(beanClass); - if (!beanClass.getName().startsWith("com.avaje.ebean.meta")) { - enhancedClassCount++; - } + enhancedClassCount++; } private void checkSubclass(DeployBeanDescriptor desc, Class beanClass) { - checkInheritedClasses(false, beanClass); - desc.checkReadAndWriteMethods(); - - EntityType entityType = desc.getEntityType(); - if (EntityType.XMLELEMENT.equals(entityType)) { - desc.setFactoryType(beanClass); - - } else { - throw new PersistenceException("Entity type "+beanClass+" is not an enhanced entity bean. Subclassing is not longer supported in Ebean"); - } + throw new PersistenceException("Entity type "+beanClass+" is not an enhanced entity bean. Subclassing is not longer supported in Ebean"); } /** diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanDescriptor.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanDescriptor.java index 4f3e8d128..4c571a1b1 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanDescriptor.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanDescriptor.java @@ -13,6 +13,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.avaje.ebean.Query.UseIndex; import com.avaje.ebean.annotation.ConcurrencyMode; import com.avaje.ebean.config.TableName; @@ -22,7 +25,6 @@ import com.avaje.ebean.event.BeanFinder; import com.avaje.ebean.event.BeanPersistController; import com.avaje.ebean.event.BeanPersistListener; import com.avaje.ebean.event.BeanQueryAdapter; -import com.avaje.ebean.meta.MetaAutoFetchStatistic; import com.avaje.ebeaninternal.server.core.CacheOptions; import com.avaje.ebeaninternal.server.deploy.BeanDescriptor.EntityType; import com.avaje.ebeaninternal.server.deploy.ChainedBeanPersistController; @@ -34,8 +36,6 @@ import com.avaje.ebeaninternal.server.deploy.DeployNamedQuery; import com.avaje.ebeaninternal.server.deploy.DeployNamedUpdate; import com.avaje.ebeaninternal.server.deploy.InheritInfo; import com.avaje.ebeaninternal.server.reflect.BeanReflect; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Describes Beans including their deployment information. @@ -58,8 +58,6 @@ public class DeployBeanDescriptor { private static final Logger logger = LoggerFactory.getLogger(DeployBeanDescriptor.class); - private static final String META_BEAN_PREFIX = MetaAutoFetchStatistic.class.getName().substring(0, 20); - /** * Map of BeanProperty Linked so as to preserve order. */ @@ -247,9 +245,6 @@ public class DeployBeanDescriptor { */ public boolean checkReadAndWriteMethods() { - if (isMeta()) { - return true; - } boolean missingMethods = false; Iterator it = propMap.values().iterator(); @@ -289,22 +284,11 @@ public class DeployBeanDescriptor { public EntityType getEntityType() { if (entityType == null) { - entityType = isMeta() ? EntityType.META : EntityType.ORM; + entityType = EntityType.ORM; } return entityType; } - /** - * Return true if this is a Meta entity bean. - *

- * The Meta entity beans are not based on real tables but get meta information - * from memory such as all the entity bean meta data. - *

- */ - private boolean isMeta() { - return beanType.getName().startsWith(META_BEAN_PREFIX); - } - public void add(DRawSqlMeta rawSqlMeta) { rawSqlMetas.put(rawSqlMeta.getName(), rawSqlMeta); if ("default".equals(rawSqlMeta.getName())) { diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java index 2c8424a0f..14bb5a66f 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/parse/AnnotationClass.java @@ -6,8 +6,6 @@ import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; import com.avaje.ebean.Query.UseIndex; import com.avaje.ebean.annotation.CacheStrategy; @@ -54,18 +52,6 @@ public class AnnotationClass extends AnnotationParser { } } - private boolean isXmlElement(Class cls) { - XmlRootElement rootElement = cls.getAnnotation(XmlRootElement.class); - if (rootElement != null) { - return true; - } - XmlType xmlType = cls.getAnnotation(XmlType.class); - if (xmlType != null) { - return true; - } - return false; - } - private void read(Class cls) { Entity entity = cls.getAnnotation(Entity.class); @@ -77,9 +63,6 @@ public class AnnotationClass extends AnnotationParser { } else { descriptor.setName(entity.name()); } - } else if (isXmlElement(cls)) { - descriptor.setName(cls.getSimpleName()); - descriptor.setEntityType(EntityType.XMLELEMENT); } Embeddable embeddable = cls.getAnnotation(Embeddable.class); diff --git a/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java b/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java index d8311a4ef..4804fca1d 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java +++ b/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java @@ -31,7 +31,6 @@ import com.avaje.ebean.bean.ObjectGraphNode; import com.avaje.ebean.bean.ObjectGraphOrigin; import com.avaje.ebean.bean.PersistenceContext; import com.avaje.ebean.event.BeanQueryRequest; -import com.avaje.ebean.meta.MetaAutoFetchStatistic; import com.avaje.ebeaninternal.api.BindParams; import com.avaje.ebeaninternal.api.HashQuery; import com.avaje.ebeaninternal.api.HashQueryPlan; @@ -317,14 +316,6 @@ public class DefaultOrmQuery implements SpiQuery { public ExpressionFactory getExpressionFactory() { return expressionFactory; } - - public MetaAutoFetchStatistic getMetaAutoFetchStatistic() { - if (parentNode != null && server != null){ - ObjectGraphOrigin origin = parentNode.getOriginQueryPoint(); - return server.find(MetaAutoFetchStatistic.class, origin.getKey()); - } - return null; - } /** * Return true if the where expressions contains a many property.