mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - code cleanup - removed unused param - TypeManager
This commit is contained in:
@@ -10,10 +10,17 @@ import com.avaje.ebean.bean.PersistenceContext;
|
||||
import com.avaje.ebean.config.EncryptKey;
|
||||
import com.avaje.ebean.config.dbplatform.IdGenerator;
|
||||
import com.avaje.ebean.config.dbplatform.IdType;
|
||||
import com.avaje.ebean.event.*;
|
||||
import com.avaje.ebean.event.BeanFindController;
|
||||
import com.avaje.ebean.event.BeanPersistController;
|
||||
import com.avaje.ebean.event.BeanPersistListener;
|
||||
import com.avaje.ebean.event.BeanQueryAdapter;
|
||||
import com.avaje.ebean.meta.MetaBeanInfo;
|
||||
import com.avaje.ebean.meta.MetaQueryPlanStatistic;
|
||||
import com.avaje.ebeaninternal.api.*;
|
||||
import com.avaje.ebeaninternal.api.HashQueryPlan;
|
||||
import com.avaje.ebeaninternal.api.SpiEbeanServer;
|
||||
import com.avaje.ebeaninternal.api.SpiQuery;
|
||||
import com.avaje.ebeaninternal.api.SpiTransaction;
|
||||
import com.avaje.ebeaninternal.api.SpiUpdatePlan;
|
||||
import com.avaje.ebeaninternal.api.TransactionEventTable.TableIUD;
|
||||
import com.avaje.ebeaninternal.server.cache.CachedBeanData;
|
||||
import com.avaje.ebeaninternal.server.core.CacheOptions;
|
||||
@@ -23,7 +30,12 @@ import com.avaje.ebeaninternal.server.core.PersistRequestBean;
|
||||
import com.avaje.ebeaninternal.server.deploy.id.IdBinder;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanPropertyLists;
|
||||
import com.avaje.ebeaninternal.server.el.*;
|
||||
import com.avaje.ebeaninternal.server.el.ElComparator;
|
||||
import com.avaje.ebeaninternal.server.el.ElComparatorCompound;
|
||||
import com.avaje.ebeaninternal.server.el.ElComparatorProperty;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyChainBuilder;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyDeploy;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyValue;
|
||||
import com.avaje.ebeaninternal.server.persist.DmlUtil;
|
||||
import com.avaje.ebeaninternal.server.query.CQueryPlan;
|
||||
import com.avaje.ebeaninternal.server.query.CQueryPlanStats.Snapshot;
|
||||
@@ -32,7 +44,6 @@ import com.avaje.ebeaninternal.server.querydefn.OrmQueryDetail;
|
||||
import com.avaje.ebeaninternal.server.text.json.ReadJson;
|
||||
import com.avaje.ebeaninternal.server.text.json.WriteJson;
|
||||
import com.avaje.ebeaninternal.server.type.DataBind;
|
||||
import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import com.avaje.ebeaninternal.util.SortByClause;
|
||||
import com.avaje.ebeaninternal.util.SortByClause.Property;
|
||||
import com.avaje.ebeaninternal.util.SortByClauseParser;
|
||||
@@ -43,7 +54,13 @@ import javax.persistence.PersistenceException;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@@ -290,7 +307,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
|
||||
/**
|
||||
* Construct the BeanDescriptor.
|
||||
*/
|
||||
public BeanDescriptor(BeanDescriptorMap owner, TypeManager typeManager, DeployBeanDescriptor<T> deploy, String descriptorId) {
|
||||
public BeanDescriptor(BeanDescriptorMap owner, DeployBeanDescriptor<T> deploy, String descriptorId) {
|
||||
|
||||
this.owner = owner;
|
||||
this.serverName = owner.getServerName();
|
||||
@@ -438,19 +455,6 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
|
||||
throw new IllegalStateException("Error trying to create the prototypeEntityBean for "+beanType, e);
|
||||
}
|
||||
}
|
||||
|
||||
private LinkedHashMap<String, BeanProperty> getReverseMap(LinkedHashMap<String, BeanProperty> propMap) {
|
||||
|
||||
LinkedHashMap<String, BeanProperty> revMap = new LinkedHashMap<String, BeanProperty>(propMap.size() * 2);
|
||||
|
||||
for (BeanProperty prop : propMap.values()) {
|
||||
if (prop.getDbColumn() != null) {
|
||||
revMap.put(prop.getDbColumn(), prop);
|
||||
}
|
||||
}
|
||||
|
||||
return revMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the server. Primarily so that the Many's can lazy load.
|
||||
|
||||
@@ -45,7 +45,6 @@ import com.avaje.ebeaninternal.server.properties.BeanPropertiesReader;
|
||||
import com.avaje.ebeaninternal.server.properties.BeanPropertyInfo;
|
||||
import com.avaje.ebeaninternal.server.properties.BeanPropertyInfoFactory;
|
||||
import com.avaje.ebeaninternal.server.properties.EnhanceBeanPropertyInfoFactory;
|
||||
import com.avaje.ebeaninternal.server.type.TypeManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -87,8 +86,6 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
|
||||
private final DeployUtil deployUtil;
|
||||
|
||||
private final TypeManager typeManager;
|
||||
|
||||
private final PersistControllerManager persistControllerManager;
|
||||
|
||||
private final BeanFinderManager beanFinderManager;
|
||||
@@ -179,7 +176,6 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
this.readAnnotations = new ReadAnnotations(config.getGeneratedPropertyFactory(), asOfViewSuffix);
|
||||
this.bootupClasses = config.getBootupClasses();
|
||||
this.createProperties = config.getDeployCreateProperties();
|
||||
this.typeManager = config.getTypeManager();
|
||||
this.namingConvention = serverConfig.getNamingConvention();
|
||||
this.dbIdentity = config.getDatabasePlatform().getDbIdentity();
|
||||
this.deplyInherit = config.getDeployInherit();
|
||||
@@ -464,7 +460,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
|
||||
Integer key = getUniqueHash(info.getDescriptor());
|
||||
|
||||
return new BeanDescriptor<T>(this, typeManager, info.getDescriptor(), key.toString());
|
||||
return new BeanDescriptor<T>(this, info.getDescriptor(), key.toString());
|
||||
}
|
||||
|
||||
private void registerBeanDescriptor(BeanDescriptor<?> desc) {
|
||||
@@ -598,7 +594,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
for (DeployBeanInfo<?> info : deplyInfoMap.values()) {
|
||||
DeployBeanDescriptor<?> deployBeanDescriptor = info.getDescriptor();
|
||||
Integer key = getUniqueHash(deployBeanDescriptor);
|
||||
registerBeanDescriptor(new BeanDescriptor(this, typeManager, info.getDescriptor(), key.toString()));
|
||||
registerBeanDescriptor(new BeanDescriptor(this, info.getDescriptor(), key.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user