Package com.sleepycat.persist.evolve

## Class EntityConverter

- java.lang.Object
- - com.sleepycat.persist.evolve.Mutation
  - - com.sleepycat.persist.evolve.Converter
    - - com.sleepycat.persist.evolve.EntityConverter

- All Implemented Interfaces:
    `java.io.Serializable`

      public class EntityConverter
      extends Converter

  A subclass of Converter that allows specifying keys to be deleted.

  When a Converter is used with an entity class, secondary keys cannot be automatically deleted based on field deletion, because field Deleter objects are not used in conjunction with a Converter mutation. The EntityConverter can be used instead of a plain Converter to specify the key names to be deleted.

  It is not currently possible to rename or insert secondary keys when using a Converter mutation with an entity class.

  See Also:
    `Converter`, `Class Evolution`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EntityConverter​(java.lang.String entityClassName, int classVersion, Conversion conversion, java.util.Set<java.lang.String> deletedKeys)` | Creates a mutation for converting all instances of the given entity class version to the current version of the class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object other)` | Returns true if the deleted and renamed keys are equal in this object and given object, and if the `Converter.equals(java.lang.Object)` superclass method returns true.
    `java.util.Set<java.lang.String>` | `getDeletedKeys()` | Returns the set of key names that are to be deleted.
    `int` | `hashCode()` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class com.sleepycat.persist.evolve.Converter

      `getConversion`

    - ### 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

    - #### EntityConverter

          public EntityConverter​(java.lang.String entityClassName,
                                 int classVersion,
                                 Conversion conversion,
                                 java.util.Set<java.lang.String> deletedKeys)

      Creates a mutation for converting all instances of the given entity class version to the current version of the class.
      Parameters:
        `entityClassName` - the entity class to which this mutation applies.
        `classVersion` - the class version to which this mutation applies.
        `conversion` - converter instance.
        `deletedKeys` - the set of key names that are to be deleted.

  - ### Method Detail

    - #### getDeletedKeys

          public java.util.Set<java.lang.String> getDeletedKeys()

      Returns the set of key names that are to be deleted.
      Returns:
        the set of key names that are to be deleted.

    - #### equals

          public boolean equals​(java.lang.Object other)

      Returns true if the deleted and renamed keys are equal in this object and given object, and if the `Converter.equals(java.lang.Object)` superclass method returns true.
      Overrides:
        `equals` in class `Converter`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Converter`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Converter`

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