public class DeployBeanProperty extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCLUDE_FROM_DELETE_WHERE
Advanced bean deployment.
|
static String |
EXCLUDE_FROM_INSERT
Advanced bean deployment.
|
static String |
EXCLUDE_FROM_UPDATE
Advanced bean deployment.
|
static String |
EXCLUDE_FROM_UPDATE_WHERE
Advanced bean deployment.
|
| Constructor and Description |
|---|
DeployBeanProperty(DeployBeanDescriptor<?> desc,
Class<?> propertyType,
ScalarType<?> scalarType,
ScalarTypeConverter<?,?> typeConverter) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDbBind()
Return the DB Bind parameter.
|
String |
getDbColumn()
The database column name this is mapped to.
|
String |
getDbColumnDefn()
Return the DB column definition if defined.
|
String |
getDbConstraintExpression() |
int |
getDbEncryptedType()
Return the DB type for the encrypted property.
|
DbEncryptFunction |
getDbEncryptFunction() |
int |
getDbLength()
Return the DB column length for character columns.
|
int |
getDbScale()
Return the Db scale for numeric columns.
|
int |
getDbType()
Return the database jdbc data type this is mapped to.
|
Object |
getDefaultValue()
Return the default value.
|
String |
getElPlaceHolder(BeanDescriptor.EntityType et) |
String |
getExtraAttribute(String key)
Return an extra attribute set on this property.
|
Map<String,String> |
getExtraAttributeMap() |
Field |
getField()
Return the bean Field associated with this property.
|
String |
getFullBeanName() |
GeneratedProperty |
getGeneratedProperty()
Return the GeneratedValue.
|
BeanReflectGetter |
getGetter() |
String |
getName()
Return the name of the property.
|
Class<?> |
getOwningType() |
Class<?> |
getPropertyType()
Return the property type.
|
Method |
getReadMethod()
Return the getter method.
|
ScalarType<?> |
getScalarType()
Return the scalarType.
|
String |
getSecondaryTable()
Return the secondary table this property is associated with.
|
DeployTableJoin |
getSecondaryTableJoin() |
String |
getSecondaryTableJoinPrefix() |
BeanReflectSetter |
getSetter() |
int |
getSortOrder()
Return the sortOrder for the properties.
|
int |
getSortOverride() |
String |
getSqlFormulaJoin() |
String |
getSqlFormulaSelect()
Return the formula this property is based on.
|
Method |
getWriteMethod()
Return the setter method.
|
boolean |
isDbEncrypted()
Return true if this property is encrypted in the DB.
|
boolean |
isDbInsertable() |
boolean |
isDbRead()
Return true if this property is included in database queries.
|
boolean |
isDbUpdateable() |
boolean |
isEmbedded()
Return true if this is an Embedded property.
|
boolean |
isExposeDeserialize() |
boolean |
isExposeSerialize() |
boolean |
isFetchEager()
Return true if this should be eager fetched by default.
|
boolean |
isGenerated()
Return true if this is a generated property like update timestamp and
create timestamp.
|
boolean |
isId()
Return true if this is included in the unique id.
|
boolean |
isLob()
Return true if this is mapped to a Clob Blob LongVarchar or
LongVarbinary.
|
boolean |
isLocal()
Return true if this is local to this type - aka not from a super type.
|
boolean |
isLocalEncrypted()
Return true if the property is encrypted in java rather than in the DB.
|
boolean |
isNaturalKey() |
boolean |
isNullable()
Return true if this property is mandatory.
|
boolean |
isNullablePrimitive()
Return true if this is a primitive type with a nullable DB column.
|
boolean |
isScalar()
Return true is this is a simple scalar property.
|
boolean |
isSecondaryTable()
Return true if this property is based on a secondary table.
|
boolean |
isTransient()
Return true if the property is transient.
|
boolean |
isUndirectionalShadow()
Return true if this is a placeholder property for a unidirectional relationship.
|
boolean |
isUnique()
Return true if the DB column is unique.
|
boolean |
isVersionColumn()
Return true if this is a version column used for concurrency checking.
|
void |
setDbBind(String dbBind)
Set the DB bind parameter (if different from "?").
|
void |
setDbColumn(String dbColumn)
Set the database column name this is mapped to.
|
void |
setDbColumnDefn(String dbColumnDefn)
Set a specific DB column definition.
|
void |
setDbEncryptedType(int dbEncryptedType)
Set the DB type used to store the encrypted value.
|
void |
setDbEncryptFunction(DbEncryptFunction dbEncryptFunction,
DbEncrypt dbEncrypt,
int dbLen) |
void |
setDbInsertable(boolean insertable) |
void |
setDbLength(int dbLength)
Set the DB column length for character columns.
|
void |
setDbRead(boolean isDBRead)
Set to true if this property is included in database queries.
|
void |
setDbScale(int dbScale)
Set the Db scale for numeric columns.
|
void |
setDbType(int dbType)
Set the database jdbc data type this is mapped to.
|
void |
setDbUpdateable(boolean updateable) |
void |
setDefaultValue(Object defaultValue)
Set the default value.
|
void |
setEmbedded(boolean embedded)
Set to true if this is an embedded property.
|
void |
setExposeDeserialize(boolean exposeDeserialize) |
void |
setExposeSerialize(boolean exposeSerialize) |
void |
setExtraAttribute(String key,
String value)
Set an extra attribute set on this property.
|
void |
setFetchType(javax.persistence.FetchType fetchType)
Set the default fetch type for this property.
|
void |
setField(Field field)
Set the bean Field associated with this property.
|
void |
setGeneratedProperty(GeneratedProperty generatedValue)
Set the GeneratedValue.
|
void |
setGetter(BeanReflectGetter getter)
Set the getter used to read the property value from a bean.
|
void |
setId(boolean id)
Set to true if this is included in the unique id.
|
void |
setLocalEncrypted(boolean localEncrypted)
Set to true when the property is encrypted in java rather than in the DB.
|
void |
setName(String name)
Set the name of the property.
|
void |
setNaturalKey(boolean naturalKey) |
void |
setNullable(boolean isNullable)
Set the not nullable of this property.
|
void |
setOwningType(Class<?> owningType)
Set to the owning type form a Inheritance heirarchy.
|
void |
setReadMethod(Method readMethod)
Set the bean read method.
|
void |
setScalarType(ScalarType<?> scalarType) |
void |
setSecondaryTable(String secondaryTable)
Set to true if this property is included in persisting.
|
void |
setSecondaryTableJoin(DeployTableJoin secondaryTableJoin,
String prefix) |
void |
setSetter(BeanReflectSetter setter)
Set the setter used to set the property value to a bean.
|
void |
setSortOrder(int sortOrder)
Set the sortOrder for the properties.
|
void |
setSqlFormula(String formulaSelect,
String formulaJoin)
The property is based on a formula.
|
void |
setTransient(boolean isTransient)
Mark the property explicitly as a transient property.
|
void |
setUndirectionalShadow(boolean undirectionalShadow)
Mark this property as a placeholder for a unidirectional relationship.
|
void |
setUnique(boolean unique)
Set to true if the DB column is unique.
|
void |
setVersionColumn(boolean isVersionColumn)
Set if this is a version column used for concurrency checking.
|
void |
setWriteMethod(Method writeMethod)
Set the bean write method.
|
String |
toString() |
public static final String EXCLUDE_FROM_UPDATE_WHERE
public static final String EXCLUDE_FROM_DELETE_WHERE
public static final String EXCLUDE_FROM_INSERT
public static final String EXCLUDE_FROM_UPDATE
public DeployBeanProperty(DeployBeanDescriptor<?> desc, Class<?> propertyType, ScalarType<?> scalarType, ScalarTypeConverter<?,?> typeConverter)
public int getSortOverride()
public boolean isScalar()
public String getFullBeanName()
public boolean isNullablePrimitive()
This should log a WARNING as primitive types can't be null.
public int getDbLength()
Note if there is no length explicitly defined then the scalarType is checked to see if that has one (primarily to support putting a length on Enum types).
public boolean isExposeSerialize()
public void setExposeSerialize(boolean exposeSerialize)
public boolean isExposeDeserialize()
public void setExposeDeserialize(boolean exposeDeserialize)
public int getSortOrder()
public void setSortOrder(int sortOrder)
public boolean isUndirectionalShadow()
public void setUndirectionalShadow(boolean undirectionalShadow)
public boolean isLocalEncrypted()
public void setLocalEncrypted(boolean localEncrypted)
public void setDbLength(int dbLength)
public int getDbScale()
public void setDbScale(int dbScale)
public String getDbColumnDefn()
public void setDbColumnDefn(String dbColumnDefn)
public String getDbConstraintExpression()
public ScalarType<?> getScalarType()
public void setScalarType(ScalarType<?> scalarType)
public BeanReflectGetter getGetter()
public BeanReflectSetter getSetter()
public Method getReadMethod()
public Method getWriteMethod()
public void setOwningType(Class<?> owningType)
public Class<?> getOwningType()
public boolean isLocal()
public void setGetter(BeanReflectGetter getter)
public void setSetter(BeanReflectSetter setter)
public String getName()
public void setName(String name)
public Field getField()
public void setField(Field field)
public boolean isNaturalKey()
public void setNaturalKey(boolean naturalKey)
public boolean isGenerated()
public GeneratedProperty getGeneratedProperty()
public void setGeneratedProperty(GeneratedProperty generatedValue)
public boolean isNullable()
public void setNullable(boolean isNullable)
public boolean isUnique()
public void setUnique(boolean unique)
public boolean isVersionColumn()
public void setVersionColumn(boolean isVersionColumn)
public boolean isFetchEager()
public void setFetchType(javax.persistence.FetchType fetchType)
public String getSqlFormulaSelect()
public String getSqlFormulaJoin()
public void setSqlFormula(String formulaSelect, String formulaJoin)
public String getElPlaceHolder(BeanDescriptor.EntityType et)
public String getDbColumn()
public void setDbColumn(String dbColumn)
public int getDbType()
public void setDbType(int dbType)
public boolean isLob()
public boolean isSecondaryTable()
public String getSecondaryTable()
public void setSecondaryTable(String secondaryTable)
public String getSecondaryTableJoinPrefix()
public DeployTableJoin getSecondaryTableJoin()
public void setSecondaryTableJoin(DeployTableJoin secondaryTableJoin, String prefix)
public String getDbBind()
public void setDbBind(String dbBind)
public boolean isDbEncrypted()
public DbEncryptFunction getDbEncryptFunction()
public void setDbEncryptFunction(DbEncryptFunction dbEncryptFunction, DbEncrypt dbEncrypt, int dbLen)
public int getDbEncryptedType()
public void setDbEncryptedType(int dbEncryptedType)
public boolean isDbRead()
public void setDbRead(boolean isDBRead)
public boolean isDbInsertable()
public void setDbInsertable(boolean insertable)
public boolean isDbUpdateable()
public void setDbUpdateable(boolean updateable)
public boolean isTransient()
public void setTransient(boolean isTransient)
public void setReadMethod(Method readMethod)
NB: That a BeanReflectGetter is used to actually perform the getting of property values from a bean. This is due to performance considerations.
public void setWriteMethod(Method writeMethod)
NB: That a BeanReflectSetter is used to actually perform the setting of property values to a bean. This is due to performance considerations.
public Class<?> getPropertyType()
public boolean isId()
public void setId(boolean id)
public boolean isEmbedded()
public void setEmbedded(boolean embedded)
public String getExtraAttribute(String key)
public void setExtraAttribute(String key, String value)
public Object getDefaultValue()
public void setDefaultValue(Object defaultValue)
Copyright © 2014. All Rights Reserved.