|
Berkeley DB version 5.3.21 |
|||||||||
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.Converter
public class Converter
A mutation for converting an old version of an object value to conform to the current class or field 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 converter mutation.
//
Mutations mutations = new Mutations();
mutations.addConverter(new Converter(Person.class.getName(), 0,
new MyConversion()));
// Configure the mutations as described here
.
See Conversion
for more information.
Class Evolution
,
Serialized FormConstructor Summary | |
---|---|
Converter(String className,
int classVersion,
Conversion conversion)
Creates a mutation for converting all instances of the given class version to the current version of the class. |
|
Converter(String declaringClassName,
int declaringClassVersion,
String fieldName,
Conversion conversion)
Creates a mutation for converting all values of the given field in the given class version to a type compatible with the current declared type of the field. |
Method Summary | |
---|---|
boolean |
equals(Object other)
Returns true if the conversion objects are equal in this object and given object, and if the Mutation.equals(java.lang.Object) superclass method
returns true. |
Conversion |
getConversion()
Returns the converter instance specified to the constructor. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class com.sleepycat.persist.evolve.Mutation |
---|
getClassName, getClassVersion, getFieldName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Converter(String className, int classVersion, Conversion conversion)
public Converter(String declaringClassName, int declaringClassVersion, String fieldName, Conversion conversion)
Method Detail |
---|
public Conversion getConversion()
public boolean equals(Object other)
Mutation.equals(java.lang.Object)
superclass method
returns true.
equals
in class Mutation
public int hashCode()
hashCode
in class Mutation
public String toString()
toString
in class Mutation
|
Berkeley DB version 5.3.21 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |