Class CompositeIdentifierSingularAttributeSourceManyToOneImpl
- java.lang.Object
-
- org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
-
- org.hibernate.boot.model.source.internal.hbm.AbstractToOneAttributeSourceImpl
-
- org.hibernate.boot.model.source.internal.hbm.CompositeIdentifierSingularAttributeSourceManyToOneImpl
-
- All Implemented Interfaces:
AssociationSource,AttributeSource,CascadeStyleSource,ColumnBindingDefaults,FetchableAttributeSource,ForeignKeyContributingSource,RelationalValueSourceContainer,SingularAttributeSource,SingularAttributeSourceManyToOne,SingularAttributeSourceToOne,ToolingHintContextContainer
public class CompositeIdentifierSingularAttributeSourceManyToOneImpl extends AbstractToOneAttributeSourceImpl implements SingularAttributeSourceManyToOne, RelationalValueSourceContainer
Descriptor for<key-many-to-one/>mapping
-
-
Constructor Summary
Constructors Constructor Description CompositeIdentifierSingularAttributeSourceManyToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, JaxbHbmCompositeKeyManyToOneType keyManyToOneElement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareValuesIncludedInInsertByDefault()How should non-specification of value insertion by the individual value sources here be interpreted in terms of defaulting that value.booleanareValuesIncludedInUpdateByDefault()How should non-specification of value updating by the individual value sources here be interpreted in terms of defaulting that value.booleanareValuesNullableByDefault()How should non-specification of value nullability by the individual value sources here be interpreted in terms of defaulting that value.AttributePathgetAttributePath()AttributeRolegetAttributeRole()StringgetCascadeStyleName()Obtain the cascade styles to be applied to this association.protected StringgetClassName()StringgetExplicitForeignKeyName()Retrieve the name of the foreign key as supplied by the user, ornullif the user supplied none.FetchCharacteristicsSingularAssociationImplgetFetchCharacteristics()ForeignKeyDirectiongetForeignKeyDirection()StringgetName()Obtain the attribute name.StringgetPropertyAccessorName()Obtain the name of the property accessor style used to access this attribute.StringgetReferencedEntityAttributeName()StringgetReferencedEntityName()Obtain the name of the referenced entity.List<RelationalValueSource>getRelationalValueSources()Obtain the containedRelationalValueSourcereferences.SingularAttributeNaturegetSingularAttributeNature()Obtain the nature of this attribute type.XmlElementMetadatagetSourceType()ToolingHintContextgetToolingHintContext()HibernateTypeSourceImplgetTypeInformation()Obtain information about the Hibernate type (Type) for this attribute.StringgetXmlNodeName()This is only useful to log warnings when these deprecated attributes are populated.booleanisBytecodeLazy()Should the attribute be lazily loaded by bytecode enhancement?booleanisCascadeDeleteEnabled()Is "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced) table is deleted, should the corresponding records in the child table automatically be deleted?BooleanisEmbedXml()booleanisIncludedInOptimisticLocking()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?BooleanisInsertable()Did the mapping specify that the given attribute value(s) should be inserted into the database?booleanisUnique()BooleanisUpdatable()Did the mapping specify that the given attribute value(s) should be updated in the database?booleanisVirtualAttribute()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.AbstractToOneAttributeSourceImpl
createForeignKeyConstraint, getAttributeSource, getGenerationTiming, getNaturalIdMutability, isIgnoreNotFound, isMappedBy, isSingular
-
Methods inherited from class org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
mappingRoot, metadataBuildingContext, origin, sourceMappingDocument
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.boot.model.source.spi.AssociationSource
getAttributeSource, isIgnoreNotFound, isMappedBy
-
Methods inherited from interface org.hibernate.boot.model.source.spi.AttributeSource
isSingular
-
Methods inherited from interface org.hibernate.boot.model.source.spi.ForeignKeyContributingSource
createForeignKeyConstraint
-
Methods inherited from interface org.hibernate.boot.model.source.spi.SingularAttributeSource
getGenerationTiming, getNaturalIdMutability
-
-
-
-
Constructor Detail
-
CompositeIdentifierSingularAttributeSourceManyToOneImpl
public CompositeIdentifierSingularAttributeSourceManyToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, JaxbHbmCompositeKeyManyToOneType keyManyToOneElement)
-
-
Method Detail
-
getSingularAttributeNature
public SingularAttributeNature getSingularAttributeNature()
Description copied from interface:SingularAttributeSourceObtain the nature of this attribute type.- Specified by:
getSingularAttributeNaturein interfaceSingularAttributeSource- Returns:
- The attribute type nature
-
isInsertable
public Boolean isInsertable()
Description copied from interface:SingularAttributeSourceDid the mapping specify that the given attribute value(s) should be inserted into the database?- Specified by:
isInsertablein interfaceSingularAttributeSource- Returns:
trueindicates value(s) should be inserted;falseindicates not.
-
isUpdatable
public Boolean isUpdatable()
Description copied from interface:SingularAttributeSourceDid the mapping specify that the given attribute value(s) should be updated in the database?- Specified by:
isUpdatablein interfaceSingularAttributeSource- Returns:
trueindicates value(s) should be updated;falseindicates not.
-
isBytecodeLazy
public boolean isBytecodeLazy()
Description copied from interface:SingularAttributeSourceShould the attribute be lazily loaded by bytecode enhancement?- Specified by:
isBytecodeLazyin interfaceSingularAttributeSource- Returns:
trueto indicate the attribute should be lazily loaded by bytecode enhancement?
-
getSourceType
public XmlElementMetadata getSourceType()
- Specified by:
getSourceTypein interfaceAttributeSource
-
getName
public String getName()
Description copied from interface:AttributeSourceObtain the attribute name.- Specified by:
getNamein interfaceAttributeSource- Returns:
- The attribute name.
nullis NOT allowed!
-
getXmlNodeName
public String getXmlNodeName()
Description copied from interface:AttributeSourceThis 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:
getXmlNodeNamein interfaceAttributeSource- Returns:
- The xml node name
-
getAttributePath
public AttributePath getAttributePath()
- Specified by:
getAttributePathin interfaceAttributeSource
-
getTypeInformation
public HibernateTypeSourceImpl getTypeInformation()
Description copied from interface:AttributeSourceObtain information about the Hibernate type (Type) for this attribute.- Specified by:
getTypeInformationin interfaceAttributeSource- Returns:
- The Hibernate type information
-
getPropertyAccessorName
public String getPropertyAccessorName()
Description copied from interface:AttributeSourceObtain the name of the property accessor style used to access this attribute.- Specified by:
getPropertyAccessorNamein interfaceAttributeSource- Returns:
- The property accessor style for this attribute.
- See Also:
PropertyAccessStrategy
-
getAttributeRole
public AttributeRole getAttributeRole()
- Specified by:
getAttributeRolein interfaceAttributeSource
-
getRelationalValueSources
public List<RelationalValueSource> getRelationalValueSources()
Description copied from interface:RelationalValueSourceContainerObtain the containedRelationalValueSourcereferences.- Specified by:
getRelationalValueSourcesin interfaceRelationalValueSourceContainer- Returns:
- The contained
RelationalValueSourcereferences.
-
areValuesIncludedInInsertByDefault
public boolean areValuesIncludedInInsertByDefault()
Description copied from interface:ColumnBindingDefaultsHow should non-specification of value insertion by the individual value sources here be interpreted in terms of defaulting that value.- Specified by:
areValuesIncludedInInsertByDefaultin interfaceColumnBindingDefaults- Returns:
trueIndicates that insertions are enabled by default for all value sources which do not explicitly specify.
-
areValuesIncludedInUpdateByDefault
public boolean areValuesIncludedInUpdateByDefault()
Description copied from interface:ColumnBindingDefaultsHow should non-specification of value updating by the individual value sources here be interpreted in terms of defaulting that value.- Specified by:
areValuesIncludedInUpdateByDefaultin interfaceColumnBindingDefaults- Returns:
trueIndicates that updates are enabled by default for all value sources which do not explicitly specify.
-
isIncludedInOptimisticLocking
public boolean isIncludedInOptimisticLocking()
Description copied from interface:AttributeSourceIf 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:
isIncludedInOptimisticLockingin interfaceAttributeSource- Returns:
trueindicates it should be included;false, it should not.
-
getFetchCharacteristics
public FetchCharacteristicsSingularAssociationImpl getFetchCharacteristics()
- Specified by:
getFetchCharacteristicsin interfaceFetchableAttributeSource- Specified by:
getFetchCharacteristicsin interfaceSingularAttributeSourceToOne
-
isVirtualAttribute
public boolean isVirtualAttribute()
Description copied from interface:SingularAttributeSourceDetermine whether this is a virtual attribute or whether it physically exists on the users domain model.- Specified by:
isVirtualAttributein interfaceSingularAttributeSource- Overrides:
isVirtualAttributein classAbstractToOneAttributeSourceImpl- Returns:
trueindicates the attribute is virtual, meaning it does NOT exist on the domain model;falseindicates the attribute physically exists.
-
areValuesNullableByDefault
public boolean areValuesNullableByDefault()
Description copied from interface:ColumnBindingDefaultsHow should non-specification of value nullability by the individual value sources here be interpreted in terms of defaulting that value.- Specified by:
areValuesNullableByDefaultin interfaceColumnBindingDefaults- Returns:
trueIndicates that insertions are enabled by default for all value sources which do not explicitly specify.
-
getReferencedEntityAttributeName
public String getReferencedEntityAttributeName()
- Specified by:
getReferencedEntityAttributeNamein interfaceSingularAttributeSourceToOne
-
getReferencedEntityName
public String getReferencedEntityName()
Description copied from interface:AssociationSourceObtain the name of the referenced entity.- Specified by:
getReferencedEntityNamein interfaceAssociationSource- Specified by:
getReferencedEntityNamein interfaceSingularAttributeSourceToOne- Returns:
- The name of the referenced entity
-
isEmbedXml
public Boolean isEmbedXml()
- Specified by:
isEmbedXmlin interfaceSingularAttributeSourceToOne
-
isUnique
public boolean isUnique()
- Specified by:
isUniquein interfaceSingularAttributeSourceToOne
-
getForeignKeyDirection
public ForeignKeyDirection getForeignKeyDirection()
- Specified by:
getForeignKeyDirectionin interfaceSingularAttributeSourceToOne
-
getCascadeStyleName
public String getCascadeStyleName()
Description copied from interface:CascadeStyleSourceObtain the cascade styles to be applied to this association.- Specified by:
getCascadeStyleNamein interfaceCascadeStyleSource- Returns:
- The cascade styles.
-
getExplicitForeignKeyName
public String getExplicitForeignKeyName()
Description copied from interface:ForeignKeyContributingSourceRetrieve the name of the foreign key as supplied by the user, ornullif the user supplied none.- Specified by:
getExplicitForeignKeyNamein interfaceForeignKeyContributingSource- Returns:
- The user supplied foreign key name.
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
Description copied from interface:ForeignKeyContributingSourceIs "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced) table is deleted, should the corresponding records in the child table automatically be deleted?- Specified by:
isCascadeDeleteEnabledin interfaceForeignKeyContributingSource- Returns:
true, if the cascade delete is enabled;false, otherwise.
-
getClassName
protected String getClassName()
-
getToolingHintContext
public ToolingHintContext getToolingHintContext()
- Specified by:
getToolingHintContextin interfaceToolingHintContextContainer
-
-