diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-08-26 01:11:29 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-08-26 01:11:29 +0000 |
commit | 00adea5bc6916b717132c72768ab3fea1b2a1a22 (patch) | |
tree | ba923df8ea6fcd0ebb17557cea16c355274a43ce /src/main/java/com/amazon/carbonado/repo/jdbc | |
parent | 3c0acb2e614373452107aa54066d3398a54f338e (diff) |
Added support for load and query trigger.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/jdbc')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | 5 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java index 2f1c35c..c8f636c 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java @@ -208,9 +208,10 @@ class JDBCStorableGenerator<S extends Storable> { b.invokePrivate(EXTRACT_ALL_METHOD_NAME, null,
new TypeDesc[] {resultSetType, TypeDesc.INT});
- // Indicate that object is clean by calling markAllPropertiesClean.
+ // Indicate load completed in order to mark properties as valid and
+ // invoke load triggers.
b.loadThis();
- b.invokeVirtual(MARK_ALL_PROPERTIES_CLEAN, null, null);
+ b.invokeVirtual(StorableGenerator.LOAD_COMPLETED_METHOD_NAME, null, null);
b.returnVoid();
}
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index fd36c6e..19a6bab 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -189,6 +189,18 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> return mTriggerManager.getDeleteTrigger();
}
+ public Trigger<? super S> getLoadTrigger() {
+ return mTriggerManager.getLoadTrigger();
+ }
+
+ public void locallyDisableLoadTrigger() {
+ mTriggerManager.locallyDisableLoad();
+ }
+
+ public void locallyEnableLoadTrigger() {
+ mTriggerManager.locallyEnableLoad();
+ }
+
/**
* @param loader used to reload Blob outside original transaction
*/
|