Package org.hibernate.mapping
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 TypeMethodDescriptionvoidaddCallbackDefinitions(List<CallbackDefinition> callbackDefinitions) copy()Delegates toValue.getColumns().intgetMetaAttribute(String attributeName) getName()getPropertyAccessStrategy(Class clazz) Delegates toValue.getSelectables().getType()getValue()booleanbooleanbooleanbooleanbooleanbooleanisLazy()Is this property lazy in the "bytecode" sense?booleanisLob()booleanbooleanbooleanbooleanbooleanDoes 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.booleanbooleanvoidresetOptional(boolean optional) voidresetUpdateable(boolean updateable) voidsetCascade(String cascade) voidsetGeneric(boolean generic) voidsetInsertable(boolean insertable) voidsetLazy(boolean lazy) voidsetLazyGroup(String lazyGroup) voidsetLob(boolean lob) voidsetMetaAttributes(Map<String, MetaAttribute> metas) voidvoidsetNaturalIdentifier(boolean naturalIdentifier) voidsetOptimisticLocked(boolean optimisticLocked) voidsetOptional(boolean optional) voidsetPersistentClass(PersistentClass persistentClass) voidsetPropertyAccessorName(String string) voidsetPropertyAccessStrategy(PropertyAccessStrategy propertyAccessStrategy) voidsetReturnedClassName(String returnedClassName) voidsetSelectable(boolean selectable) voidsetUpdateable(boolean mutable) 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
-
resetUpdateable
public void resetUpdateable(boolean updateable) -
resetOptional
public void resetOptional(boolean optional) -
getCascadeStyle
- Throws:
MappingException
-
getCascade
-
setCascade
-
setName
-
setValue
-
isUpdateable
public boolean isUpdateable() -
isInsertable
public boolean isInsertable() -
getValueGeneratorCreator
-
setValueGeneratorCreator
-
setUpdateable
public void setUpdateable(boolean mutable) -
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, etc) 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(org.hibernate.mapping.Property, boolean, org.hibernate.bytecode.enhance.spi.interceptor.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) -
isLob
public boolean isLob() -
setLob
public void setLob(boolean lob) -
addCallbackDefinitions
-
getCallbackDefinitions
-
getReturnedClassName
-
setReturnedClassName
-
createGenerator
-
copy
-