public class GenericStorableCodecFactory extends java.lang.Object implements StorableCodecFactory
Constructor and Description |
---|
GenericStorableCodecFactory() |
Modifier and Type | Method and Description |
---|---|
<S extends Storable> |
createCodec(java.lang.Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout) |
<S extends Storable> |
createCodec(java.lang.Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout,
RawSupport support) |
protected <S extends Storable> |
createStrategy(java.lang.Class<S> type,
StorableIndex<S> pkIndex)
Override to return a different EncodingStrategy.
|
protected <S extends Storable> |
createStrategy(java.lang.Class<S> type,
StorableIndex<S> pkIndex,
LayoutOptions options)
Override to return a different EncodingStrategy.
|
LayoutOptions |
getLayoutOptions(java.lang.Class<? extends Storable> type)
Returns null.
|
java.lang.String |
getStorageName(java.lang.Class<? extends Storable> type)
Returns null to let repository decide what the name should be.
|
public java.lang.String getStorageName(java.lang.Class<? extends Storable> type) throws SupportException
getStorageName
in interface StorableCodecFactory
SupportException
- if type is not supportedpublic LayoutOptions getLayoutOptions(java.lang.Class<? extends Storable> type)
getLayoutOptions
in interface StorableCodecFactory
public <S extends Storable> GenericStorableCodec<S> createCodec(java.lang.Class<S> type, StorableIndex pkIndex, boolean isMaster, Layout layout) throws SupportException
createCodec
in interface StorableCodecFactory
type
- type of storable to create codec forpkIndex
- suggested index for primary key (optional)isMaster
- when true, version properties and sequences are managedlayout
- when non-null, encode a storable layout generation
value in one or four bytes. Generation 0..127 is encoded in one byte, and
128..max is encoded in four bytes, with the most significant bit set.SupportException
- if type is not supportedpublic <S extends Storable> GenericStorableCodec<S> createCodec(java.lang.Class<S> type, StorableIndex pkIndex, boolean isMaster, Layout layout, RawSupport support) throws SupportException
createCodec
in interface StorableCodecFactory
type
- type of storable to create codec forpkIndex
- suggested index for primary key (optional)isMaster
- when true, version properties and sequences are managedlayout
- when non-null, encode a storable layout generation
value in one or four bytes. Generation 0..127 is encoded in one byte, and
128..max is encoded in four bytes, with the most significant bit set.support
- binds generated storable with a storage layerSupportException
- if type is not supportedprotected <S extends Storable> GenericEncodingStrategy<S> createStrategy(java.lang.Class<S> type, StorableIndex<S> pkIndex) throws SupportException
type
- type of Storable to generate code forpkIndex
- specifies sequence and ordering of key properties (optional)SupportException
protected <S extends Storable> GenericEncodingStrategy<S> createStrategy(java.lang.Class<S> type, StorableIndex<S> pkIndex, LayoutOptions options) throws SupportException
type
- type of Storable to generate code forpkIndex
- specifies sequence and ordering of key properties (optional)options
- additional layout options (optional)SupportException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.