public final class MasterStorableGenerator<S extends Storable>
extends java.lang.Object
Storable
types
suitable for use by master repositories. The generated classes extend those
generated by StorableGenerator
. Subclasses need not worry about
transactions since this class takes care of that.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DO_TRY_DELETE_MASTER_METHOD_NAME
Name of protected abstract method in generated storable
|
static java.lang.String |
DO_TRY_INSERT_MASTER_METHOD_NAME
Name of protected abstract method in generated storable
|
static java.lang.String |
DO_TRY_LOAD_MASTER_METHOD_NAME
Name of protected abstract method in generated storable
|
static java.lang.String |
DO_TRY_UPDATE_MASTER_METHOD_NAME
Name of protected abstract method in generated storable
|
Modifier and Type | Method and Description |
---|---|
static <S extends Storable> |
getAbstractClass(java.lang.Class<S> type,
java.util.EnumSet<MasterFeature> features)
Returns an abstract implementation of the given Storable type, which
is fully thread-safe.
|
public static final java.lang.String DO_TRY_LOAD_MASTER_METHOD_NAME
public static final java.lang.String DO_TRY_INSERT_MASTER_METHOD_NAME
public static final java.lang.String DO_TRY_UPDATE_MASTER_METHOD_NAME
public static final java.lang.String DO_TRY_DELETE_MASTER_METHOD_NAME
public static <S extends Storable> java.lang.Class<? extends S> getAbstractClass(java.lang.Class<S> type, java.util.EnumSet<MasterFeature> features) throws SupportException, java.lang.IllegalArgumentException
public <init>(MasterSupport);Subclasses must implement the following abstract protected methods, whose exact names are defined by constants in this class:
// Load the object by examining the primary key. protected abstract boolean doTryLoad() throws FetchException; // Insert the object into the storage layer. protected abstract boolean doTryInsert_master() throws PersistException; // Update the object in the storage. protected abstract boolean doTryUpdate_master() throws PersistException; // Delete the object from the storage layer by the primary key. protected abstract boolean doTryDelete_master() throws PersistException;Subclasses can access the MasterSupport instance via the protected field named by
SUPPORT_FIELD_NAME
.MalformedTypeException
- if Storable type is not well-formedjava.lang.IllegalArgumentException
- if type is nullSupportException
MasterSupport
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.