java.lang.Object
io.ebeaninternal.server.deploy.meta.DeployBeanProperty
- Direct Known Subclasses:
DeployBeanPropertyAssoc
Description of a property of a bean. Includes its deployment information such
as database column mapping information.
-
Constructor Summary
ConstructorsConstructorDescriptionDeployBeanProperty(DeployBeanDescriptor<?> desc, Class<?> propertyType, ScalarType<?> scalarType, ScalarTypeConverter<?, ?> typeConverter) DeployBeanProperty(DeployBeanDescriptor<?> desc, Class<?> propertyType, Type genericType) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidPrimitive boolean check so see if not null default false should be applied.Return the DB Bind parameter.The database column name this is mapped to.Return the DB Column default taking into account literal translation.Return the DB column definition if defined.intReturn the DB type for the encrypted property.intReturn the DB column length for character columns.intReturn the Db scale for numeric columns.intReturn the database jdbc data type this is mapped to.getDesc()getField()Return the bean Field associated with this property.io.ebeaninternal.server.deploy.generatedproperty.GeneratedPropertyReturn the GeneratedValue.Return the generic type for this property.io.ebeaninternal.server.properties.BeanPropertyGetter<A extends Annotation>
AgetMetaAnnotation(Class<A> annotationType) io.ebean.annotation.FormulagetMetaAnnotationFormula(io.ebean.annotation.Platform platform) <A extends Annotation>
List<A> getMetaAnnotations(Class<A> annotationType) io.ebean.annotation.WheregetMetaAnnotationWhere(io.ebean.annotation.Platform platform) io.ebean.annotation.MutationDetectiongetName()Return the name of the property.Class<?> intClass<?> Return the property type.Get the raw/logical aggregation formula.ScalarType<?> Return the scalarType.Return the secondary table this property is associated with.io.ebeaninternal.server.properties.BeanPropertySetterintReturn the formula this property is based on.voidinitMetaAnnotations(Set<Class<?>> metaAnnotationsFilter) booleanbooleanReturn true if this property is encrypted in the DB.booleanbooleanisDbRead()Return true if this property is included in database queries.booleanbooleanReturn true if this property maps to the inheritance discriminator column.sbooleanReturn true if this is an Embedded property.booleanbooleanReturn true if this should be eager fetched by default.booleanisId()Return true if this is included in the unique id.booleanbooleanReturn true if this is part of the primary key.booleanbooleanbooleanisLob()Return true if this is mapped to a Clob Blob LongVarchar or LongVarbinary.booleanisLocal()Return true if this is local to this type - aka not from a super type.booleanReturn true if the property is encrypted in java rather than in the DB.booleanbooleanReturn true if this property is mandatory.booleanReturn true if this property is based on a secondary table.booleanbooleanbooleanReturn true if the property is transient.booleanReturn true if this is a placeholder property for a unidirectional relationship.booleanisUnique()Return true if the DB column is unique.booleanbooleanReturn true if this is a version column used for concurrency checking.Get the parsed aggregation formula with table alias placeholders.voidsetAggregation(String aggregation) voidsetAggregationPrefix(String prefix) Set the path to the aggregation.voidsetDbColumn(String dbColumn) Set the database column name this is mapped to.voidsetDbColumnDefault(String dbColumnDefault) voidsetDbColumnDefn(String dbColumnDefn) Set a specific DB column definition.voidsetDbComment(String dbComment) voidsetDbEncryptFunction(DbEncryptFunction dbEncryptFunction, DbEncrypt dbEncrypt, int dbLen) voidsetDbInsertable(boolean insertable) voidsetDbLength(int dbLength) Set the DB column length for character columns.voidsetDbRead(boolean isDBRead) Set to true if this property is included in database queries.voidsetDbScale(int dbScale) Set the Db scale for numeric columns.voidsetDbType(int dbType) Set the database jdbc data type this is mapped to.voidsetDbUpdateable(boolean updateable) voidSet when this property is part of a 'element bean' used with ElementCollection.voidSet to true if this is an embedded property.voidvoidsetFetchType(jakarta.persistence.FetchType fetchType) Set the default fetch type for this property.voidSet the bean Field associated with this property.voidsetGeneratedProperty(io.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty generatedValue) Set the GeneratedValue.voidsetGetter(io.ebeaninternal.server.properties.BeanPropertyGetter getter) Set the getter used to read the property value from a bean.voidsetId()Set to true if this is included in the unique id.voidvoidsetImportedPrimaryKeyColumn(DeployBeanProperty primaryKey) Set to true if this is part of the primary key.voidsetJsonDeserialize(boolean jsonDeserialize) voidsetJsonSerialize(boolean jsonSerialize) voidSet to true when the property is encrypted in java rather than in the DB.voidsetMutationDetection(io.ebean.annotation.MutationDetection dirtyDetection) voidSet the name of the property.voidsetNullable(boolean isNullable) Set the not nullable of this property.voidsetOwningType(Class<?> owningType) Set to the owning type form a Inheritance heirarchy.voidsetPropertyIndex(int propertyIndex) voidsetScalarType(ScalarType<?> scalarType) voidsetSecondaryTable(String secondaryTable) Set to true if this property is included in persisting.voidsetSecondaryTableJoin(DeployTableJoin secondaryTableJoin, String prefix) voidsetSetter(io.ebeaninternal.server.properties.BeanPropertySetter setter) Set the setter used to set the property value to a bean.voidvoidsetSortOrder(int sortOrder) Set the sortOrder for the properties.voidsetSqlFormula(String formulaSelect, String formulaJoin) The property is based on a formula.voidvoidMark the property explicitly as a transient property.voidMark this property as a placeholder for a unidirectional relationship.voidsetUnique(boolean unique) Set to true if the DB column is unique.voidvoidSet if this is a version column used for concurrency checking.toString()
-
Constructor Details
-
DeployBeanProperty
public DeployBeanProperty(DeployBeanDescriptor<?> desc, Class<?> propertyType, ScalarType<?> scalarType, ScalarTypeConverter<?, ?> typeConverter) -
DeployBeanProperty
-
-
Method Details
-
getSortOverride
public int getSortOverride() -
getDesc
-
getDbLength
public int getDbLength()Return the DB column length for character columns.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).
-
isJsonSerialize
public boolean isJsonSerialize() -
setJsonSerialize
public void setJsonSerialize(boolean jsonSerialize) -
isJsonDeserialize
public boolean isJsonDeserialize() -
setJsonDeserialize
public void setJsonDeserialize(boolean jsonDeserialize) -
getMutationDetection
public io.ebean.annotation.MutationDetection getMutationDetection() -
setMutationDetection
public void setMutationDetection(io.ebean.annotation.MutationDetection dirtyDetection) -
setSortOrder
public void setSortOrder(int sortOrder) Set the sortOrder for the properties. -
isUndirectionalShadow
public boolean isUndirectionalShadow()Return true if this is a placeholder property for a unidirectional relationship. -
setUndirectionalShadow
public void setUndirectionalShadow()Mark this property as a placeholder for a unidirectional relationship. -
isDiscriminator
public boolean isDiscriminator()Return true if this property maps to the inheritance discriminator column.s -
isLocalEncrypted
public boolean isLocalEncrypted()Return true if the property is encrypted in java rather than in the DB. -
setLocalEncrypted
public void setLocalEncrypted()Set to true when the property is encrypted in java rather than in the DB. -
setDbLength
public void setDbLength(int dbLength) Set the DB column length for character columns. -
getDbScale
public int getDbScale()Return the Db scale for numeric columns. -
setDbScale
public void setDbScale(int dbScale) Set the Db scale for numeric columns. -
getDbColumnDefn
Return the DB column definition if defined. -
setDbColumnDefn
Set a specific DB column definition. -
getScalarType
Return the scalarType. This returns null for native JDBC types, otherwise it is used to convert between logical types and jdbc types. -
setScalarType
-
getPropertyIndex
public int getPropertyIndex() -
setPropertyIndex
public void setPropertyIndex(int propertyIndex) -
getGetter
public io.ebeaninternal.server.properties.BeanPropertyGetter getGetter() -
getSetter
public io.ebeaninternal.server.properties.BeanPropertySetter getSetter() -
setOwningType
Set to the owning type form a Inheritance heirarchy. -
getOwningType
-
isLocal
public boolean isLocal()Return true if this is local to this type - aka not from a super type. -
setGetter
public void setGetter(io.ebeaninternal.server.properties.BeanPropertyGetter getter) Set the getter used to read the property value from a bean. -
setSetter
public void setSetter(io.ebeaninternal.server.properties.BeanPropertySetter setter) Set the setter used to set the property value to a bean. -
getName
Return the name of the property. -
setName
Set the name of the property. -
getField
Return the bean Field associated with this property. -
setField
Set the bean Field associated with this property. -
isNaturalKey
public boolean isNaturalKey() -
getGeneratedProperty
public io.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty getGeneratedProperty()Return the GeneratedValue. Used to generate update timestamp etc. -
setGeneratedProperty
public void setGeneratedProperty(io.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty generatedValue) Set the GeneratedValue. Used to generate update timestamp etc. -
isNullable
public boolean isNullable()Return true if this property is mandatory. -
setNullable
public void setNullable(boolean isNullable) Set the not nullable of this property. -
isUnique
public boolean isUnique()Return true if the DB column is unique. -
setUnique
public void setUnique(boolean unique) Set to true if the DB column is unique. -
isVersionColumn
public boolean isVersionColumn()Return true if this is a version column used for concurrency checking. -
setVersionColumn
public void setVersionColumn()Set if this is a version column used for concurrency checking. -
isFetchEager
public boolean isFetchEager()Return true if this should be eager fetched by default. -
setFetchType
public void setFetchType(jakarta.persistence.FetchType fetchType) Set the default fetch type for this property. -
getSqlFormulaSelect
Return the formula this property is based on. -
getSqlFormulaJoin
-
setSqlFormula
The property is based on a formula. -
setImportedPrimaryKey
public void setImportedPrimaryKey() -
setImportedPrimaryKeyColumn
Set to true if this is part of the primary key. -
isAggregation
public boolean isAggregation() -
getRawAggregation
Get the raw/logical aggregation formula. -
parseAggregation
Get the parsed aggregation formula with table alias placeholders. -
setAggregation
-
setAggregationPrefix
Set the path to the aggregation. -
getElPrefix
-
getElPlaceHolder
-
getDbColumn
The database column name this is mapped to. -
setDbColumn
Set the database column name this is mapped to. -
getDbType
public int getDbType()Return the database jdbc data type this is mapped to. -
setDbType
public void setDbType(int dbType) Set the database jdbc data type this is mapped to. -
isLob
public boolean isLob()Return true if this is mapped to a Clob Blob LongVarchar or LongVarbinary. -
isSecondaryTable
public boolean isSecondaryTable()Return true if this property is based on a secondary table. -
getSecondaryTable
Return the secondary table this property is associated with. -
setSecondaryTable
Set to true if this property is included in persisting. -
getSecondaryTableJoinPrefix
-
getSecondaryTableJoin
-
setSecondaryTableJoin
-
getDbBind
Return the DB Bind parameter. Typically is "?" but can be different for encrypted bind. -
isDbEncrypted
public boolean isDbEncrypted()Return true if this property is encrypted in the DB. -
getDbEncryptFunction
-
setDbEncryptFunction
public void setDbEncryptFunction(DbEncryptFunction dbEncryptFunction, DbEncrypt dbEncrypt, int dbLen) -
getDbEncryptedType
public int getDbEncryptedType()Return the DB type for the encrypted property. This can differ from the logical type (String encrypted and stored in a VARBINARY) -
isDbRead
public boolean isDbRead()Return true if this property is included in database queries. -
setDbRead
public void setDbRead(boolean isDBRead) Set to true if this property is included in database queries. -
isDbInsertable
public boolean isDbInsertable() -
setDbInsertable
public void setDbInsertable(boolean insertable) -
isDbUpdateable
public boolean isDbUpdateable() -
setDbUpdateable
public void setDbUpdateable(boolean updateable) -
isTransient
public boolean isTransient()Return true if the property is transient. -
setTransient
public void setTransient()Mark the property explicitly as a transient property. -
getPropertyType
Return the property type. -
getGenericType
Return the generic type for this property. -
isImportedPrimaryKey
public boolean isImportedPrimaryKey()Return true if this is part of the primary key. -
isId
public boolean isId()Return true if this is included in the unique id. -
setId
public void setId()Set to true if this is included in the unique id. -
isEmbedded
public boolean isEmbedded()Return true if this is an Embedded property. In this case it shares the table and pk of its owner object. -
setEmbedded
public void setEmbedded()Set to true if this is an embedded property. -
toString
-
isExcludedFromHistory
public boolean isExcludedFromHistory() -
setExcludedFromHistory
public void setExcludedFromHistory() -
checkPrimitiveBoolean
public void checkPrimitiveBoolean()Primitive boolean check so see if not null default false should be applied. -
setSoftDelete
public void setSoftDelete() -
isSoftDelete
public boolean isSoftDelete() -
setUnmappedJson
public void setUnmappedJson() -
isUnmappedJson
public boolean isUnmappedJson() -
setDbComment
-
getDbComment
-
getDbColumnDefaultSqlLiteral
Return the DB Column default taking into account literal translation. -
setDbColumnDefault
-
setTenantId
public void setTenantId() -
isTenantId
public boolean isTenantId() -
isIdClass
public boolean isIdClass() -
addDbMigrationInfo
-
getDbMigrationInfos
-
setElementProperty
public void setElementProperty()Set when this property is part of a 'element bean' used with ElementCollection. -
initMetaAnnotations
-
getMetaAnnotation
-
getMetaAnnotations
-
getMetaAnnotationFormula
public io.ebean.annotation.Formula getMetaAnnotationFormula(io.ebean.annotation.Platform platform) -
getMetaAnnotationWhere
public io.ebean.annotation.Where getMetaAnnotationWhere(io.ebean.annotation.Platform platform) -
bindMaxLength
-