Package org.jumpmind.symmetric.db.h2
Class H2Trigger
java.lang.Object
org.jumpmind.symmetric.db.AbstractEmbeddedTrigger
org.jumpmind.symmetric.db.h2.H2Trigger
- All Implemented Interfaces:
org.h2.api.Trigger
-
Field Summary
FieldsFields inherited from class org.jumpmind.symmetric.db.AbstractEmbeddedTrigger
DATE_FORMATTER, HEX, KEY_CONDITION_SQL, KEY_INSERT_DATA_SQL, schemaName, TEMPLATE_TABLE_SUFFIX, templates, triggerNameFields inherited from interface org.h2.api.Trigger
DELETE, INSERT, SELECT, UPDATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected StringfillVirtualTableSql(String sql, Object[] oldRow, Object[] newRow) voidinit(Connection conn, String schemaName, String triggerName, String tableName, boolean before, int type) This method is called by the database engine once when initializing the trigger.voidremove()Methods inherited from class org.jumpmind.symmetric.db.AbstractEmbeddedTrigger
appendVirtualTableStringValue, convertBytesToString, convertBytesToString, escapeString, fire, getTemplates, init, readBytesAndClose, readStringAndCloseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2.api.Trigger
fire
-
Field Details
-
TRANSACTION_FUNCTION
- See Also:
-
-
Constructor Details
-
H2Trigger
public H2Trigger()
-
-
Method Details
-
init
public void init(Connection conn, String schemaName, String triggerName, String tableName, boolean before, int type) throws SQLException This method is called by the database engine once when initializing the trigger.- Specified by:
initin interfaceorg.h2.api.Trigger- Parameters:
conn- a connection to the databaseschemaName- the name of the schematriggerName- the name of the trigger used in the CREATE TRIGGER statementtableName- the name of the tablebefore- whether the fire method is called before or after the operation is performedtype- the operation type: INSERT, UPDATE, or DELETE- Throws:
SQLException
-
close
- Specified by:
closein interfaceorg.h2.api.Trigger- Throws:
SQLException
-
remove
- Specified by:
removein interfaceorg.h2.api.Trigger- Throws:
SQLException
-
fillVirtualTableSql
protected String fillVirtualTableSql(String sql, Object[] oldRow, Object[] newRow) throws SQLException - Overrides:
fillVirtualTableSqlin classAbstractEmbeddedTrigger- Throws:
SQLException
-