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, triggerName
Fields inherited from interface org.h2.api.Trigger
DELETE, INSERT, SELECT, UPDATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected String
fillVirtualTableSql
(String sql, Object[] oldRow, Object[] newRow) void
init
(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.void
remove()
Methods inherited from class org.jumpmind.symmetric.db.AbstractEmbeddedTrigger
appendVirtualTableStringValue, convertBytesToString, convertBytesToString, escapeString, fire, getTemplates, init, readBytesAndClose, readStringAndClose
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
init
in 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:
close
in interfaceorg.h2.api.Trigger
- Throws:
SQLException
-
remove
- Specified by:
remove
in interfaceorg.h2.api.Trigger
- Throws:
SQLException
-
fillVirtualTableSql
protected String fillVirtualTableSql(String sql, Object[] oldRow, Object[] newRow) throws SQLException - Overrides:
fillVirtualTableSql
in classAbstractEmbeddedTrigger
- Throws:
SQLException
-