| java.lang.Object com.sleepycat.persist.evolve.Mutations
Mutations | public class Mutations implements Serializable(Code) | | A collection of mutations for configuring class evolution.
Mutations are configured when a store is opened via
StoreConfig.setMutations StoreConfig.setMutations . For example:
Mutations mutations = new Mutations();
// Add mutations...
StoreConfig config = new StoreConfig();
config.setMutations(mutations);
EntityStore store = new EntityStore(env, "myStore", config);
Mutations cause data conversion to occur lazily as instances are read
from the store. The
EntityStore.evolve EntityStore.evolve method
may also be used to perform eager conversion.
Not all incompatible class changes can be handled via mutations. For
example, complex refactoring may require a transformation that manipulates
multiple entity instances at once. Such changes are not possible with
mutations but can made by performing a store conversion.
See Also: com.sleepycat.persist.evolve See Also: Class Evolution author: Mark Hayes |
Constructor Summary | |
public | Mutations() Creates an empty set of mutations. |
Method Summary | |
public void | addConverter(Converter converter) Adds a converter mutation. | public void | addDeleter(Deleter deleter) Adds a deleter mutation. | public void | addRenamer(Renamer renamer) Adds a renamer mutation. | public boolean | equals(Object other) Returns true if this collection has the same set of mutations as the
given collection and all mutations are equal. | public Converter | getConverter(String className, int classVersion, String fieldName) Returns the converter mutation for the given class, version and field,
or null if none exists. | public Collection<Converter> | getConverters() Returns an unmodifiable collection of all converter mutations. | public Deleter | getDeleter(String className, int classVersion, String fieldName) Returns the deleter mutation for the given class, version and field, or
null if none exists. | public Collection<Deleter> | getDeleters() Returns an unmodifiable collection of all deleter mutations. | public Renamer | getRenamer(String className, int classVersion, String fieldName) Returns the renamer mutation for the given class, version and field, or
null if none exists. | public Collection<Renamer> | getRenamers() Returns an unmodifiable collection of all renamer mutations. | public int | hashCode() | public boolean | isEmpty() Returns true if no mutations are present. | public String | toString() |
Mutations | public Mutations()(Code) | | Creates an empty set of mutations.
|
addConverter | public void addConverter(Converter converter)(Code) | | Adds a converter mutation.
|
addDeleter | public void addDeleter(Deleter deleter)(Code) | | Adds a deleter mutation.
|
addRenamer | public void addRenamer(Renamer renamer)(Code) | | Adds a renamer mutation.
|
equals | public boolean equals(Object other)(Code) | | Returns true if this collection has the same set of mutations as the
given collection and all mutations are equal.
|
getConverter | public Converter getConverter(String className, int classVersion, String fieldName)(Code) | | Returns the converter mutation for the given class, version and field,
or null if none exists. A null field name should be specified to get a
class converter.
|
getConverters | public Collection<Converter> getConverters()(Code) | | Returns an unmodifiable collection of all converter mutations.
|
getDeleter | public Deleter getDeleter(String className, int classVersion, String fieldName)(Code) | | Returns the deleter mutation for the given class, version and field, or
null if none exists. A null field name should be specified to get a
class deleter.
|
getDeleters | public Collection<Deleter> getDeleters()(Code) | | Returns an unmodifiable collection of all deleter mutations.
|
getRenamer | public Renamer getRenamer(String className, int classVersion, String fieldName)(Code) | | Returns the renamer mutation for the given class, version and field, or
null if none exists. A null field name should be specified to get a
class renamer.
|
getRenamers | public Collection<Renamer> getRenamers()(Code) | | Returns an unmodifiable collection of all renamer mutations.
|
hashCode | public int hashCode()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | Returns true if no mutations are present.
|
|
|