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

pack-priv Class SingularAttributeSourceOneToOneImpl

extends AbstractToOneAttributeSourceImpl
implements SingularAttributeSourceOneToOne
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.source.spi.SingularAttributeSourceOneToOne, 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.Collections, .List, org.hibernate.boot.jaxb.hbm.spi.JaxbHbmOnDeleteEnum, .JaxbHbmOneToOneType, org.hibernate.boot.model.JavaTypeDescriptor, org.hibernate.boot.model.source.spi.AttributePath, .AttributeRole, .AttributeSourceContainer, .DerivedValueSource, .NaturalIdMutability, .SingularAttributeNature, .SingularAttributeSourceOneToOne, .ToolingHintContext, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.type.ForeignKeyDirection

Implementation for <one-to-one/> mappings
Authors
Gail Badner, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final AttributePath
private final AttributeRole
private final FetchCharacteristicsSingularAssociationImpl
private final List<DerivedValueSource>
private final JaxbHbmOneToOneType
private final String
private ToolingHintContext
private final HibernateTypeSourceImpl

Constructor Summary

AccessConstructor and Description
pack-priv
SingularAttributeSourceOneToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, final JaxbHbmOneToOneType oneToOneElement, final String logicalTableName, NaturalIdMutability naturalIdMutability)

Method Summary

Modifier and TypeMethod and Description
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 List<DerivedValueSource>
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 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?
public boolean
isVirtualAttribute()

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

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

Determine whether this is a virtual attribute or whether it physically exists on the users domain model.
Inherited from org.hibernate.boot.model.source.internal.hbm.AbstractToOneAttributeSourceImpl:
createForeignKeyConstraintgetAttributeSourcegetGenerationTiminggetNaturalIdMutabilityisIgnoreNotFoundisMappedByisSingular

Field Detail

attributePathback to summary
private final AttributePath attributePath
attributeRoleback to summary
private final AttributeRole attributeRole
fetchCharacteristicsback to summary
private final FetchCharacteristicsSingularAssociationImpl fetchCharacteristics
formulaSourcesback to summary
private final List<DerivedValueSource> formulaSources
oneToOneElementback to summary
private final JaxbHbmOneToOneType oneToOneElement
referencedTypeNameback to summary
private final String referencedTypeName
toolingHintContextback to summary
private ToolingHintContext toolingHintContext
typeSourceback to summary
private final HibernateTypeSourceImpl typeSource

Constructor Detail

SingularAttributeSourceOneToOneImplback to summary
pack-priv SingularAttributeSourceOneToOneImpl(MappingDocument mappingDocument, AttributeSourceContainer container, final JaxbHbmOneToOneType oneToOneElement, final String logicalTableName, NaturalIdMutability naturalIdMutability)

Method Detail

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
getFormulaSourcesback to summary
public List<DerivedValueSource> getFormulaSources()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceOneToOne.getFormulaSources.

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
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
isConstrainedback to summary
public boolean isConstrained()

Implements org.hibernate.boot.model.source.spi.SingularAttributeSourceOneToOne.isConstrained.

Annotations
@Override
isEmbedXmlback to summary
public Boolean isEmbedXml()

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

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
isVirtualAttributeback to summary
public boolean isVirtualAttribute()

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

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

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

Determine whether this is a virtual attribute or whether it physically exists on the users domain model.

Returns:boolean

true indicates the attribute is virtual, meaning it does NOT exist on the domain model; false indicates the attribute physically exists.

Annotations
@Override