From c90dfdf1c79371fd2102dd83c01503572a373518 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 29 Mar 2007 17:23:05 +0000 Subject: Update comments. --- src/main/java/com/amazon/carbonado/Sequence.java | 9 +++++---- src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java | 4 +++- src/main/java/com/amazon/carbonado/spi/MasterFeature.java | 5 ++++- src/main/java/com/amazon/carbonado/spi/StoredSequence.java | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/amazon/carbonado/Sequence.java b/src/main/java/com/amazon/carbonado/Sequence.java index a810e39..ada2ace 100644 --- a/src/main/java/com/amazon/carbonado/Sequence.java +++ b/src/main/java/com/amazon/carbonado/Sequence.java @@ -21,10 +21,10 @@ package com.amazon.carbonado; import java.lang.annotation.*; /** - * Identifies a {@link Storable} property capable of selecting its own value - * on insert, by a named sequence. Sequences are supported at the storage - * layer, and implementions that do not support sequences ignore this - * annotation. + * Identifies a {@link Storable} property capable of selecting its own value on + * insert, by a named sequence. Support for sequences is repository dependent, + * and if not supported, a {@link PersistException} is thrown when trying to + * insert. Explicitly specifying a value bypasses the sequence altogether. * *

Example:

  * @PrimaryKey("userInfoID")
@@ -38,6 +38,7 @@ import java.lang.annotation.*;
  * 
* * @author Brian S O'Neill + * @see Automatic */ @Documented @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java b/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java index 2e42d8e..4b5ac5f 100644 --- a/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java +++ b/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java @@ -70,7 +70,9 @@ class LobEngineTrigger extends Trigger { } public void afterInsert(S storable, Object state) throws PersistException { - // Save user lob value contents into new lobs. + // Save user lob value contents into new lobs. This is done after the + // insert of the enclosing record to avoid an expensive rollback if a + // constraint violation is detected. Object[] userLobs = (Object[]) state; int length = mLobProperties.length; for (int i=0; i