|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.evolve.Mutation
com.sleepycat.persist.evolve.Conversion
public class Conversion
A mutation for converting an old version of an object value to conform to the current class definition. For example:
package my.package;
// The old class. Version 0 is implied.
//
@Entity
class Person {
// ...
}
// The new class. A new version number must be assigned.
//
@Entity(version=1)
class Person {
// Incompatible changes were made here...
}
// Add a conversion mutation.
//
Mutations mutations = new Mutations();
mutations.addConversion(new Conversion(Person.class.getName(), 0,
new MyConverter()));
// Configure the mutations as described here
.
See Converter
for more information.
Constructor Summary | |
---|---|
Conversion(java.lang.String className,
int classVersion,
Converter converter)
Creates a mutation for converting all instances of the given class version. |
|
Conversion(java.lang.String declaringClassName,
int declaringClassVersion,
java.lang.String fieldName,
Converter converter)
Creates a mutation for converting all values of the given field in the given class version. |
Method Summary | |
---|---|
Converter |
getConverter()
Returns the converter instance specified in the constructor. |
Methods inherited from class com.sleepycat.persist.evolve.Mutation |
---|
getClassName, getClassVersion, getFieldName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Conversion(java.lang.String className, int classVersion, Converter converter)
public Conversion(java.lang.String declaringClassName, int declaringClassVersion, java.lang.String fieldName, Converter converter)
Method Detail |
---|
public Converter getConverter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |