final class LocalTempTableHelper extends TempTableHelper
This class is responsible for local temporary tables support: the created tables and indices will be local to the session which created them.
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOG
Logger
|
database, schema, UNIQUE_SUFFIX_KEY
Constructor and Description |
---|
LocalTempTableHelper(P2JDialect dialect,
java.lang.Class<?> dmoIface)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.String> |
generateSQLCreateIndexList(P2JDialect dialect,
java.lang.Class<?> dmoIface,
org.hibernate.mapping.Table primary,
java.util.List<org.hibernate.mapping.Table> secondaries,
java.util.Iterator<P2JIndex> iter)
Populate the list of dialect-specific SQL statements used to create
any indexes required by the temp table(s).
|
protected java.util.List<java.lang.String> |
generateSQLDropIndexList(P2JDialect dialect,
java.lang.Class<?> dmoIface,
org.hibernate.mapping.Table primary,
java.util.List<org.hibernate.mapping.Table> secondaries,
java.util.Iterator<P2JIndex> iter)
Populate the list of dialect-specific SQL statements used to drop
any indexes required by the temp table(s).
|
protected java.lang.String |
getAdditionalIndexSuffix()
This method will return an additional suffix to make the index unique
across sessions.
|
protected java.util.Map<java.lang.String,P2JIndexComponent> |
getComputedCols(java.lang.String schema,
java.lang.Class<?> dmoIface)
This method which will return the computed columns for the required
DMO, as retrieved from the dmo_index.xml file.
|
protected java.lang.String |
getCreateTableStatement()
This method will return the needed create table string, which is the
"create local temporary table" string.
|
protected java.util.Iterator<P2JIndex> |
getIndexes(java.lang.String schema,
java.lang.Class<?> dmoIface)
This method will return the indexes associated with a certain DMO, as
retrieved from the dmo_index.xml file.
|
protected boolean |
isNotNullAllowed()
Indicate whether non-nullable columns are permitted.
|
generateSQLCreateIndex, generateSQLDropIndex, generateSQLDropTableList, get, getComputedCols, getTableName, sqlTempTableCreate, sqlTempTableDrop, sqlTempTableIndexCreate, sqlTempTableIndexDrop
LocalTempTableHelper(P2JDialect dialect, java.lang.Class<?> dmoIface)
dialect
- Hibernate database dialect helper.dmoIface
- DMO interface which provides the public API to the temp
table.protected java.lang.String getCreateTableStatement()
getCreateTableStatement
in class TempTableHelper
protected java.lang.String getAdditionalIndexSuffix()
getAdditionalIndexSuffix
in class TempTableHelper
protected java.util.List<java.lang.String> generateSQLCreateIndexList(P2JDialect dialect, java.lang.Class<?> dmoIface, org.hibernate.mapping.Table primary, java.util.List<org.hibernate.mapping.Table> secondaries, java.util.Iterator<P2JIndex> iter)
If there are no indices for the required table, a statement to create an
index for the multiplex
column
will be created.
generateSQLCreateIndexList
in class TempTableHelper
dialect
- Hibernate database dialect helper.dmoIface
- DMO interface which provides the public API to the temp
table.primary
- Hibernate database table configuration for primary temp
table.secondaries
- Optional list of Hibernate database table configurations
for secondary temp tables. These are the tables which
support temp table fields with extents, if any. May be
null
if no such tables exist.iter
- The iterator for the collection which contains the needed
indices.protected java.util.List<java.lang.String> generateSQLDropIndexList(P2JDialect dialect, java.lang.Class<?> dmoIface, org.hibernate.mapping.Table primary, java.util.List<org.hibernate.mapping.Table> secondaries, java.util.Iterator<P2JIndex> iter)
If there are no indexes for the required table, a statement to drop the
index associated with the multiplex column
will be created.
generateSQLDropIndexList
in class TempTableHelper
dialect
- Hibernate database dialect helper.dmoIface
- DMO interface which provides the public API to the temp
table.primary
- Hibernate database table configuration for primary temp
table.secondaries
- Optional list of Hibernate database table configurations
for secondary temp tables. These are the tables which
support temp table fields with extents, if any. May be
null
if no such tables exist.iter
- The iterator for the collection which contains the needed
indexes.protected java.util.Map<java.lang.String,P2JIndexComponent> getComputedCols(java.lang.String schema, java.lang.Class<?> dmoIface)
getComputedCols
in class TempTableHelper
schema
- The schema used for this DMO.dmoIface
- The DMO for which to retrieve the computed columns.protected java.util.Iterator<P2JIndex> getIndexes(java.lang.String schema, java.lang.Class<?> dmoIface)
getIndexes
in class TempTableHelper
schema
- The schema used for this DMO.dmoIface
- The DMO for which to retrieve the indexes.protected boolean isNotNullAllowed()
isNotNullAllowed
in class TempTableHelper
true
if non-nullable columns are permitted, else false
.