org.apache.jdo.model.jdo
Class NullValueTreatment

java.lang.Object
  extended by org.apache.jdo.model.jdo.NullValueTreatment

public class NullValueTreatment
extends java.lang.Object

This interface provides constants denoting the treatment of null values for persistent fields during storage in the data store.

Author:
Michael Bouschen

Field Summary
static int DEFAULT
          Constant representing converting a null value of a field of nullable type to the default value for the type in the datastore.
static int EXCEPTION
          Constant representing throwing an exception when storing a null value of field of a nullable type that is mapped to non-nullable type in the datastore.
static int NONE
          Constant representing converting a null value of a field of nullable type to the default value for the type in the datastore.
 
Constructor Summary
NullValueTreatment()
           
 
Method Summary
static int toNullValueTreatment(java.lang.String nullValueTreatment)
          Returns the NullValueTreatment constant for the string representation.
static java.lang.String toString(int nullValueTreatment)
          Returns a string representation of the specified NullValueTreatment constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Constant representing converting a null value of a field of nullable type to the default value for the type in the datastore.

See Also:
Constant Field Values

EXCEPTION

public static final int EXCEPTION
Constant representing throwing an exception when storing a null value of field of a nullable type that is mapped to non-nullable type in the datastore.

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
Constant representing converting a null value of a field of nullable type to the default value for the type in the datastore.

See Also:
Constant Field Values
Constructor Detail

NullValueTreatment

public NullValueTreatment()
Method Detail

toString

public static java.lang.String toString(int nullValueTreatment)
Returns a string representation of the specified NullValueTreatment constant.

Parameters:
nullValueTreatment - the null value treatment, one of NONE, EXCEPTION or DEFAULT
Returns:
the string representation of the NullValueTreatment constant

toNullValueTreatment

public static int toNullValueTreatment(java.lang.String nullValueTreatment)
Returns the NullValueTreatment constant for the string representation.

Parameters:
nullValueTreatment - the string representation of the null value treatment
Returns:
the null value treatment, one of NONE, EXCEPTION or DEFAULT


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