Top Description Fields Methods
org.hibernate.id

public Interface PersistentIdentifierGenerator

extends IdentifierGenerator
Known Direct Implementers
org.hibernate.id.SequenceGenerator, org.hibernate.id.TableGenerator, org.hibernate.id.enhanced.SequenceStyleGenerator, org.hibernate.id.enhanced.TableGenerator, org.hibernate.id.MultipleHiLoPerTableGenerator
Imports
org.hibernate.HibernateException, org.hibernate.dialect.Dialect, org.hibernate.jdbc.util.SQLStatementLogger

An IdentifierGenerator that requires creation of database objects.

All PersistentIdentifierGenerators that also implement Configurable have access to a special mapping parameter: schema
Author
Gavin King
See Also
IdentifierGenerator, Configurable

Field Summary

Modifier and TypeField and Description
public static final String
CATALOG

The configuration parameter holding the catalog name

public static final String
IDENTIFIER_NORMALIZER

The key under whcih to find the org.hibernate.cfg.ObjectNameNormalizer in the config param map.

public static final String
PK

The configuration parameter holding the primary key column name of the generated id

public static final String
SCHEMA

The configuration parameter holding the schema name

public static final SQLStatementLogger
public static final String
TABLE

The configuration parameter holding the table name for the generated id

public static final String
TABLES

The configuration parameter holding the table names for all tables for which the id must be unique

Inherited from org.hibernate.id.IdentifierGenerator:
ENTITY_NAME

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

Object an identifying key for this generator
generatorKey
()

Return a key unique to the underlying database objects.

public String[]

Returns:

The create command(s)
sqlCreateStrings
(Dialect
The dialect against which to generate the create command(s)
dialect
)

The SQL required to create the underlying database objects.

public String[]

Returns:

The drop command(s)
sqlDropStrings
(Dialect
The dialect against which to generate the drop command(s)
dialect
)

The SQL required to remove the underlying database objects.

Inherited from org.hibernate.id.IdentifierGenerator:
generate

Field Detail

CATALOGback to summary
public static final String CATALOG

The configuration parameter holding the catalog name

IDENTIFIER_NORMALIZERback to summary
public static final String IDENTIFIER_NORMALIZER

The key under whcih to find the org.hibernate.cfg.ObjectNameNormalizer in the config param map.

PKback to summary
public static final String PK

The configuration parameter holding the primary key column name of the generated id

SCHEMAback to summary
public static final String SCHEMA

The configuration parameter holding the schema name

SQL_STATEMENT_LOGGERback to summary
public static final SQLStatementLogger SQL_STATEMENT_LOGGER
TABLEback to summary
public static final String TABLE

The configuration parameter holding the table name for the generated id

TABLESback to summary
public static final String TABLES

The configuration parameter holding the table names for all tables for which the id must be unique

Method Detail

generatorKeyback to summary
public Object generatorKey()

Return a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.

Returns:Object

Object an identifying key for this generator

sqlCreateStringsback to summary
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException

The SQL required to create the underlying database objects.

Parameters
dialect:Dialect

The dialect against which to generate the create command(s)

Returns:String[]

The create command(s)

Exceptions
HibernateException:
problem creating the create command(s)
sqlDropStringsback to summary
public String[] sqlDropStrings(Dialect dialect) throws HibernateException

The SQL required to remove the underlying database objects.

Parameters
dialect:Dialect

The dialect against which to generate the drop command(s)

Returns:String[]

The drop command(s)

Exceptions
HibernateException:
problem creating the drop command(s)