|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.services.jdbc.JDBCServicesAdministrator
com.ibm.btt.services.jdbc.JDBCJournalSchemaGenerator
public class JDBCJournalSchemaGenerator
Field Summary | |
---|---|
boolean |
createIndex
Keeps the createIndex attribute value. |
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. |
static boolean |
recIdFromTable
Keeps the recIdFromTable 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. |
static java.lang.String |
schemaName
Keeps the journal schema name |
static java.lang.String |
tableSpaceName
Keeps the table space name where the electronic journal tables have to be created. |
static boolean |
userDefaultSchema
Keeps the userDefaultSchema attribute value. |
Fields inherited from class com.ibm.btt.services.jdbc.JDBCServicesAdministrator |
---|
COMPID, databaseConnection, getSchemaSem |
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. |
void |
connect(java.lang.String aDatabaseURL)
Connects to the database with URL aDatabaseURL. |
void |
connect(java.lang.String aDatabaseURL,
java.lang.String aUser,
java.lang.String aPassword)
Connects to the database using aDatabaseURL, aUser, and aPassword. |
protected static java.lang.String |
controlTableName(java.lang.String aSchemaName)
Returns the name of the control table for the aSchemaName schema. |
protected static DatabaseResultSetMetaData |
currentJournalTableColumnData(java.lang.String aSchemaName)
Returns the DatabaseResultSetMetaData instance that contains column information for the journal table. |
protected java.lang.String |
currentJournalTableDefinition(java.lang.String aSchemaName)
Calls the currentJournalTableColumnsData method to get the DatabaseResultSetMetaData instance for the aSchemaName schema. |
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 |
getSchemaName()
Returns the schemaName attribute value. |
boolean |
isCreateIndex()
Returns true if the application has requested to create indexes on the journal tables. |
static boolean |
isRecIdFromTable()
Returns the recIdFromTable. |
boolean |
isUserDefaultSchema()
Returns true if the tables are going to be created in the default schema defined in the DBMS for the user requesting the database connection. |
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 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 |
setCreateIndex(boolean newCreateIndex)
Sets the createIndex attribute value to newCreateIndex. |
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. |
static void |
setRecIdFromTable(boolean recIdFromTable)
Sets the recIdFromTable. |
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. |
void |
setTableSpaceName(java.lang.String newTableSpaceName)
Sets the tableSpace where journal tables have to be created. |
void |
setUserDefaultSchema(boolean newUserDefaultSchema)
Sets the userDefaultSchema attribute value to newUserDefaultSchema. |
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.btt.services.jdbc.JDBCServicesAdministrator |
---|
disconnect, dropProcedure, getConnectionManager, 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 static java.lang.String schemaName
public static boolean createSchema
public java.lang.String databaseName
public java.lang.String indexName
public boolean createIndex
public static boolean userDefaultSchema
public static java.lang.String tableSpaceName
public static boolean recIdFromTable
Constructor Detail |
---|
public JDBCJournalSchemaGenerator()
public JDBCJournalSchemaGenerator(java.lang.String aSchemaName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aSchemaName
- java.lang.String the name of the Schema
DSEInvalidArgumentException
- if the Schema name is not valid
DSEInvalidRequestException
- if the Schema already exists
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- when a SQL Exception is caughtMethod 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
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic Vector allEntities() throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic 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 database
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void connect(java.lang.String aDatabaseURL) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException
connect
in class JDBCServicesAdministrator
aDatabaseURL
- java.lang.String the database URL
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException
connect
in class JDBCServicesAdministrator
aDatabaseURL
- java.lang.String, the database URLaUser
- java.lang.String the user identificationaPassword
- java.lang.String the user password
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected static java.lang.String controlTableName(java.lang.String aSchemaName)
aSchemaName
- java.lang.String the name of the journal schemaprotected static DatabaseResultSetMetaData currentJournalTableColumnData(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String, the journal schema name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected java.lang.String currentJournalTableDefinition(java.lang.String aSchemaName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aSchemaName
- java.lang.String the journal schema Name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void generateSchema(Vector aListOfEntities, int nbrOfGenerations, java.lang.String aTableDefinition) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException, DSEInternalErrorException, java.sql.SQLException
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
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caught
java.sql.SQLException
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 name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic 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
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic java.lang.String getSchemaName()
public boolean isCreateIndex()
public boolean isUserDefaultSchema()
public java.lang.String journalTableDefinition() throws DSEException
DSEException
- if a DSEException occurspublic void loadDriver() throws DSEInternalErrorException
DSEInternalErrorException
- if an internal program error occurspublic void loadDriver(java.lang.String aDriverName) throws DSEInternalErrorException
aDriverName
- java.lang.String, the driver name (full path)
DSEInternalErrorException
- if an internal program error occurspublic int numberOfGenerations() throws DSEInvalidRequestException, DSESQLException, DSEInternalErrorException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic 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
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void removeAllEntities(java.lang.String aSchemaName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aSchemaName
- java.lang.String the name of the journal schema
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void removeEntity(java.lang.String anEntityName) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException
anEntityName
- java.lang.String the entity name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic 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
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void removeSchema(java.lang.String aSchemaName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aSchemaName
- java.lang.String the name of the journal schema
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void setCreateIndex(boolean newCreateIndex)
newCreateIndex
- booleanpublic 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.Stringpublic void setUserDefaultSchema(boolean newUserDefaultSchema)
newUserDefaultSchema
- booleanpublic void setTableSpaceName(java.lang.String newTableSpaceName)
newTableSpaceName
- Stringprotected 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
public static boolean isRecIdFromTable()
public static void setRecIdFromTable(boolean recIdFromTable)
recIdFromTable
- The recIdFromTable to set
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |