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/model/SecondaryKey.html | 602 ++++++++++----------- 1 file changed, 292 insertions(+), 310 deletions(-) (limited to 'docs/java/com/sleepycat/persist/model/SecondaryKey.html') diff --git a/docs/java/com/sleepycat/persist/model/SecondaryKey.html b/docs/java/com/sleepycat/persist/model/SecondaryKey.html index 913d9643..b6581504 100644 --- a/docs/java/com/sleepycat/persist/model/SecondaryKey.html +++ b/docs/java/com/sleepycat/persist/model/SecondaryKey.html @@ -1,108 +1,97 @@ - - - - - -SecondaryKey (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.persist.model -
-Annotation Type SecondaryKey

-
-
-
@Documented
-@Retention(value=RUNTIME)
-@Target(value=FIELD)
-public @interface SecondaryKey
- - -

-Indicates a secondary key field of an entity class. The value of the +

+
com.sleepycat.persist.model
+

Annotation Type SecondaryKey

+
+
+
+
    +
  • +
    +
    +
    @Documented
    +@Retention(value=RUNTIME)
    +@Target(value=FIELD)
    +public @interface SecondaryKey
    +
    Indicates a secondary key field of an entity class. The value of the secondary key field is a unique or non-unique identifier for the entity and - is accessed via a SecondaryIndex. + is accessed via a SecondaryIndex.

    SecondaryKey may appear on any number of fields in an entity class, subclasses and superclasses. For a secondary key field in the entity @@ -118,20 +107,20 @@ Indicates a secondary key field of an entity class. The value of the

    For a given entity class and its superclasses and subclasses, no two secondary keys may have the same name. By default, the field name identifies the secondary key and the secondary index for a given entity - class. name() may be specified to override this default.

    + class. name() may be specified to override this default.

    -

    Using relate(), instances of the entity class are related to +

    Using relate(), instances of the entity class are related to secondary keys in a many-to-one, one-to-many, many-to-many, or one-to-one relationship. This required property specifies the cardinality of each side of the relationship.

    A secondary key may optionally be used to form a relationship with - instances of another entity class using relatedEntity() and onRelatedEntityDelete(). This establishes foreign key constraints + instances of another entity class using relatedEntity() and onRelatedEntityDelete(). This establishes foreign key constraints for the secondary key.

    The secondary key field type must be a Set, Collection or array type when a x-to-many relationship is used or a singular type when an - x-to-one relationship is used; see relate().

    + x-to-one relationship is used; see relate().

    The field type (or element type, when a Set, Collection or array type is used) of a secondary key field must follow the same rules as for a primary key type. The For a secondary key field with a collection type, a type parameter must be used to specify the element type. For example Collection<String> - is allowed but Collection is not.

    -

    - -

    -


    - -

    + is allowed but Collection is not.

    +
  • +
+
+
+
    +
  • - - - - - - - - - - -
    -Required Element Summary
    - Relationshiprelate - -
    -          Defines the relationship between instances of the entity class and the - secondary keys.
    - - - - - - - - - - - - - - - - - - -
    -Optional Element Summary
    - Stringname - -
    -          Specifies the name of the key in order to use a name that is different - than the field name.
    - DeleteActiononRelatedEntityDelete - -
    -          Specifies 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.
    - ClassrelatedEntity - -
    -          Specifies the entity to which this entity is related, for establishing - foreign key constraints.
    -  -

    - +

      +
    • + + +

      Required Element Summary

      + + + + + + + + + + +
      Required Elements 
      Modifier and TypeRequired Element and Description
      Relationshiprelate +
      Defines the relationship between instances of the entity class and the + secondary keys.
      +
      +
    • +
    + +
      +
    • + + +

      Optional Element Summary

      + + + + + + + + + + + + + + + + + + +
      Optional Elements 
      Modifier and TypeOptional Element and Description
      java.lang.Stringname +
      Specifies the name of the key in order to use a name that is different + than the field name.
      +
      DeleteActiononRelatedEntityDelete +
      Specifies 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.
      +
      java.lang.ClassrelatedEntity +
      Specifies the entity to which this entity is related, for establishing + foreign key constraints.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • - - - - - - -
    -Element Detail
    - -

    -relate

    -
    -public abstract Relationship relate
    -
    -
    Defines the relationship between instances of the entity class and the +
      +
    • + + +

      Element Detail

      + + + +
        +
      • +

        relate

        +
        public abstract Relationship relate
        +
        Defines the relationship between instances of the entity class and the secondary keys.

        The table below summarizes how to create all four variations of @@ -230,23 +224,23 @@ public abstract Relationship.ONE_TO_ONE + Relationship.ONE_TO_ONE Singular Unique A person record with a unique social security number key. - Relationship.MANY_TO_ONE + Relationship.MANY_TO_ONE Singular Duplicates A person record with a non-unique employer key. - Relationship.ONE_TO_MANY + Relationship.ONE_TO_MANY Set/Collection/array Unique A person record with multiple unique email address keys. - Relationship.MANY_TO_MANY + Relationship.MANY_TO_MANY Set/Collection/array Duplicates A person record with multiple non-unique organization @@ -264,28 +258,25 @@ public abstract Collection.

        + implementation of Collection.

        For a x-to-many relationship, the field type should normally - be Set (or a subtype of this interface). This + be Set (or a subtype of this interface). This accurately expresses the fact that an Entity may not have two identical - secondary keys. For flexibility, a Collection (or a + secondary keys. For flexibility, a Collection (or a subtype of this interface) or an array type may also be used. In that case, any duplicate key values in the Collection or array are - ignored.

        -

        -

        -
        -
        -
        -
        -
    -

    -relatedEntity

    -
    -public abstract Class relatedEntity
    -
    -
    Specifies the entity to which this entity is related, for establishing + ignored.

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