|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.dse.services.jdbc.JDBCServicesAdministrator
|
+--com.ibm.dse.services.jdbc.JDBCJournalSchemaGenerator
The JDBCJournalSchemaGenerator class is responsible for creating, modifying, and removing all of the JDBCJournal Tables and the associated Control Tables.
| Field Summary | |
static boolean |
createSchema
Keeps the createSchema attribute value. |
java.lang.String |
databaseName
Keeps the databaseName attribute value. |
java.lang.String |
indexName
Keeps the indexName attribute value. |
int |
requestedNumberOfGenerations
Keeps the number of generations for the journal schema |
java.lang.String |
requestedTableDefinition
Keeps the journal tables definition in SQL format |
java.lang.String |
schemaName
Keeps the journal schema name |
| Fields inherited from class com.ibm.dse.services.jdbc.JDBCServicesAdministrator |
COMPID,
databaseConnection |
| Constructor Summary | |
JDBCJournalSchemaGenerator()
This constructor creates a JDBCJournalSchemaGenerator object. |
|
JDBCJournalSchemaGenerator(java.lang.String aSchemaName)
This constructor creates a JDBCJournalSchemaGenerator object for the specified schema. |
|
| Method Summary | |
void |
addEntity(java.lang.String anEntityName)
Adds a new entity in the journal schema definition. |
Vector |
allEntities()
Returns a vector with the entities defined for the current journal schema. |
static Vector |
allEntities(java.lang.String aSchemaName,
boolean schemaInDatabase)
Returns a Vector with the entities names defined for the journal schema aSchemaName. |
protected static java.lang.String |
controlTableName(java.lang.String aSchemaName)
Returns the name of the control table for the schema name aSchemaName. |
protected static DatabaseResultSetMetaData |
currentJournalTableColumnData(java.lang.String aSchemaName)
Returns the DatabaseResultSetMetaData instance that contains the journal table columns information. |
protected java.lang.String |
currentJournalTableDefinition(java.lang.String aSchemaName)
Calls the currentJournalTableColumnsData method to get the DatabaseResultSetMetaData instance for the schema aSchemaName. |
void |
generateSchema(Vector aListOfEntities,
int nbrOfGenerations,
java.lang.String aTableDefinition)
Generates the journal schema with a schema name previously set or the default database schema name (set in the JournalConstants class in attribute DEFAULT_SCHEMA_NAME). |
void |
generateSchema(Vector aListOfEntities,
int nbrOfGenerations,
java.lang.String aTableDefinition,
java.lang.String aSchemaName)
Generates the journal schema with name aSchemaName in the currently connected database. |
java.lang.String |
getDatabaseName()
Returns the databaseName attribute. |
java.lang.String |
getIndexName()
Returns the indexName attribute. |
protected static DatabaseResultSetMetaData |
getMetaData(java.lang.String aSchemaName,
boolean schemaInDatabase)
Returns the DatabaseResultSetMetaData instance associated with the schema aSchemaName. |
java.lang.String |
journalTableDefinition()
Returns a string with the SQL definition of the journal tables columns. |
void |
loadDriver()
Loads the JDBC Driver as set in the JournalConstants EJ_DEFAULT_JDBCDRIVER attribute. |
void |
loadDriver(java.lang.String aDriverName)
Loads the JDBC Driver explicitly provided as an argument. |
int |
numberOfGenerations()
Returns the number of journal generations in the journal service definition. |
static int |
numberOfGenerations(java.lang.String aSchemaName,
boolean schemaInDatabase)
Returns the number of journal generations for the schema aSchemaName. |
void |
removeAllEntities(java.lang.String aSchemaName)
Removes all entities for the given journal schema. |
void |
removeEntity(java.lang.String anEntityName)
Removes the entity anEntityName from the current journal schema. |
void |
removeEntity(java.lang.String anEntityName,
java.lang.String aSchemaName)
Removes the entity anEntityName from the journal schema aSchemaName. |
void |
removeSchema(java.lang.String aSchemaName)
Removes a journal schema and all its related journal tables. |
void |
setCreateSchema(boolean newCreateSchema)
Sets the createSchema attribute value to newCreateSchema. |
void |
setDatabaseName(java.lang.String newDatabaseName)
Sets the databaseName attribute value to newDatabaseName. |
void |
setIndexName(java.lang.String newIndexName)
Sets the indexName attribute value to newIndexName. |
void |
setRequestedNumberOfGenerations(int newRequestedNumberOfGenerations)
Sets the requestedNumberOfGenerations attribute value to newRequestedNumberOfGenerations. |
void |
setRequestedTableDefinition(java.lang.String newRequestedTableDefinition)
Sets the requestedTableDefinition attribute value to newRequestedTableDefinition. |
void |
setSchemaName(java.lang.String newSchemaName)
Sets the schemaName attribute value to newSchemaName. |
protected static java.lang.String |
tableName(java.lang.String aSchemaName,
java.lang.String anEntityName,
java.lang.String aGeneration)
Returns the current journal table name. |
| Methods inherited from class com.ibm.dse.services.jdbc.JDBCServicesAdministrator |
connect,
connect,
disconnect,
dropProcedure,
getProcedureMetaData,
isRegistered,
isRegistered,
registerProcedure |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public int requestedNumberOfGenerations
public java.lang.String requestedTableDefinition
public java.lang.String schemaName
public static boolean createSchema
public java.lang.String databaseName
public java.lang.String indexName
| Constructor Detail |
public JDBCJournalSchemaGenerator()
public JDBCJournalSchemaGenerator(java.lang.String aSchemaName)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String the name of the Schema| Method Detail |
public void addEntity(java.lang.String anEntityName)
throws DSESQLException,
DSEInvalidArgumentException,
DSEInternalErrorException,
DSEInvalidRequestException
anEntityName - java.lang.String the name of the entity to be added
public Vector allEntities()
throws DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
public static Vector allEntities(java.lang.String aSchemaName,
boolean schemaInDatabase)
throws DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String, the name of the journal schemaschemaInDatabase - java.lang.String, indicates whether the schema was created in the databaseprotected static java.lang.String controlTableName(java.lang.String aSchemaName)
aSchemaName - java.lang.String, the name of the journal schema
protected static DatabaseResultSetMetaData currentJournalTableColumnData(java.lang.String aSchemaName)
throws DSEInternalErrorException,
DSEInvalidRequestException,
DSEInvalidArgumentException,
DSESQLException
aSchemaName - java.lang.String, the journal schema name
protected java.lang.String currentJournalTableDefinition(java.lang.String aSchemaName)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String, the journal schema Name
public void generateSchema(Vector aListOfEntities,
int nbrOfGenerations,
java.lang.String aTableDefinition)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSESQLException,
DSEInternalErrorException
aListOfEntities - com.ibm.dse.base.Vector, the vector of journal entitiesnbrOfGenerations - int, the number of journal generationsaTableDefinition - java.lang.String, the table definition in SQL format
public void generateSchema(Vector aListOfEntities,
int nbrOfGenerations,
java.lang.String aTableDefinition,
java.lang.String aSchemaName)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSESQLException,
DSEInternalErrorException
aListOfEntities - com.ibm.dse.base.Vector, the vector of journal entitiesnbrOfGenerations - int, the number of journal generationsaTableDefinition - java.lang.String, the table definition in SQL formataSchemaName - java.lang.String, the journal schema namepublic java.lang.String getDatabaseName()
public java.lang.String getIndexName()
protected static DatabaseResultSetMetaData getMetaData(java.lang.String aSchemaName,
boolean schemaInDatabase)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String, the journal schema nameschemaInDatabase - java.lang.String, indicates whether the schema was created in the database
public java.lang.String journalTableDefinition()
throws DSEException
public void loadDriver()
throws DSEInternalErrorException
public void loadDriver(java.lang.String aDriverName)
throws DSEInternalErrorException
aDriverName - java.lang.String, the driver name (full path)
public int numberOfGenerations()
throws DSEInvalidRequestException,
DSESQLException,
DSEInternalErrorException
public static int numberOfGenerations(java.lang.String aSchemaName,
boolean schemaInDatabase)
throws DSEInvalidRequestException,
DSESQLException,
DSEInternalErrorException
aSchemaName - java.lang.String, the journal schema nameschemaInDatabase - java.lang.String, indicates whether the schema was created in the database
public void removeAllEntities(java.lang.String aSchemaName)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String, the name of the journal schema
public void removeEntity(java.lang.String anEntityName)
throws DSEInternalErrorException,
DSEInvalidArgumentException,
DSEInvalidRequestException,
DSESQLException
anEntityName - java.lang.String, the entity name
public void removeEntity(java.lang.String anEntityName,
java.lang.String aSchemaName)
throws DSEInvalidArgumentException,
DSEInvalidRequestException,
DSEInternalErrorException,
DSESQLException
anEntityName - java.lang.String, the entity nameaSchemaName - java.lang.String, the journal schema name
public void removeSchema(java.lang.String aSchemaName)
throws DSEInvalidRequestException,
DSEInvalidArgumentException,
DSEInternalErrorException,
DSESQLException
aSchemaName - java.lang.String, the name of the journal schemapublic void setCreateSchema(boolean newCreateSchema)
newCreateSchema - booleanpublic void setDatabaseName(java.lang.String newDatabaseName)
newDatabaseName - java.lang.Stringpublic void setIndexName(java.lang.String newIndexName)
newIndexName - java.lang.Stringpublic void setRequestedNumberOfGenerations(int newRequestedNumberOfGenerations)
newRequestedNumberOfGenerations - intpublic void setRequestedTableDefinition(java.lang.String newRequestedTableDefinition)
newRequestedTableDefinition - java.lang.Stringpublic void setSchemaName(java.lang.String newSchemaName)
newSchemaName - java.lang.String
protected static java.lang.String tableName(java.lang.String aSchemaName,
java.lang.String anEntityName,
java.lang.String aGeneration)
aSchemaName - java.lang.String, the journal schema nameanEntityName - java.lang.String, the entity nameaGeneration - java.lang.String, the journal generation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||