Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## javax.jdo.annotations
Annotation Type ForeignKey

    @Target(value={TYPE,FIELD,METHOD})
    @Retention(value=RUNTIME)
    public @interface ForeignKey

Annotation for a database foreign-key. Corresponds to the xml element "foreign-key".

Since:
  2.1
Version:
  2.1

Optional Element Summary
`Column[]` | `columns` Columns that compose this foreign key.
`java.lang.String` | `deferred` Whether this foreign key is deferred (constraint is checked only at commit).
`ForeignKeyAction` | `deleteAction` The delete action of this foreign key.
`java.lang.String[]` | `members` Member (field and property) names that compose this foreign key.
`java.lang.String` | `name` Name of the foreign key.
`java.lang.String` | `table` Table for the foreign key.
`java.lang.String` | `unique` Whether this foreign key is unique.
`ForeignKeyAction` | `updateAction` The update action of this foreign key.

### name

    public abstract java.lang.String name

  Name of the foreign key.

  Returns:
    the name of the foreign key
  Default:
    ""

### table

    public abstract java.lang.String table

  Table for the foreign key. This is needed iff annotating a type where the foreign key is not defined on the primary table for the type.

  Returns:
    the table on which the foreign key is defined
  Default:
    ""

### deferred

    public abstract java.lang.String deferred

  Whether this foreign key is deferred (constraint is checked only at commit).

  Returns:
    whether this foreign key is deferred
  Default:
    ""

### unique

    public abstract java.lang.String unique

  Whether this foreign key is unique.

  Returns:
    whether this foreign key is unique
  Default:
    ""

### deleteAction

    public abstract ForeignKeyAction deleteAction

  The delete action of this foreign key.

  Returns:
    the delete action of this foreign key
  Default:
    javax.jdo.annotations.ForeignKeyAction.RESTRICT

### updateAction

    public abstract ForeignKeyAction updateAction

  The update action of this foreign key.

  Returns:
    the update action of this foreign key
  Default:
    javax.jdo.annotations.ForeignKeyAction.RESTRICT

### members

    public abstract java.lang.String[] members

  Member (field and property) names that compose this foreign key.

  Returns:
    the member names that compose this foreign key
  Default:
    {}

### columns

    public abstract Column[] columns

  Columns that compose this foreign key.

  Returns:
    the columns that compose this foreign key
  Default:
    {}

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.