|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.replication.impl.SpecificDefault org.xmlBlaster.contrib.replication.impl.SpecificDB2
public class SpecificDB2
Field Summary |
---|
Fields inherited from class org.xmlBlaster.contrib.replication.impl.SpecificDefault |
---|
blockLoop, COMMIT_NO, COMMIT_YES, dbMetaHelper, dbPool, info, initialUpdater, isDbWriteable, replacer, replaceVariable, replPrefix, replVersion, ROLLBACK_NO, ROLLBACK_YES, transformer |
Fields inherited from interface org.xmlBlaster.contrib.replication.I_DbSpecific |
---|
NEEDS_PUBLISHER_KEY, WIPEOUT_ALL, WIPEOUT_FUNCTIONS, WIPEOUT_INDEXES, WIPEOUT_NO_TABLES, WIPEOUT_ONLY_TABLES, WIPEOUT_PACKAGES, WIPEOUT_PROCEDURES, WIPEOUT_SEQUENCES, WIPEOUT_SYNONYMS, WIPEOUT_TABLES, WIPEOUT_TRIGGERS, WIPEOUT_VIEWS |
Constructor Summary | |
---|---|
SpecificDB2()
Not doing anything. |
Method Summary | |
---|---|
void |
addSchemaToWatch(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema)
Adds a schema to be watched. |
void |
cleanupSchema(java.lang.String schema,
java.lang.String type,
java.lang.String referencedSchema)
Cleans up the specified schema for the specified type. |
java.lang.String |
createTableTrigger(SqlDescription infoDescription,
TableToWatchInfo tableToWatch)
Creates a string containing the trigger of the table to be watched. |
protected java.lang.String |
createVariableSqlPart(SqlDescription description,
java.lang.String prefix,
boolean containsLongs,
boolean isInsert)
|
java.lang.StringBuffer |
getColumnStatement(SqlColumn colInfoDescription)
Helper method used to construct the CREATE TABLE statement part belonging to a single COLUMN. |
java.lang.String |
getContentFromGuid(java.lang.String guid,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
I_AttributeTransformer transformer)
This is used for cases where it was not possible to retrieve the (new) content of an entry synchronously in the PL/SQL Code. |
void |
init(I_Info info)
|
boolean |
removeTrigger(java.lang.String triggerName,
java.lang.String tableName,
boolean isSchemaTrigger)
If the triggerName is null, then the own schema triggers are deleted. |
protected boolean |
sequenceExists(java.sql.Connection conn,
java.lang.String sequenceName)
|
protected boolean |
triggerExists(java.sql.Connection conn,
java.lang.String triggerName)
|
boolean |
triggerExists(java.sql.Connection conn,
TableToWatchInfo tableToWatch)
Checks wether a trigger really exists or not. |
int |
wipeoutSchema(java.lang.String catalog,
java.lang.String schema,
boolean[] objectsToWipeout)
Cleans up the complete schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpecificDB2()
Method Detail |
---|
protected boolean sequenceExists(java.sql.Connection conn, java.lang.String sequenceName) throws java.lang.Exception
sequenceExists
in class SpecificDefault
java.lang.Exception
protected boolean triggerExists(java.sql.Connection conn, java.lang.String triggerName) throws java.lang.Exception
triggerExists
in class SpecificDefault
java.lang.Exception
public void init(I_Info info) throws java.lang.Exception
init
in interface I_ContribPlugin
init
in class SpecificDefault
java.lang.Exception
I_ContribPlugin.init(I_Info)
public void addSchemaToWatch(java.sql.Connection conn, java.lang.String catalog, java.lang.String schema) throws java.lang.Exception
catalog
- schema
-
Exception.
- Thrown if an exception occurs on the backend. Note that if an
exception occurs you must cleanup the connection since it might become stale.
java.lang.Exception
protected java.lang.String createVariableSqlPart(SqlDescription description, java.lang.String prefix, boolean containsLongs, boolean isInsert)
col
- prefix
- can be 'old' or 'new'
public java.lang.String createTableTrigger(SqlDescription infoDescription, TableToWatchInfo tableToWatch)
I_DbSpecific
public void cleanupSchema(java.lang.String schema, java.lang.String type, java.lang.String referencedSchema)
schema
- can not be null.type
- can be null. If null all types are cleaned up, otherwise only the ones contained in the string will be cleaned up.
For example "table alltriggers" will clean up both 'table' and 'trigger' types. The types must be specified in lowercase.
Allowed types are synonym,trigger,package,procedure,function,view,table,sequence.referencedSchema
- is the schema which is referenced by the object. It only has an effect on triggers where the
owner of the trigger would be the schema but the table on which the trigger resides it the referenced schema. If null, all
schemas referenced are deleted.public java.lang.StringBuffer getColumnStatement(SqlColumn colInfoDescription)
colInfoDescription
-
public boolean removeTrigger(java.lang.String triggerName, java.lang.String tableName, boolean isSchemaTrigger)
isSchemaTrigger
- true if the trigger to be removed is a schema trigger.
public int wipeoutSchema(java.lang.String catalog, java.lang.String schema, boolean[] objectsToWipeout) throws java.lang.Exception
I_DbSpecific
objectsToWipeout
- a boolean[] array containing 9 elements telling wether the specified objects of a certain
type have to be wiped out or not. For the relationship between position and meaning see the static variables.
If you pass null here all object types are wiped out.
java.lang.Exception
public java.lang.String getContentFromGuid(java.lang.String guid, java.lang.String catalog, java.lang.String schema, java.lang.String table, I_AttributeTransformer transformer) throws java.lang.Exception
I_DbSpecific
guid
- the unique Id identifying this entry. This is needed. Can not be nullcatalog
- can be nullschema
- can be nulltable
- must be defined (can not be null).transformer
- An optional plugin
java.lang.Exception
org.xmlBlaster.contrib.replication.I_DbSpecific#getContentFromGuid(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public boolean triggerExists(java.sql.Connection conn, TableToWatchInfo tableToWatch) throws java.lang.Exception
I_DbSpecific
tableToWatch
- The object containing the table to be checked for trigger
java.lang.Exception
- If an exception occurs in the backend.I_DbSpecific.triggerExists(java.sql.Connection, org.xmlBlaster.contrib.replication.TableToWatchInfo)
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |