|
Berkeley DB version 4.8.30 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.persist.evolve.Mutations
public class Mutations
A collection of mutations for configuring class evolution.
Mutations are configured when a store is opened via 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
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.
Class Evolution
,
Serialized FormConstructor Summary | |
---|---|
Mutations()
Creates an empty set of mutations. |
Method Summary | |
---|---|
void |
addConverter(Converter converter)
Adds a converter mutation. |
void |
addDeleter(Deleter deleter)
Adds a deleter mutation. |
void |
addRenamer(Renamer renamer)
Adds a renamer mutation. |
boolean |
equals(Object other)
Returns true if this collection has the same set of mutations as the given collection and all mutations are equal. |
Converter |
getConverter(String className,
int classVersion,
String fieldName)
Returns the converter mutation for the given class, version and field, or null if none exists. |
Collection<Converter> |
getConverters()
Returns an unmodifiable collection of all converter mutations. |
Deleter |
getDeleter(String className,
int classVersion,
String fieldName)
Returns the deleter mutation for the given class, version and field, or null if none exists. |
Collection<Deleter> |
getDeleters()
Returns an unmodifiable collection of all deleter mutations. |
Renamer |
getRenamer(String className,
int classVersion,
String fieldName)
Returns the renamer mutation for the given class, version and field, or null if none exists. |
Collection<Renamer> |
getRenamers()
Returns an unmodifiable collection of all renamer mutations. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if no mutations are present. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Mutations()
Method Detail |
---|
public boolean isEmpty()
public void addRenamer(Renamer renamer)
public Renamer getRenamer(String className, int classVersion, String fieldName)
public Collection<Renamer> getRenamers()
public void addDeleter(Deleter deleter)
public Deleter getDeleter(String className, int classVersion, String fieldName)
public Collection<Deleter> getDeleters()
public void addConverter(Converter converter)
public Converter getConverter(String className, int classVersion, String fieldName)
public Collection<Converter> getConverters()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Berkeley DB version 4.8.30 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |