org.hibernate.id

Class ForeignGenerator

Implemented Interfaces:
Configurable, IdentifierGenerator

public class ForeignGenerator
extends java.lang.Object
implements IdentifierGenerator, Configurable

foreign

An Identifier generator that uses the value of the id property of an associated object

One mapping parameter is required: property.
Author:
Gavin King

Fields inherited from interface org.hibernate.id.IdentifierGenerator

ENTITY_NAME

Method Summary

void
configure(Type type, Properties params, Dialect d)
Serializable
generate(SessionImplementor sessionImplementor, Object object)

Method Details

configure

public void configure(Type type,
                      Properties params,
                      Dialect d)
            throws MappingException
Specified by:
configure in interface Configurable
See Also:
org.hibernate.id.Configurable.configure(org.hibernate.type.Type, java.util.Properties, org.hibernate.dialect.Dialect)

generate

public Serializable generate(SessionImplementor sessionImplementor,
                             Object object)
            throws HibernateException
Specified by:
generate in interface IdentifierGenerator
See Also:
org.hibernate.id.IdentifierGenerator.generate(org.hibernate.engine.SessionImplementor, java.lang.Object)