Class Property
java.lang.Object
org.hibernate.mapping.Property
- All Implemented Interfaces:
Serializable, MetaAttributable
- Direct Known Subclasses:
Backref, IndexBackref, SyntheticProperty
A mapping model object representing a property or field of an entity
or embeddable class.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Delegates toValue.getColumns().intgetMetaAttribute(String attributeName) getName()getPropertyAccessStrategy(Class<?> clazz) Delegates toValue.getSelectables().getType()getValue()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisLazy()Is this property lazy in the "bytecode" sense?booleanisLob()booleanbooleanbooleanbooleanbooleanbooleanDoes this property represent a synthetic property? A synthetic property is one we create during metamodel binding to represent a collection of columns but which does not represent a property physically available on the entity.booleanbooleanbooleanisValid(MappingContext mappingContext) voidresetInsertable(boolean insertable) voidresetOptional(boolean optional) voidresetUpdateable(boolean updateable) voidsetAuditedExcluded(boolean auditedExcluded) voidsetCascade(String cascade) voidsetCascade(EnumSet<CascadeType> cascadeTypes) voidsetCascade(EnumSet<CascadeType> cascadeTypes, boolean orphanRemoval) voidsetGeneric(boolean generic) voidsetGenericSpecialization(boolean genericSpecialization) voidsetInsertable(boolean insertable) voidsetLazy(boolean lazy) voidsetLazyGroup(String lazyGroup) voidsetLob(boolean lob) voidsetMetaAttributes(Map<String, MetaAttribute> metas) voidsetMutable(boolean mutable) voidvoidsetNaturalIdentifier(boolean naturalIdentifier) voidsetOptimisticLocked(boolean optimisticLocked) voidsetOptional(boolean optional) voidsetPersistentClass(PersistentClass persistentClass) voidsetPropertyAccessorName(String string) voidsetPropertyAccessStrategy(PropertyAccessStrategy propertyAccessStrategy) voidsetReturnedClassName(String returnedClassName) voidsetSelectable(boolean selectable) voidsetTemporalExcluded(boolean temporalExcluded) voidsetUpdatable(boolean updatable) voidvoidsetValueGeneratorCreator(GeneratorCreator generator) toString()
-
Constructor Details
-
Property
public Property()
-
-
Method Details
-
isBackRef
public boolean isBackRef() -
isSynthetic
public boolean isSynthetic()Does this property represent a synthetic property? A synthetic property is one we create during metamodel binding to represent a collection of columns but which does not represent a property physically available on the entity.- Returns:
- True if synthetic; false otherwise.
-
getType
- Throws:
MappingException
-
getColumnSpan
public int getColumnSpan() -
getSelectables
Delegates toValue.getSelectables(). -
getColumns
Delegates toValue.getColumns().- Throws:
AssertionFailure- if the mapping involves formulas
-
getName
-
isComposite
public boolean isComposite() -
getValue
-
resetInsertable
public void resetInsertable(boolean insertable) -
resetUpdateable
public void resetUpdateable(boolean updateable) -
resetOptional
public void resetOptional(boolean optional) -
getOnDeleteAction
-
getCascadeStyle
- Throws:
MappingException
-
getCascade
-
setCascade
-
setCascade
-
setCascade
-
setName
-
setValue
-
isUpdatable
public boolean isUpdatable() -
isInsertable
public boolean isInsertable() -
getValueGeneratorCreator
-
setValueGeneratorCreator
-
setUpdatable
public void setUpdatable(boolean updatable) -
setInsertable
public void setInsertable(boolean insertable) -
getPropertyAccessorName
-
setPropertyAccessorName
-
getPropertyAccessStrategy
-
setPropertyAccessStrategy
-
isBasicPropertyAccessor
public boolean isBasicPropertyAccessor() -
getMetaAttributes
- Specified by:
getMetaAttributesin interfaceMetaAttributable
-
getMetaAttribute
- Specified by:
getMetaAttributein interfaceMetaAttributable
-
setMetaAttributes
- Specified by:
setMetaAttributesin interfaceMetaAttributable
-
isValid
- Throws:
MappingException
-
toString
-
setLazy
public void setLazy(boolean lazy) -
isLazy
public boolean isLazy()Is this property lazy in the "bytecode" sense?Lazy here means whether we initialize this field of the entity instance in its "base fetch group". It affects whether we list this property's columns in the SQL select for the owning entity when we load its "base fetch group". The actual value that is set varies based on the nature (basic, or whatever) of the property.
- API Note:
- This method reports whether the property is considered
part of the base fetch group based solely on the information in
the mapping but
EnhancementHelper.includeInBaseFetchGroup(Property, boolean, EnhancementHelper.InheritanceChecker, boolean)is also accounts for other details.
-
getLazyGroup
-
setLazyGroup
-
isOptimisticLocked
public boolean isOptimisticLocked() -
setOptimisticLocked
public void setOptimisticLocked(boolean optimisticLocked) -
isOptional
public boolean isOptional() -
setOptional
public void setOptional(boolean optional) -
getPersistentClass
-
setPersistentClass
-
isSelectable
public boolean isSelectable() -
setSelectable
public void setSelectable(boolean selectable) -
getGetter
- Throws:
MappingException
-
getSetter
- Throws:
MappingException
-
getPropertyAccessStrategy
@Internal public PropertyAccessStrategy getPropertyAccessStrategy(Class<?> clazz) throws MappingException - Throws:
MappingException
-
isNaturalIdentifier
public boolean isNaturalIdentifier() -
setNaturalIdentifier
public void setNaturalIdentifier(boolean naturalIdentifier) -
isGeneric
public boolean isGeneric() -
setGeneric
public void setGeneric(boolean generic) -
isGenericSpecialization
public boolean isGenericSpecialization() -
setGenericSpecialization
public void setGenericSpecialization(boolean genericSpecialization) -
isTemporalExcluded
public boolean isTemporalExcluded() -
setTemporalExcluded
public void setTemporalExcluded(boolean temporalExcluded) -
isAuditedExcluded
public boolean isAuditedExcluded() -
setAuditedExcluded
public void setAuditedExcluded(boolean auditedExcluded) -
isLob
public boolean isLob() -
setLob
public void setLob(boolean lob) -
getReturnedClassName
-
setReturnedClassName
-
createGenerator
-
copy
-
setMutable
public void setMutable(boolean mutable) -
isMutable
public boolean isMutable()
-