public class LayoutFactory extends java.lang.Object implements LayoutCapability
Modifier and Type | Field and Description |
---|---|
static int |
VERSION |
Constructor and Description |
---|
LayoutFactory(Repository repo) |
Modifier and Type | Method and Description |
---|---|
Layout |
layoutFor(boolean readOnly,
java.lang.Class<? extends Storable> type,
LayoutOptions options)
Returns the layout matching the current definition of the given type.
|
Layout |
layoutFor(java.lang.Class<? extends Storable> type)
Returns the layout matching the current definition of the given type.
|
Layout |
layoutFor(java.lang.Class<? extends Storable> type,
int generation)
Returns the layout for a particular generation of the given type.
|
Layout |
layoutFor(java.lang.Class<? extends Storable> type,
LayoutOptions options)
Returns the layout matching the current definition of the given type.
|
Layout |
readLayoutFrom(java.io.InputStream in)
Read a layout as written by
Layout.writeTo(java.io.OutputStream) . |
public static final int VERSION
public LayoutFactory(Repository repo) throws RepositoryException
SupportException
- if underlying repository
does not support the storables for persisting storable layoutsRepositoryException
public Layout layoutFor(java.lang.Class<? extends Storable> type) throws FetchException, PersistException
layoutFor
in interface LayoutCapability
PersistException
- if type represents a new generation, but
persisting this information failedFetchException
public Layout layoutFor(java.lang.Class<? extends Storable> type, LayoutOptions options) throws FetchException, PersistException
PersistException
- if type represents a new generation, but
persisting this information failedFetchException
public Layout layoutFor(boolean readOnly, java.lang.Class<? extends Storable> type, LayoutOptions options) throws FetchException, PersistException
readOnly
- if true, don't attempt to persist new generation because
underlying repository is read-onlyPersistException
- if type represents a new generation, but
persisting this information failedFetchException
public Layout layoutFor(java.lang.Class<? extends Storable> type, int generation) throws FetchException, FetchNoneException
layoutFor
in interface LayoutCapability
generation
- desired generationFetchNoneException
- if generation not foundFetchException
public Layout readLayoutFrom(java.io.InputStream in) throws java.io.IOException, RepositoryException
Layout.writeTo(java.io.OutputStream)
.java.io.IOException
RepositoryException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.