Class SecondaryKeyMetadata

java.lang.Object
com.sleepycat.persist.model.FieldMetadata
com.sleepycat.persist.model.SecondaryKeyMetadata
All Implemented Interfaces:
Serializable

public class SecondaryKeyMetadata extends FieldMetadata
The metadata for a secondary key field. A secondary key may be specified with the SecondaryKey annotation.

SecondaryKeyMetadata objects are thread-safe. Multiple threads may safely call the methods of a shared SecondaryKeyMetadata object.

See Also:
  • Constructor Details

  • Method Details

    • getElementClassName

      public String getElementClassName()
      Returns the class name of the array or collection element for a ONE_TO_MANY or MANY_TO_MANY relationship, or null for a Relationship#ONE_TO_ONE ONE_TO_ONE} or MANY_TO_ONE relationship.
    • getKeyName

      public String getKeyName()
      Returns the key name, which may be different from the field name.
    • getRelationship

      public Relationship getRelationship()
      Returns the relationship between instances of the entity class and the secondary keys. This may be specified using the SecondaryKey.relate() annotation.
    • getRelatedEntity

      public String getRelatedEntity()
      Returns the class name of the related (foreign) entity, for which foreign key constraints are specified using the SecondaryKey.relatedEntity() annotation.
    • getDeleteAction

      public DeleteAction getDeleteAction()
      Returns the action to take when a related entity is deleted having a primary key value that exists as a secondary key value for this entity. This may be specified using the SecondaryKey.onRelatedEntityDelete() annotation.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class FieldMetadata
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class FieldMetadata