org.datanucleus.metadata
Class NullValue

java.lang.Object
  extended by org.datanucleus.metadata.NullValue
All Implemented Interfaces:
java.io.Serializable

public class NullValue
extends java.lang.Object
implements java.io.Serializable

Representation of how to handle a null value (in a field).

See Also:
Serialized Form

Field Summary
static NullValue DEFAULT
          null-value="default" (put in the default value when needing to persist and finding a null).
static NullValue EXCEPTION
          null-value="exception" (throw an exception when needing to persist and finding a null).
static NullValue NONE
          null-value="none" (persist null when needing to persist and finding a null).
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
static NullValue getNullValue(java.lang.String value)
          Obtain a NullValue for the given name by value
 int getType()
          Accessor for the type.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCEPTION

public static final NullValue EXCEPTION
null-value="exception" (throw an exception when needing to persist and finding a null).


DEFAULT

public static final NullValue DEFAULT
null-value="default" (put in the default value when needing to persist and finding a null).


NONE

public static final NullValue NONE
null-value="none" (persist null when needing to persist and finding a null).

Method Detail

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

toString

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

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getType

public int getType()
Accessor for the type.

Returns:
Type

getNullValue

public static NullValue getNullValue(java.lang.String value)
Obtain a NullValue for the given name by value

Parameters:
value - the name
Returns:
the NullValue found or NullValue.NONE if not found. If value is null, returns NullValue.NONE.


Copyright © 2010. All Rights Reserved.