public class ImportAwareGenerator extends Object implements org.hibernate.id.PersistentIdentifierGenerator, org.hibernate.id.Configurable
ResettableTableHiLoGenerator
. When used through
HibernateDaoUtils
,
it will not generate a new id and will use a supplied one instead. Should only be used for import purposes.Constructor and Description |
---|
ImportAwareGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
clearSaveWithIdContext() |
void |
configure(org.hibernate.type.Type type,
Properties params,
org.hibernate.service.ServiceRegistry serviceRegistry) |
static void |
enterSaveWithIdContext(Object object,
Serializable id) |
Serializable |
generate(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object obj) |
Object |
generatorKey() |
ResettableTableHiLoGenerator |
getResettableGenerator() |
static void |
leaveSaveWithIdContext() |
void |
registerExportables(org.hibernate.boot.model.relational.Database database) |
String[] |
sqlCreateStrings(org.hibernate.dialect.Dialect dialect) |
String[] |
sqlDropStrings(org.hibernate.dialect.Dialect dialect) |
public Serializable generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object obj)
generate
in interface org.hibernate.id.IdentifierGenerator
public static void enterSaveWithIdContext(Object object, Serializable id)
public static void leaveSaveWithIdContext()
@TestOnly public static void clearSaveWithIdContext()
public void configure(org.hibernate.type.Type type, Properties params, org.hibernate.service.ServiceRegistry serviceRegistry) throws org.hibernate.MappingException
configure
in interface org.hibernate.id.Configurable
org.hibernate.MappingException
public String[] sqlCreateStrings(org.hibernate.dialect.Dialect dialect) throws org.hibernate.HibernateException
sqlCreateStrings
in interface org.hibernate.id.PersistentIdentifierGenerator
org.hibernate.HibernateException
public String[] sqlDropStrings(org.hibernate.dialect.Dialect dialect) throws org.hibernate.HibernateException
sqlDropStrings
in interface org.hibernate.id.PersistentIdentifierGenerator
org.hibernate.HibernateException
public Object generatorKey()
generatorKey
in interface org.hibernate.id.PersistentIdentifierGenerator
public void registerExportables(org.hibernate.boot.model.relational.Database database)
registerExportables
in interface org.hibernate.boot.model.relational.ExportableProducer
public ResettableTableHiLoGenerator getResettableGenerator()
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.