Top Description Fields Constructors Methods
org.hibernate.mapping

public Class ManyToOne

extends ToOne
Class Inheritance
Imports
java.util.ArrayList, .Map, org.hibernate.MappingException, org.hibernate.annotations.NotFoundAction, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.type.EntityType, .Type

A mapping model object representing a many-to-one association.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean
private NotFoundAction
private Type
Inherited from org.hibernate.mapping.ToOne:
referencedPropertyName

Constructor Summary

AccessConstructor and Description
public
ManyToOne(MetadataBuildingContext buildingContext, Table table)

private
ManyToOne(ManyToOne original)

Method Summary

Modifier and TypeMethod and Description
public Object
public ManyToOne
public 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.

public void
public NotFoundAction
public Type
public boolean
public boolean
public boolean
public void
public void
setIgnoreNotFound(boolean ignoreNotFound)

public void
Inherited from org.hibernate.mapping.ToOne:
createForeignKeycreateForeignKeygetFetchModegetPropertyNamegetReferencedEntityNamegetReferencedPropertyNameisLazyisReferenceToPrimaryKeyisSameisSameisSortedisTypeSpecifiedisUnwrapProxyisUnwrapProxyImplicitisValidsetFetchModesetLazysetPropertyNamesetReferencedEntityNamesetReferencedPropertyNamesetReferenceToPrimaryKeysetSortedsetTypeUsingReflectionsetUnwrapProxysetUnwrapProxyImplicitsortProperties

Field Detail

isLogicalOneToOneback to summary
private boolean isLogicalOneToOne
notFoundActionback to summary
private NotFoundAction notFoundAction
resolvedTypeback to summary
private Type resolvedType

Constructor Detail

ManyToOneback to summary
public ManyToOne(MetadataBuildingContext buildingContext, Table table)
ManyToOneback to summary
private ManyToOne(ManyToOne original)

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Overrides org.hibernate.mapping.ToOne.accept.

Implements org.hibernate.mapping.Value.accept.

copyback to summary
public ManyToOne copy()

Implements org.hibernate.mapping.Value.copy.

Annotations
@Override
createPropertyRefConstraintsback to summary
public 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.

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.

createUniqueKeyback to summary
public void createUniqueKey()

Overrides org.hibernate.mapping.SimpleValue.createUniqueKey.

Implements org.hibernate.mapping.Value.createUniqueKey.

Annotations
@Override
getNotFoundActionback to summary
public NotFoundAction getNotFoundAction()
getTypeback to summary
public Type getType() throws MappingException

Implements org.hibernate.mapping.Value.getType.

isIgnoreNotFoundback to summary
public boolean isIgnoreNotFound()
isLogicalOneToOneback to summary
public boolean isLogicalOneToOne()
isNullableback to summary
public boolean isNullable()

Overrides org.hibernate.mapping.SimpleValue.isNullable.

Implements org.hibernate.mapping.Value.isNullable.

Annotations
@Override
markAsLogicalOneToOneback to summary
public void markAsLogicalOneToOne()
setIgnoreNotFoundback to summary
public void setIgnoreNotFound(boolean ignoreNotFound)
setNotFoundActionback to summary
public void setNotFoundAction(NotFoundAction notFoundAction)