Top Description Fields Constructors Methods
org.hibernate.mapping

public abstract Class ToOne

extends SimpleValue
implements Fetchable, SortableValue
Class Inheritance
All Implemented Interfaces
org.hibernate.mapping.SortableValue, org.hibernate.mapping.Fetchable
Known Direct Subclasses
org.hibernate.mapping.ManyToOne, org.hibernate.mapping.OneToOne
Imports
org.hibernate.FetchMode, .MappingException, org.hibernate.boot.model.internal.AnnotatedJoinColumn, .AnnotatedJoinColumns, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.engine.spi.Mapping, org.hibernate.internal.util.ReflectHelper, org.hibernate.type.EntityType, java.util.Objects

A mapping model object representing an association where the target side has cardinality one.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private FetchMode
private boolean
private String
private String
protected String
private boolean
private boolean
private boolean
private boolean
Inherited from org.hibernate.mapping.SimpleValue:
DEFAULT_ID_GEN_STRATEGY

Constructor Summary

AccessConstructor and Description
protected
ToOne(MetadataBuildingContext buildingContext, Table table)

protected
ToOne(ToOne original)

Method Summary

Modifier and TypeMethod and Description
public Object
public void
public void
public FetchMode
public String
public String
public String
public boolean
public boolean
public boolean
public boolean
isSame(ToOne other)

public boolean
public boolean
public boolean
public boolean
public boolean
isValid(Mapping mapping)

Overrides org.hibernate.mapping.SimpleValue.isValid.

Implements org.hibernate.mapping.Value.isValid.

Deprecated as a consequence of Mapping being deprecated.
public void
public void
public void
setPropertyName(String propertyName)

public void
setReferencedEntityName(String referencedEntityName)

public void
public void
setReferenceToPrimaryKey(boolean referenceToPrimaryKey)

public void
setSorted(boolean sorted)

public void
public void
setUnwrapProxy(boolean unwrapProxy)

public void
setUnwrapProxyImplicit(boolean unwrapProxyImplicit)

Related to HHH-13658 - keep track of whether `unwrapProxy` is an implicit value for reference later

public int[]
Inherited from org.hibernate.mapping.SimpleValue:
addColumnaddColumnaddFormulacopyTypeFromcreateForeignKeyOfEntitycreateGeneratorcreateParameterImplcreateUniqueKeydisableForeignKeygetAttributeConverterDescriptorgetBuildingContextgetColumngetColumnInsertabilitygetColumnsgetColumnSpangetColumnUpdateabilitygetConstraintColumnIteratorgetCustomIdGeneratorCreatorgetForeignKeyDefinitiongetForeignKeyNamegetIdentifierGeneratorgetIdentifierGeneratorParametersgetIdentifierGeneratorPropertiesgetIdentifierGeneratorStrategygetJpaAttributeConverterDescriptorgetMetadatagetNullValuegetOnDeleteActiongetSelectablesgetServiceRegistrygetTablegetTypeConfigurationgetTypeNamegetTypeParametershasAnyInsertableColumnshasAnyUpdatableColumnshasFormulaisAlternateUniqueKeyisCascadeDeleteEnabledisColumnInsertableisColumnUpdateableisConstrainedisForeignKeyEnabledisIdentityColumnisLobisNationalizedisNullableisPartitionKeyisSameisSameisSimpleValueisUpdateableisVersionjustAddColumnjustAddColumnjustAddFormulamakeLobmakeNationalizedmakeParameterImplmakeVersionsetAlternateUniqueKeysetAttributeConverterDescriptorsetCascadeDeleteEnabledsetCustomIdGeneratorCreatorsetForeignKeyDefinitionsetForeignKeyNamesetIdentifierGeneratorParameterssetIdentifierGeneratorPropertiessetIdentifierGeneratorPropertiessetIdentifierGeneratorStrategysetJpaAttributeConverterDescriptorsetNullValuesetOnDeleteActionsetPartitionKeysetTablesetTypeNamesetTypeParameterssetTypeParameterssortColumnstoString

Field Detail

fetchModeback to summary
private FetchMode fetchMode
lazyback to summary
private boolean lazy
propertyNameback to summary
private String propertyName
referencedEntityNameback to summary
private String referencedEntityName
referencedPropertyNameback to summary
protected String referencedPropertyName
referenceToPrimaryKeyback to summary
private boolean referenceToPrimaryKey
sortedback to summary
private boolean sorted
unwrapProxyback to summary
private boolean unwrapProxy
unwrapProxyImplicitback to summary
private boolean unwrapProxyImplicit

Constructor Detail

ToOneback to summary
protected ToOne(MetadataBuildingContext buildingContext, Table table)
ToOneback to summary
protected ToOne(ToOne original)

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Overrides org.hibernate.mapping.SimpleValue.accept.

Implements org.hibernate.mapping.Value.accept.

createForeignKeyback to summary
public void createForeignKey(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns)

Overrides org.hibernate.mapping.SimpleValue.createForeignKey.

Annotations
@Override
createForeignKeyback to summary
public void createForeignKey()

Overrides org.hibernate.mapping.SimpleValue.createForeignKey.

Implements org.hibernate.mapping.Value.createForeignKey.

Annotations
@Override
getFetchModeback to summary
public FetchMode getFetchMode()

Overrides org.hibernate.mapping.SimpleValue.getFetchMode.

Implements org.hibernate.mapping.Fetchable.getFetchMode, org.hibernate.mapping.Value.getFetchMode.

getPropertyNameback to summary
public String getPropertyName()
getReferencedEntityNameback to summary
public String getReferencedEntityName()
getReferencedPropertyNameback to summary
public String getReferencedPropertyName()
isLazyback to summary
public boolean isLazy()

Implements org.hibernate.mapping.Fetchable.isLazy.

isReferenceToPrimaryKeyback to summary
public boolean isReferenceToPrimaryKey()
isSameback to summary
public boolean isSame(SimpleValue other)

Overrides org.hibernate.mapping.SimpleValue.isSame.

Annotations
@Override
isSameback to summary
public boolean isSame(ToOne other)
isSortedback to summary
public boolean isSorted()

Implements org.hibernate.mapping.SortableValue.isSorted.

Annotations
@Override
isTypeSpecifiedback to summary
public boolean isTypeSpecified()

Overrides org.hibernate.mapping.SimpleValue.isTypeSpecified.

isUnwrapProxyback to summary
public boolean isUnwrapProxy()
isUnwrapProxyImplicitback to summary
public boolean isUnwrapProxyImplicit()
isValidback to summary
public boolean isValid(Mapping mapping) throws MappingException

Overrides org.hibernate.mapping.SimpleValue.isValid.

Implements org.hibernate.mapping.Value.isValid.

Deprecated

as a consequence of Mapping being deprecated. See corresponding docs for further information.

setFetchModeback to summary
public void setFetchMode(FetchMode fetchMode)

Implements org.hibernate.mapping.Fetchable.setFetchMode.

setLazyback to summary
public void setLazy(boolean lazy)

Implements org.hibernate.mapping.Fetchable.setLazy.

setPropertyNameback to summary
public void setPropertyName(String propertyName)
setReferencedEntityNameback to summary
public void setReferencedEntityName(String referencedEntityName)
setReferencedPropertyNameback to summary
public void setReferencedPropertyName(String name)
setReferenceToPrimaryKeyback to summary
public void setReferenceToPrimaryKey(boolean referenceToPrimaryKey)
setSortedback to summary
public void setSorted(boolean sorted)
setTypeUsingReflectionback to summary
public void setTypeUsingReflection(String className, String propertyName) throws MappingException

Overrides org.hibernate.mapping.SimpleValue.setTypeUsingReflection.

Implements org.hibernate.mapping.Value.setTypeUsingReflection.

Annotations
@Override
setUnwrapProxyback to summary
public void setUnwrapProxy(boolean unwrapProxy)
setUnwrapProxyImplicitback to summary
public void setUnwrapProxyImplicit(boolean unwrapProxyImplicit)

Related to HHH-13658 - keep track of whether `unwrapProxy` is an implicit value for reference later

sortPropertiesback to summary
public int[] sortProperties()

Implements org.hibernate.mapping.SortableValue.sortProperties.

Annotations
@Override