Top Description Fields Constructors Methods
org.hibernate.boot.model.source.internal.hbm

pack-priv Class SingularAttributeSourceManyToOneImpl

extends AbstractToOneAttributeSourceImpl
implements SingularAttributeSourceManyToOne, RelationalValueSourceContainer
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.source.spi.RelationalValueSourceContainer, org.hibernate.boot.model.source.spi.ColumnBindingDefaults, org.hibernate.boot.model.source.spi.SingularAttributeSourceManyToOne, org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne, org.hibernate.boot.model.source.spi.CascadeStyleSource, org.hibernate.boot.model.source.spi.AssociationSource, org.hibernate.boot.model.source.spi.FetchableAttributeSource, org.hibernate.boot.model.source.spi.ForeignKeyContributingSource, org.hibernate.boot.model.source.spi.SingularAttributeSource, org.hibernate.boot.model.source.spi.AttributeSource, org.hibernate.boot.model.source.spi.ToolingHintContextContainer
Imports
java.util.List, org.hibernate.boot.jaxb.hbm.spi.JaxbHbmManyToOneType, .JaxbHbmOnDeleteEnum, org.hibernate.boot.model.JavaTypeDescriptor, org.hibernate.boot.model.source.spi.AttributePath, .AttributeRole, .AttributeSourceContainer, .NaturalIdMutability, .RelationalValueSource, .RelationalValueSourceContainer, .SingularAttributeNature, .SingularAttributeSourceManyToOne, .ToolingHintContext, org.hibernate.type.ForeignKeyDirection

Implementation for <many-to-one/> mappings
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final AttributePath
private final AttributeRole
private final FetchCharacteristicsSingularAssociationImpl
private final JaxbHbmManyToOneType
private final String
private final List<RelationalValueSource>
private final ToolingHintContext
private final HibernateTypeSourceImpl

Constructor Summary

AccessConstructor and Description
pack-priv
SingularAttributeSourceManyToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, final JaxbHbmManyToOneType manyToOneElement, final String logicalTableName, NaturalIdMutability naturalIdMutability)

Method Summary

Modifier and TypeMethod and Description
public boolean
areValuesIncludedInInsertByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInInsertByDefault.

How should non-specification of value insertion by the individual value sources here be interpreted in terms of defaulting that value.
public boolean
areValuesIncludedInUpdateByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInUpdateByDefault.

How should non-specification of value updating by the individual value sources here be interpreted in terms of defaulting that value.
public boolean
areValuesNullableByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesNullableByDefault.

How should non-specification of value nullability by the individual value sources here be interpreted in terms of defaulting that value.
public AttributePath
public AttributeRole
public String
getCascadeStyleName()

Implements org.hibernate.boot.model.source.spi.CascadeStyleSource.getCascadeStyleName.

Obtain the cascade styles to be applied to this association.
public String
getExplicitForeignKeyName()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Retrieve the name of the foreign key as supplied by the user, or null if the user supplied none.
public FetchCharacteristicsSingularAssociationImpl
public ForeignKeyDirection
public String
public String
getPropertyAccessorName()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getPropertyAccessorName.

Obtain the name of the property accessor style used to access this attribute.
public String
public String
public List<RelationalValueSource>
public SingularAttributeNature
public XmlElementMetadata
public ToolingHintContext
public HibernateTypeSourceImpl
getTypeInformation()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getTypeInformation.

Obtain information about the Hibernate type (org.hibernate.type.Type) for this attribute.
public String
getXmlNodeName()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getXmlNodeName.

This is only useful to log warnings when these deprecated attributes are populated.
public boolean
isBytecodeLazy()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isBytecodeLazy.

Should the attribute be lazily loaded by bytecode enhancement?
public boolean
public Boolean
public boolean
public boolean
isIncludedInOptimisticLocking()

Implements org.hibernate.boot.model.source.spi.AttributeSource.isIncludedInOptimisticLocking.

If the containing entity is using optimistic locking, should this attribute participate in that locking?
public Boolean
isInsertable()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isInsertable.

Did the mapping specify that the given attribute value(s) should be inserted into the database?
public boolean
public Boolean
isUpdatable()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isUpdatable.

Did the mapping specify that the given attribute value(s) should be updated in the database?
Inherited from org.hibernate.boot.model.source.internal.hbm.AbstractToOneAttributeSourceImpl:
createForeignKeyConstraintgetAttributeSourcegetGenerationTiminggetNaturalIdMutabilityisMappedByisSingularisVirtualAttribute

Field Detail

attributePathback to summary
private final AttributePath attributePath
attributeRoleback to summary
private final AttributeRole attributeRole
fetchCharacteristicsback to summary
private final FetchCharacteristicsSingularAssociationImpl fetchCharacteristics
manyToOneElementback to summary
private final JaxbHbmManyToOneType manyToOneElement
referencedTypeNameback to summary
private final String referencedTypeName
relationalValueSourcesback to summary
private final List<RelationalValueSource> relationalValueSources
toolingHintContextback to summary
private final ToolingHintContext toolingHintContext
typeSourceback to summary
private final HibernateTypeSourceImpl typeSource

Constructor Detail

SingularAttributeSourceManyToOneImplback to summary
pack-priv SingularAttributeSourceManyToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, final JaxbHbmManyToOneType manyToOneElement, final String logicalTableName, NaturalIdMutability naturalIdMutability)

Method Detail

areValuesIncludedInInsertByDefaultback to summary
public boolean areValuesIncludedInInsertByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInInsertByDefault.

Doc from org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInInsertByDefault.

How should non-specification of value insertion by the individual value sources here be interpreted in terms of defaulting that value.

Returns:boolean

true Indicates that insertions are enabled by default for all value sources which do not explicitly specify.

Annotations
@Override
areValuesIncludedInUpdateByDefaultback to summary
public boolean areValuesIncludedInUpdateByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInUpdateByDefault.

Doc from org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesIncludedInUpdateByDefault.

How should non-specification of value updating by the individual value sources here be interpreted in terms of defaulting that value.

Returns:boolean

true Indicates that updates are enabled by default for all value sources which do not explicitly specify.

Annotations
@Override
areValuesNullableByDefaultback to summary
public boolean areValuesNullableByDefault()

Implements org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesNullableByDefault.

Doc from org.hibernate.boot.model.source.spi.ColumnBindingDefaults.areValuesNullableByDefault.

How should non-specification of value nullability by the individual value sources here be interpreted in terms of defaulting that value.

Returns:boolean

true Indicates that insertions are enabled by default for all value sources which do not explicitly specify.

Annotations
@Override
getAttributePathback to summary
public AttributePath getAttributePath()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getAttributePath.

Annotations
@Override
getAttributeRoleback to summary
public AttributeRole getAttributeRole()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getAttributeRole.

Annotations
@Override
getCascadeStyleNameback to summary
public String getCascadeStyleName()

Implements org.hibernate.boot.model.source.spi.CascadeStyleSource.getCascadeStyleName.

Doc from org.hibernate.boot.model.source.spi.CascadeStyleSource.getCascadeStyleName.

Obtain the cascade styles to be applied to this association.

Returns:String

The cascade styles.

Annotations
@Override
getExplicitForeignKeyNameback to summary
public String getExplicitForeignKeyName()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Doc from org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Retrieve the name of the foreign key as supplied by the user, or null if the user supplied none.

Returns:String

The user supplied foreign key name.

Annotations
@Override
getFetchCharacteristicsback to summary
public FetchCharacteristicsSingularAssociationImpl getFetchCharacteristics()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.getFetchCharacteristics.

Annotations
@Override
getForeignKeyDirectionback to summary
public ForeignKeyDirection getForeignKeyDirection()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.getForeignKeyDirection.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getName.

Doc from org.hibernate.boot.model.source.spi.AttributeSource.getName.

Obtain the attribute name.

Returns:String

The attribute name. null is NOT allowed!

Annotations
@Override
getPropertyAccessorNameback to summary
public String getPropertyAccessorName()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getPropertyAccessorName.

Doc from org.hibernate.boot.model.source.spi.AttributeSource.getPropertyAccessorName.

Obtain the name of the property accessor style used to access this attribute.

Returns:String

The property accessor style for this attribute.

Annotations
@Override
getReferencedEntityAttributeNameback to summary
public String getReferencedEntityAttributeName()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.getReferencedEntityAttributeName.

Annotations
@Override
getReferencedEntityNameback to summary
public String getReferencedEntityName()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.getReferencedEntityName.

Doc from org.hibernate.boot.model.source.spi.AssociationSource.getReferencedEntityName.

Obtain the name of the referenced entity.

Returns:String

The name of the referenced entity

Annotations
@Override
getRelationalValueSourcesback to summary
public List<RelationalValueSource> getRelationalValueSources()

Implements org.hibernate.boot.model.source.spi.RelationalValueSourceContainer.getRelationalValueSources.

Doc from org.hibernate.boot.model.source.spi.RelationalValueSourceContainer.getRelationalValueSources.

Obtain the contained RelationalValueSource references.

Returns:List<RelationalValueSource>

The contained RelationalValueSource references.

Annotations
@Override
getSingularAttributeNatureback to summary
public SingularAttributeNature getSingularAttributeNature()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.getSingularAttributeNature.

Doc from org.hibernate.boot.model.source.spi.SingularAttributeSource.getSingularAttributeNature.

Obtain the nature of this attribute type.

Returns:SingularAttributeNature

The attribute type nature

Annotations
@Override
getSourceTypeback to summary
public XmlElementMetadata getSourceType()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getSourceType.

Annotations
@Override
getToolingHintContextback to summary
public ToolingHintContext getToolingHintContext()

Implements org.hibernate.boot.model.source.spi.ToolingHintContextContainer.getToolingHintContext.

Annotations
@Override
getTypeInformationback to summary
public HibernateTypeSourceImpl getTypeInformation()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getTypeInformation.

Doc from org.hibernate.boot.model.source.spi.AttributeSource.getTypeInformation.

Obtain information about the Hibernate type (org.hibernate.type.Type) for this attribute.

Returns:HibernateTypeSourceImpl

The Hibernate type information

Annotations
@Override
getXmlNodeNameback to summary
public String getXmlNodeName()

Implements org.hibernate.boot.model.source.spi.AttributeSource.getXmlNodeName.

Doc from org.hibernate.boot.model.source.spi.AttributeSource.getXmlNodeName.

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.

Returns:String

The xml node name

Annotations
@Override
isBytecodeLazyback to summary
public boolean isBytecodeLazy()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isBytecodeLazy.

Doc from org.hibernate.boot.model.source.spi.SingularAttributeSource.isBytecodeLazy.

Should the attribute be lazily loaded by bytecode enhancement?

Returns:boolean

true to indicate the attribute should be lazily loaded by bytecode enhancement?

Annotations
@Override
isCascadeDeleteEnabledback to summary
public boolean isCascadeDeleteEnabled()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.isCascadeDeleteEnabled.

Doc from org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.isCascadeDeleteEnabled.

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?

Returns:boolean

true, if the cascade delete is enabled; false, otherwise.

Annotations
@Override
isEmbedXmlback to summary
public Boolean isEmbedXml()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.isEmbedXml.

Annotations
@Override
isIgnoreNotFoundback to summary
public boolean isIgnoreNotFound()

Overrides org.hibernate.boot.model.source.internal.hbm.AbstractToOneAttributeSourceImpl.isIgnoreNotFound.

Implements org.hibernate.boot.model.source.spi.AssociationSource.isIgnoreNotFound.

Annotations
@Override
isIncludedInOptimisticLockingback to summary
public boolean isIncludedInOptimisticLocking()

Implements org.hibernate.boot.model.source.spi.AttributeSource.isIncludedInOptimisticLocking.

Doc from org.hibernate.boot.model.source.spi.AttributeSource.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?

Returns:boolean

true indicates it should be included; false, it should not.

Annotations
@Override
isInsertableback to summary
public Boolean isInsertable()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isInsertable.

Doc from org.hibernate.boot.model.source.spi.SingularAttributeSource.isInsertable.

Did the mapping specify that the given attribute value(s) should be inserted into the database?

Returns:Boolean

true indicates value(s) should be inserted; false indicates not.

Annotations
@Override
isUniqueback to summary
public boolean isUnique()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceToOne.isUnique.

Annotations
@Override
isUpdatableback to summary
public Boolean isUpdatable()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSource.isUpdatable.

Doc from org.hibernate.boot.model.source.spi.SingularAttributeSource.isUpdatable.

Did the mapping specify that the given attribute value(s) should be updated in the database?

Returns:Boolean

true indicates value(s) should be updated; false indicates not.

Annotations
@Override