| java.lang.Object com.sleepycat.persist.evolve.Mutation com.sleepycat.persist.evolve.Converter
All known Subclasses: com.sleepycat.persist.evolve.EntityConverter,
Converter | public class Converter extends Mutation (Code) | | 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.
//
class Person {
// ...
}
// The new class. A new version number must be assigned.
//
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
Mutations here .
See
Conversion for more information.
See Also: com.sleepycat.persist.evolve See Also: Class Evolution author: Mark Hayes |
Constructor Summary | |
public | 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. | public | 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. |
Converter | public Converter(String className, int classVersion, Conversion conversion)(Code) | | Creates a mutation for converting all instances of the given class
version to the current version of the class.
|
Converter | public Converter(String declaringClassName, int declaringClassVersion, String fieldName, Conversion conversion)(Code) | | 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.
|
equals | public boolean equals(Object other)(Code) | | Returns true if the conversion objects are equal in this object and
given object, and if the
Mutation.equals superclass method
returns true.
|
getConversion | public Conversion getConversion()(Code) | | Returns the converter instance specified to the constructor.
|
hashCode | public int hashCode()(Code) | | |
|
|