diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanProperty.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanProperty.java index 5163980d3..436f93699 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanProperty.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanProperty.java @@ -175,11 +175,6 @@ public class BeanProperty implements ElPropertyValue { final boolean excludedFromHistory; - /** - * The default value to insert if null. - */ - final Object defaultValue; - /** * Extra deployment parameters. */ @@ -295,16 +290,14 @@ public class BeanProperty implements ElPropertyValue { this.formula = sqlFormulaSelect != null; this.extraAttributeMap = deploy.getExtraAttributeMap(); - this.defaultValue = deploy.getDefaultValue(); this.dbType = deploy.getDbType(); this.scalarType = deploy.getScalarType(); this.lob = isLobType(dbType); this.propertyType = deploy.getPropertyType(); this.field = deploy.getField(); - EntityType et = descriptor == null ? null : descriptor.getEntityType(); - this.elPlaceHolder = tableAliasIntern(descriptor, deploy.getElPlaceHolder(et), false, null); - this.elPlaceHolderEncrypted = tableAliasIntern(descriptor, deploy.getElPlaceHolder(et), dbEncrypted, dbColumn); + this.elPlaceHolder = tableAliasIntern(descriptor, deploy.getElPlaceHolder(), false, null); + this.elPlaceHolderEncrypted = tableAliasIntern(descriptor, deploy.getElPlaceHolder(), dbEncrypted, dbColumn); this.jsonSerialize = deploy.isJsonSerialize(); this.jsonDeserialize = deploy.isJsonDeserialize(); @@ -380,7 +373,6 @@ public class BeanProperty implements ElPropertyValue { this.getter = source.getter; this.setter = source.setter; this.extraAttributeMap = source.extraAttributeMap; - this.defaultValue = source.getDefaultValue(); this.dbType = source.getDbType(); this.scalarType = source.scalarType; this.lob = isLobType(dbType); @@ -1066,13 +1058,6 @@ public class BeanProperty implements ElPropertyValue { return embedded; } - /** - * Return the default value. - */ - public Object getDefaultValue() { - return defaultValue; - } - public String toString() { return name; } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanProperty.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanProperty.java index 5a1620e39..31d0f1d28 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanProperty.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanProperty.java @@ -1,16 +1,5 @@ package com.avaje.ebeaninternal.server.deploy.meta; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.sql.Types; -import java.util.HashMap; -import java.util.Map; - -import javax.persistence.EmbeddedId; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.Version; - import com.avaje.ebean.annotation.CreatedTimestamp; import com.avaje.ebean.annotation.UpdatedTimestamp; import com.avaje.ebean.annotation.WhenCreated; @@ -19,7 +8,6 @@ import com.avaje.ebean.config.ScalarTypeConverter; import com.avaje.ebean.config.dbplatform.DbEncrypt; import com.avaje.ebean.config.dbplatform.DbEncryptFunction; import com.avaje.ebeaninternal.server.core.InternString; -import com.avaje.ebeaninternal.server.deploy.BeanDescriptor.EntityType; import com.avaje.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty; import com.avaje.ebeaninternal.server.el.ElPropertyValue; import com.avaje.ebeaninternal.server.properties.BeanPropertyGetter; @@ -28,6 +16,16 @@ import com.avaje.ebeaninternal.server.type.ScalarType; import com.avaje.ebeaninternal.server.type.ScalarTypeEnum; import com.avaje.ebeaninternal.server.type.ScalarTypeWrapper; +import javax.persistence.EmbeddedId; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.Version; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.sql.Types; +import java.util.HashMap; +import java.util.Map; + /** * Description of a property of a bean. Includes its deployment information such * as database column mapping information. @@ -39,29 +37,6 @@ public class DeployBeanProperty { private static final int AUDITCOLUMN_ORDER = -1000000; private static final int VERSIONCOLUMN_ORDER = -1000000; - /** - * Advanced bean deployment. To exclude this property from update where - * clause. - */ - public static final String EXCLUDE_FROM_UPDATE_WHERE = "EXCLUDE_FROM_UPDATE_WHERE"; - - /** - * Advanced bean deployment. To exclude this property from delete where - * clause. - */ - public static final String EXCLUDE_FROM_DELETE_WHERE = "EXCLUDE_FROM_DELETE_WHERE"; - - /** - * Advanced bean deployment. To exclude this property from insert. - */ - public static final String EXCLUDE_FROM_INSERT = "EXCLUDE_FROM_INSERT"; - - /** - * Advanced bean deployment. To exclude this property from update set - * clause. - */ - public static final String EXCLUDE_FROM_UPDATE = "EXCLUDE_FROM_UPDATE"; - /** * Flag to mark this at part of the unique id. */ @@ -182,11 +157,6 @@ public class DeployBeanProperty { */ private int dbType; - /** - * The default value to insert if null. - */ - private Object defaultValue; - /** * Extra deployment parameters. */ @@ -608,7 +578,7 @@ public class DeployBeanProperty { this.dbUpdateable = false; } - public String getElPlaceHolder(EntityType et) { + public String getElPlaceHolder() { if (sqlFormulaSelect != null) { return sqlFormulaSelect; } else { @@ -723,13 +693,6 @@ public class DeployBeanProperty { return dbBind; } - /** - * Set the DB bind parameter (if different from "?"). - */ - public void setDbBind(String dbBind) { - this.dbBind = dbBind; - } - /** * Return true if this property is encrypted in the DB. */ @@ -737,13 +700,6 @@ public class DeployBeanProperty { return dbEncrypted; } -// /** -// * Set true if this property should be encrypted in the DB. -// */ -// public void setDbEncrypted(boolean dbEncrypted) { -// this.dbEncrypted = dbEncrypted; -// } - public DbEncryptFunction getDbEncryptFunction() { return dbEncryptFunction; } @@ -767,13 +723,6 @@ public class DeployBeanProperty { return dbEncryptedType; } - /** - * Set the DB type used to store the encrypted value. - */ - public void setDbEncryptedType(int dbEncryptedType) { - this.dbEncryptedType = dbEncryptedType; - } - /** * Return true if this property is included in database queries. */ @@ -869,34 +818,6 @@ public class DeployBeanProperty { return extraAttributeMap; } - /** - * Return an extra attribute set on this property. - */ - public String getExtraAttribute(String key) { - return extraAttributeMap.get(key); - } - - /** - * Set an extra attribute set on this property. - */ - public void setExtraAttribute(String key, String value) { - extraAttributeMap.put(key, value); - } - - /** - * Return the default value. - */ - public Object getDefaultValue() { - return defaultValue; - } - - /** - * Set the default value. Inserted if the value is null. - */ - public void setDefaultValue(Object defaultValue) { - this.defaultValue = defaultValue; - } - public String toString() { return desc.getFullName() + "." + name; }