org.jpox.metadata
Class ForeignKeyDeleteAction

java.lang.Object
  extended byorg.jpox.metadata.ForeignKeyAction
      extended byorg.jpox.metadata.ForeignKeyDeleteAction
All Implemented Interfaces:
java.io.Serializable

public class ForeignKeyDeleteAction
extends ForeignKeyAction

Foreign keys represent a consistency constraint in the database that must be maintained. The user can specify by the value of the delete-action attribute what happens if the target row of a foreign key is deleted. See jdo specification 2.0 §15.5

Since:
1.1
Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
static ForeignKeyDeleteAction CASCADE
          delete-action="cascade".
static ForeignKeyDeleteAction DEFAULT
          delete-action="default".
static ForeignKeyDeleteAction DEFAULT_ACTION
          the default action
static ForeignKeyDeleteAction NONE
          delete-action="none".
static ForeignKeyDeleteAction NULL
          delete-action="null".
static ForeignKeyDeleteAction RESTRICT
          delete-action="restrict".
 
Method Summary
static ForeignKeyDeleteAction getForeignKeyDeleteAction(java.lang.String value)
          Return ForeignKeyDeleteAction from String.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jpox.metadata.ForeignKeyAction
equals, getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CASCADE

public static final ForeignKeyDeleteAction CASCADE
delete-action="cascade". The database will automatically delete all rows that refer to the row being deleted


RESTRICT

public static final ForeignKeyDeleteAction RESTRICT
delete-action="restrict". The user is required to explicitly make the relationship valid by application code


NULL

public static final ForeignKeyDeleteAction NULL
delete-action="null". The database will automatically nullify the columns in all rows that refer to the row being deleted


DEFAULT

public static final ForeignKeyDeleteAction DEFAULT
delete-action="default". The database will automatically set the columns in all rows that refer to the row being deleted to their default value


NONE

public static final ForeignKeyDeleteAction NONE
delete-action="none". No foreign-key should be created.


DEFAULT_ACTION

public static final ForeignKeyDeleteAction DEFAULT_ACTION
the default action

Method Detail

toString

public java.lang.String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.

getForeignKeyDeleteAction

public static ForeignKeyDeleteAction getForeignKeyDeleteAction(java.lang.String value)
Return ForeignKeyDeleteAction from String.

Parameters:
value - delete-action attribute value
Returns:
Instance of ForeignKeyDeleteAction. If value invalid, return null.


Copyright © -2007 . All Rights Reserved.