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
referencedPropertyNameFields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(ValueVisitor visitor) copy()voidcreatePropertyRefConstraints(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.voidcreateUniqueKey(MetadataBuildingContext context) getType()booleanbooleanbooleanvoidvoidsetIgnoreNotFound(boolean ignoreNotFound) voidsetNotFoundAction(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, sortPropertiesMethods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createForeignKeyOfEntity, createGenerator, createGenerator, createParameterType, 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, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setColumnToIdentity, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setForeignKeyOptions, setJpaAttributeConverterDescriptor, setNullValue, setNullValueSemantic, setNullValueUndefined, setOnDeleteAction, setPartitionKey, setTable, setTypeName, setTypeParameters, setTypeParameters, sortColumns, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getVirtualSelectables
-
Constructor Details
-
ManyToOne
-
-
Method Details
-
copy
-
getType
- Throws:
MappingException
-
createUniqueKey
- Specified by:
createUniqueKeyin interfaceValue- Overrides:
createUniqueKeyin 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:
acceptin interfaceValue- Overrides:
acceptin 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:
isNullablein interfaceValue- Overrides:
isNullablein classSimpleValue
-