|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.raw.GenericStorableCodecFactory
public class GenericStorableCodecFactory
Factory for generic codec that supports any kind of storable by auto-generating and caching storable implementations.
| Constructor Summary | |
|---|---|
GenericStorableCodecFactory()
|
|
| Method Summary | ||
|---|---|---|
|
createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout)
|
|
|
createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout,
RawSupport support)
|
|
protected
|
createStrategy(Class<S> type,
StorableIndex<S> pkIndex)
Override to return a different EncodingStrategy. |
|
protected
|
createStrategy(Class<S> type,
StorableIndex<S> pkIndex,
LayoutOptions options)
Override to return a different EncodingStrategy. |
|
LayoutOptions |
getLayoutOptions(Class<? extends Storable> type)
Returns null. |
|
String |
getStorageName(Class<? extends Storable> type)
Returns null to let repository decide what the name should be. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericStorableCodecFactory()
| Method Detail |
|---|
public String getStorageName(Class<? extends Storable> type)
throws SupportException
getStorageName in interface StorableCodecFactorySupportException - if type is not supportedpublic LayoutOptions getLayoutOptions(Class<? extends Storable> type)
getLayoutOptions in interface StorableCodecFactory
public <S extends Storable> GenericStorableCodec<S> createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout)
throws SupportException
createCodec in interface StorableCodecFactorytype - 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 supported
public <S extends Storable> GenericStorableCodec<S> createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout,
RawSupport support)
throws SupportException
createCodec in interface StorableCodecFactorytype - 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 layer
SupportException - if type is not supported
protected <S extends Storable> GenericEncodingStrategy<S> createStrategy(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(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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||