Class SingularAttributeSourceAnyImpl
- java.lang.Object
-
- org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
-
- org.hibernate.boot.model.source.internal.hbm.SingularAttributeSourceAnyImpl
-
- All Implemented Interfaces:
AnyMappingSource
,AttributeSource
,CascadeStyleSource
,SingularAttributeSource
,SingularAttributeSourceAny
,ToolingHintContextContainer
public class SingularAttributeSourceAnyImpl extends AbstractHbmSourceNode implements SingularAttributeSourceAny
-
-
Constructor Summary
Constructors Constructor Description SingularAttributeSourceAnyImpl(MappingDocument sourceMappingDocument, AttributeSourceContainer container, JaxbHbmAnyAssociationType jaxbAnyMapping, String logicalTableName, NaturalIdMutability naturalIdMutability)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributePath
getAttributePath()
AttributeRole
getAttributeRole()
String
getCascadeStyleName()
Obtain the cascade styles to be applied to this association.AnyDiscriminatorSource
getDiscriminatorSource()
GenerationTiming
getGenerationTiming()
Obtain a description of if/when the attribute value is generated by the database.AnyKeySource
getKeySource()
String
getName()
Obtain the attribute name.NaturalIdMutability
getNaturalIdMutability()
Retrieve the natural id mutabilityString
getPropertyAccessorName()
Obtain the name of the property accessor style used to access this attribute.SingularAttributeNature
getSingularAttributeNature()
Obtain the nature of this attribute type.XmlElementMetadata
getSourceType()
ToolingHintContext
getToolingHintContext()
HibernateTypeSource
getTypeInformation()
Obtain information about the Hibernate type (Type
) for this attribute.String
getXmlNodeName()
This is only useful to log warnings when these deprecated attributes are populated.boolean
isBytecodeLazy()
Should the attribute be lazily loaded by bytecode enhancement?boolean
isIncludedInOptimisticLocking()
If the containing entity is using optimistic locking, should this attribute participate in that locking? Meaning, should changes in the value of this attribute at runtime indicate that the entity is now dirty in terms of optimistic locking?Boolean
isInsertable()
Did the mapping specify that the given attribute value(s) should be inserted into the database?boolean
isLazy()
boolean
isSingular()
Attributes are (coarsely speaking) either singular or plural.Boolean
isUpdatable()
Did the mapping specify that the given attribute value(s) should be updated in the database?boolean
isVirtualAttribute()
Determine whether this is a virtual attribute or whether it physically exists on the users domain model.-
Methods inherited from class org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
mappingRoot, metadataBuildingContext, origin, sourceMappingDocument
-
-
-
-
Constructor Detail
-
SingularAttributeSourceAnyImpl
public SingularAttributeSourceAnyImpl(MappingDocument sourceMappingDocument, AttributeSourceContainer container, JaxbHbmAnyAssociationType jaxbAnyMapping, String logicalTableName, NaturalIdMutability naturalIdMutability)
-
-
Method Detail
-
getSingularAttributeNature
public SingularAttributeNature getSingularAttributeNature()
Description copied from interface:SingularAttributeSource
Obtain the nature of this attribute type.- Specified by:
getSingularAttributeNature
in interfaceSingularAttributeSource
- Returns:
- The attribute type nature
-
getSourceType
public XmlElementMetadata getSourceType()
- Specified by:
getSourceType
in interfaceAttributeSource
-
isSingular
public boolean isSingular()
Description copied from interface:AttributeSource
Attributes are (coarsely speaking) either singular or plural.- Specified by:
isSingular
in interfaceAttributeSource
- Returns:
true
indicates the attribute is singular (and therefore castable toSingularAttributeSource
);false
indicates it is plural (and therefore castable toPluralAttributeSource
).
-
getName
public String getName()
Description copied from interface:AttributeSource
Obtain the attribute name.- Specified by:
getName
in interfaceAttributeSource
- Returns:
- The attribute name.
null
is NOT allowed!
-
getXmlNodeName
public String getXmlNodeName()
Description copied from interface:AttributeSource
This is only useful to log warnings when these deprecated attributes are populated. It was only useful for DOM4J entity-mode, which was removed a long time ago.- Specified by:
getXmlNodeName
in interfaceAttributeSource
- Returns:
- The xml node name
-
getAttributePath
public AttributePath getAttributePath()
- Specified by:
getAttributePath
in interfaceAttributeSource
-
getAttributeRole
public AttributeRole getAttributeRole()
- Specified by:
getAttributeRole
in interfaceAttributeSource
-
isVirtualAttribute
public boolean isVirtualAttribute()
Description copied from interface:SingularAttributeSource
Determine whether this is a virtual attribute or whether it physically exists on the users domain model.- Specified by:
isVirtualAttribute
in interfaceSingularAttributeSource
- Returns:
true
indicates the attribute is virtual, meaning it does NOT exist on the domain model;false
indicates the attribute physically exists.
-
getGenerationTiming
public GenerationTiming getGenerationTiming()
Description copied from interface:SingularAttributeSource
Obtain a description of if/when the attribute value is generated by the database.- Specified by:
getGenerationTiming
in interfaceSingularAttributeSource
- Returns:
- The attribute value generation information
-
isInsertable
public Boolean isInsertable()
Description copied from interface:SingularAttributeSource
Did the mapping specify that the given attribute value(s) should be inserted into the database?- Specified by:
isInsertable
in interfaceSingularAttributeSource
- Returns:
true
indicates value(s) should be inserted;false
indicates not.
-
isUpdatable
public Boolean isUpdatable()
Description copied from interface:SingularAttributeSource
Did the mapping specify that the given attribute value(s) should be updated in the database?- Specified by:
isUpdatable
in interfaceSingularAttributeSource
- Returns:
true
indicates value(s) should be updated;false
indicates not.
-
isBytecodeLazy
public boolean isBytecodeLazy()
Description copied from interface:SingularAttributeSource
Should the attribute be lazily loaded by bytecode enhancement?- Specified by:
isBytecodeLazy
in interfaceSingularAttributeSource
- Returns:
true
to indicate the attribute should be lazily loaded by bytecode enhancement?
-
getNaturalIdMutability
public NaturalIdMutability getNaturalIdMutability()
Description copied from interface:SingularAttributeSource
Retrieve the natural id mutability- Specified by:
getNaturalIdMutability
in interfaceSingularAttributeSource
- Returns:
- The mutability, see enum for meanings
-
getTypeInformation
public HibernateTypeSource getTypeInformation()
Description copied from interface:AttributeSource
Obtain information about the Hibernate type (Type
) for this attribute.- Specified by:
getTypeInformation
in interfaceAttributeSource
- Returns:
- The Hibernate type information
-
getPropertyAccessorName
public String getPropertyAccessorName()
Description copied from interface:AttributeSource
Obtain the name of the property accessor style used to access this attribute.- Specified by:
getPropertyAccessorName
in interfaceAttributeSource
- Returns:
- The property accessor style for this attribute.
- See Also:
PropertyAccessStrategy
-
isIncludedInOptimisticLocking
public boolean isIncludedInOptimisticLocking()
Description copied from interface:AttributeSource
If the containing entity is using optimistic locking, should this attribute participate in that locking? Meaning, should changes in the value of this attribute at runtime indicate that the entity is now dirty in terms of optimistic locking?- Specified by:
isIncludedInOptimisticLocking
in interfaceAttributeSource
- Returns:
true
indicates it should be included;false
, it should not.
-
getToolingHintContext
public ToolingHintContext getToolingHintContext()
- Specified by:
getToolingHintContext
in interfaceToolingHintContextContainer
-
getDiscriminatorSource
public AnyDiscriminatorSource getDiscriminatorSource()
- Specified by:
getDiscriminatorSource
in interfaceAnyMappingSource
-
getKeySource
public AnyKeySource getKeySource()
- Specified by:
getKeySource
in interfaceAnyMappingSource
-
getCascadeStyleName
public String getCascadeStyleName()
Description copied from interface:CascadeStyleSource
Obtain the cascade styles to be applied to this association.- Specified by:
getCascadeStyleName
in interfaceCascadeStyleSource
- Returns:
- The cascade styles.
-
isLazy
public boolean isLazy()
- Specified by:
isLazy
in interfaceAnyMappingSource
-
-