From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- .../com/sleepycat/persist/evolve/Conversion.html | 540 ++++++++++----------- 1 file changed, 264 insertions(+), 276 deletions(-) (limited to 'docs/java/com/sleepycat/persist/evolve/Conversion.html') diff --git a/docs/java/com/sleepycat/persist/evolve/Conversion.html b/docs/java/com/sleepycat/persist/evolve/Conversion.html index 11bb9c65..d4d7efaa 100644 --- a/docs/java/com/sleepycat/persist/evolve/Conversion.html +++ b/docs/java/com/sleepycat/persist/evolve/Conversion.html @@ -1,116 +1,111 @@ - - - - - -Conversion (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.persist.evolve -
-Interface Conversion

-
-
All Superinterfaces:
Serializable
-
-
-
-
public interface Conversion
extends Serializable
- - -

-Converts an old version of an object value to conform to the current class +

+
com.sleepycat.persist.evolve
+

Interface Conversion

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public interface Conversion
    +extends java.io.Serializable
    +
    Converts an old version of an object value to conform to the current class or field definition.

    The Conversion interface is implemented by the user. A - Conversion instance is passed to the Converter.Converter(java.lang.String, int, java.lang.String, com.sleepycat.persist.evolve.Conversion) + Conversion instance is passed to the Converter.Converter(java.lang.String, int, java.lang.String, com.sleepycat.persist.evolve.Conversion) constructor.

    -

    The Conversion interface extends Serializable and the +

    The Conversion interface extends Serializable and the Conversion instance is serialized for storage using standard Java serialization. Normally, the Conversion class should only have - transient fields that are initialized in the initialize(com.sleepycat.persist.model.EntityModel) method. + transient fields that are initialized in the initialize(com.sleepycat.persist.model.EntityModel) method. While non-transient fields are allowed, care must be taken to only include fields that are serializable and will not pull in large amounts of data.

    @@ -130,7 +125,7 @@ Converts an old version of an object value to conform to the current class

    The Conversion class must implement the standard equals method. - See equals(java.lang.Object) for more information.

    + See equals(java.lang.Object) for more information.

    Conversions of simple types are generally simple. For example, a String field that contains only integer values can be easily converted to an int field:

    @@ -174,7 +169,7 @@ Converts an old version of an object value to conform to the current class Converter converter = new Converter(Address.class.getName(), 0, "zipCode", new MyConversion1()); - // Configure the converter as described here. + // Configure the converter as described here.

    A conversion may perform arbitrary transformations on an object. For example, a conversion may transform a single String address field into an @@ -247,12 +242,12 @@ Converts an old version of an object value to conform to the current class Converter converter = new Converter(Person.class.getName(), 0, "address", new MyConversion2()); - // Configure the converter as described here. + // Configure the converter as described here. -

    Note that when a conversion returns a RawObject, it must return - it with a RawType that is current as defined by the current class - definitions. The proper types can be obtained from the EntityModel - in the conversion's initialize method.

    +

    Note that when a conversion returns a RawObject, it must return + it with a RawType that is current as defined by the current class + definitions. The proper types can be obtained from the EntityModel + in the conversion's initialize method.

    A variation on the example above is where several fields in a class (street, city, state and zipCode) are converted to a single field (address). @@ -329,7 +324,7 @@ Converts an old version of an object value to conform to the current class Converter converter = new Converter(Person.class.getName(), 0, new MyConversion3()); - // Configure the converter as described here. + // Configure the converter as described here.

    A conversion can also handle changes to class hierarchies. For example, @@ -392,7 +387,7 @@ Converts an old version of an object value to conform to the current class Converter converter = new Converter(A.class.getName(), 0, new MyConversion4()); - // Configure the converter as described here. + // Configure the converter as described here.

    A conversion may return an instance of a different class entirely, as long as it conforms to current class definitions and is the type expected @@ -455,125 +450,113 @@ Converts an old version of an object value to conform to the current class Converter converter = new Converter(Pet.class.getName(), 0, new MyConversion5()); - // Configure the converter as described here. + // Configure the converter as described here.

    The primary limitation of a conversion is that it may access at most a single entity instance at one time. Conversions involving multiple entities at once may be made by performing a store conversion.

    -

    - -

    -

    -
    See Also:
    Class Evolution
    -
    - -

    - + href="package-summary.html#storeConversion">store conversion.

    +
    See Also:
    Class Evolution
    +
  • +
+
+
+
    +
  • - - - - - - - - - - - - - - - - - - -
    -Method Summary
    - Objectconvert(Object fromValue) - -
    -          Converts an old version of an object value to conform to the current - class or field definition.
    - booleanequals(Object other) - -
    -          The standard equals method that must be implemented by - conversion class.
    - voidinitialize(EntityModel model) - -
    -          Initializes the conversion, allowing it to obtain raw type information - from the entity model.
    -  -

    - +

      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      java.lang.Objectconvert(java.lang.Object fromValue) +
      Converts an old version of an object value to conform to the current + class or field definition.
      +
      booleanequals(java.lang.Object other) +
      The standard equals method that must be implemented by + conversion class.
      +
      voidinitialize(EntityModel model) +
      Initializes the conversion, allowing it to obtain raw type information + from the entity model.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • - - - - - - -
    -Method Detail
    - -

    -initialize

    -
    -void initialize(EntityModel model)
    -
    -
    Initializes the conversion, allowing it to obtain raw type information - from the entity model. -

    -

    -
    -
    -
    -
    -
    -
    -
    - -

    -convert

    -
    -Object convert(Object fromValue)
    -
    -
    Converts an old version of an object value to conform to the current +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        initialize

        +
        void initialize(EntityModel model)
        +
        Initializes the conversion, allowing it to obtain raw type information + from the entity model.
        +
      • +
      + + + +
        +
      • +

        convert

        +
        java.lang.Object convert(java.lang.Object fromValue)
        +
        Converts an old version of an object value to conform to the current class or field definition. -

        If a RuntimeException is thrown by this method, it will be - thrown to the original caller. Similarly, a IllegalArgumentException will be thrown to the original caller if the +

        If a RuntimeException is thrown by this method, it will be + thrown to the original caller. Similarly, a IllegalArgumentException will be thrown to the original caller if the object returned by this method does not conform to current class definitions.

        The class of the input and output object may be one of the simple - types or RawObject. For primitive types, the primitive wrapper - class is used.

        -

        -

        -
        -
        -
        -
        Parameters:
        fromValue - the object value being converted. The type of this - value is defined by the old class version that is being converted. -
        Returns:
        the converted object. The type of this value must conform to + types or RawObject. For primitive types, the primitive wrapper + class is used.

        +
        Parameters:
        fromValue - the object value being converted. The type of this + value is defined by the old class version that is being converted.
        +
        Returns:
        the converted object. The type of this value must conform to a current class definition. If this is a class conversion, it must be the current version of the class. If this is a field conversion, it must be of a type compatible with the current declared type of the - field.
        -
    -
    -
    - -

    -equals

    -
    -boolean equals(Object other)
    -
    -
    The standard equals method that must be implemented by + field.
    +
  • +
+ + + +
    +
  • +

    equals

    +
    boolean equals(java.lang.Object other)
    +
    The standard equals method that must be implemented by conversion class.

    When mutations are specified when opening a store, the specified and @@ -589,76 +572,81 @@ boolean equals(equals in class Object - -

    -
    -
    - + hashCode to be implemented.

    +
    +
    Overrides:
    +
    equals in class java.lang.Object
    +
    +
  • +
+ + + + +
+
-
- - - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved. - - +

Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.

+ + -- cgit v1.2.1