Package org.hibernate.mapping
Class ManyToOne
java.lang.Object
org.hibernate.mapping.SimpleValue
org.hibernate.mapping.ToOne
org.hibernate.mapping.ManyToOne
- All Implemented Interfaces:
Serializable
,Fetchable
,KeyValue
,SortableValue
,Value
A mapping model object representing a many-to-one association.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.mapping.KeyValue
KeyValue.NullValueSemantic
-
Field Summary
Fields inherited from class org.hibernate.mapping.ToOne
referencedPropertyName
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ValueVisitor visitor) copy()
void
createPropertyRefConstraints
(Map<String, PersistentClass> persistentClasses) Creates a foreign key constraint in the case that the foreign key of this association does not reference the primary key of the referenced table, but instead some other unique key.void
createUniqueKey
(MetadataBuildingContext context) getType()
boolean
boolean
boolean
void
void
setIgnoreNotFound
(boolean ignoreNotFound) void
setNotFoundAction
(NotFoundAction notFoundAction) Methods inherited from class org.hibernate.mapping.ToOne
createForeignKey, createForeignKey, getFetchMode, getPropertyName, getReferencedEntityName, getReferencedPropertyName, isLazy, isReferenceToPrimaryKey, isSame, isSame, isSorted, isTypeSpecified, isUnwrapProxy, isUnwrapProxyImplicit, isValid, setFetchMode, setLazy, setPropertyName, setReferencedEntityName, setReferencedPropertyName, setReferenceToPrimaryKey, setSorted, setTypeUsingReflection, setUnwrapProxy, setUnwrapProxyImplicit, sortProperties
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createGenerator, createGenerator, createParameterImpl, disableForeignKey, getAttributeConverterDescriptor, getBuildingContext, getColumn, getColumnInsertability, getColumns, getColumnSpan, getColumnUpdateability, getCustomIdGeneratorCreator, getForeignKeyDefinition, getForeignKeyName, getForeignKeyOptions, getJpaAttributeConverterDescriptor, getMetadata, getNullValue, getNullValueSemantic, getOnDeleteAction, getSelectables, getServiceRegistry, getTable, getTypeConfiguration, getTypeName, getTypeParameters, hasAnyInsertableColumns, hasAnyUpdatableColumns, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isColumnInsertable, isColumnUpdateable, isConstrained, isForeignKeyEnabled, isLob, isNationalized, isPartitionKey, isSame, isSame, isSimpleValue, isUpdateable, isVersion, justAddColumn, justAddColumn, justAddFormula, makeLob, makeNationalized, makeParameterImpl, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setColumnToIdentity, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setForeignKeyOptions, setJpaAttributeConverterDescriptor, setNullValue, setNullValueSemantic, setNullValueUndefined, setOnDeleteAction, setPartitionKey, setTable, setTypeName, setTypeParameters, setTypeParameters, sortColumns, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getSelectableType, getVirtualSelectables, isValid
-
Constructor Details
-
ManyToOne
-
-
Method Details
-
copy
-
getType
- Throws:
MappingException
-
createUniqueKey
- Specified by:
createUniqueKey
in interfaceValue
- Overrides:
createUniqueKey
in classSimpleValue
-
createPropertyRefConstraints
Creates a foreign key constraint in the case that the foreign key of this association does not reference the primary key of the referenced table, but instead some other unique key.We depend here on having a property of the referenced entity that does hold the referenced unique key. We might have created a "synthetic" composite property for this purpose.
-
accept
- Specified by:
accept
in interfaceValue
- Overrides:
accept
in classSimpleValue
-
getNotFoundAction
-
setNotFoundAction
-
isIgnoreNotFound
public boolean isIgnoreNotFound() -
setIgnoreNotFound
public void setIgnoreNotFound(boolean ignoreNotFound) -
markAsLogicalOneToOne
public void markAsLogicalOneToOne() -
isLogicalOneToOne
public boolean isLogicalOneToOne() -
isNullable
public boolean isNullable()- Specified by:
isNullable
in interfaceValue
- Overrides:
isNullable
in classSimpleValue
-