org.nodal.util
Class AtomicSetterUtil

java.lang.Object
  extended byorg.nodal.util.GetterFilter
      extended byorg.nodal.util.AtomicSetterUtil
All Implemented Interfaces:
Getter, Setter, TxnMonitorable
Direct Known Subclasses:
BooleanSetterUtil, ByteSetterUtil, CharSetterUtil, DoubleSetterUtil, FloatSetterUtil, IntSetterUtil, LongSetterUtil, ShortSetterUtil

public abstract class AtomicSetterUtil
extends GetterFilter
implements Setter


Field Summary
protected  java.lang.String typeName
           
 
Fields inherited from class org.nodal.util.GetterFilter
getter
 
Constructor Summary
AtomicSetterUtil(GetterUtil g, java.lang.String nm)
           
 
Method Summary
 Path path()
          A Path to this Getter.
 java.lang.Object set(java.lang.Object obj)
          Set the value to an Object.
 boolean setBoolean(boolean b)
          Set the value to true/false.
 byte setByte(byte b)
          Set the value to a byte.
 char setChar(char c)
          Set the value to a character.
 double setDouble(double d)
          Set the value to a double precision floating point value.
 float setFloat(float f)
          Set the value to a single precision floating point value.
 int setInt(int i)
          Set the value to an integer.
 long setLong(long l)
           
 Node setNode(Node n)
          Set the value to a Node.
protected abstract  java.lang.Object setObject(java.lang.Object v)
           
 short setShort(short s)
          Set the value to a short integer..
abstract  java.lang.String setString(java.lang.String s)
          Set the value to that parsed from a String.
 
Methods inherited from class org.nodal.util.GetterFilter
addTxnHandler, get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getNode, getShort, getString, removeTxnHandler, type, valueEquals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nodal.model.Getter
get, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getNode, getShort, getString, type, valueEquals
 
Methods inherited from interface org.nodal.model.TxnMonitorable
addTxnHandler, removeTxnHandler
 

Field Detail

typeName

protected final java.lang.String typeName
Constructor Detail

AtomicSetterUtil

public AtomicSetterUtil(GetterUtil g,
                        java.lang.String nm)
Method Detail

path

public Path path()
Description copied from interface: Getter
A Path to this Getter. For a Getter that is Node.Property, the Path is normally the Node.path() extended with the property name.

Specified by:
path in interface Getter
Overrides:
path in class GetterFilter

set

public final java.lang.Object set(java.lang.Object obj)
                           throws ConstraintFailure
Description copied from interface: Setter
Set the value to an Object. Will call setString or setNode if appropriate.

Specified by:
set in interface Setter
Parameters:
obj - the new value for the slot
Returns:
the Object that was Set
Throws:
ConstraintFailure

setObject

protected abstract java.lang.Object setObject(java.lang.Object v)
                                       throws ConstraintFailure
Throws:
ConstraintFailure

setString

public abstract java.lang.String setString(java.lang.String s)
                                    throws ConstraintFailure
Description copied from interface: Setter
Set the value to that parsed from a String.

Specified by:
setString in interface Setter
Parameters:
s - a String representing the new value for the slot
Returns:
the String as set
Throws:
ConstraintFailure

setNode

public final Node setNode(Node n)
                   throws ConstraintFailure
Description copied from interface: Setter
Set the value to a Node. The Node returned should have a Path that reflects its new position in the NODAL hierarchy.

Specified by:
setNode in interface Setter
Parameters:
n - the new Node value for the slot
Returns:
a Node reference with Path defined by the Setter context
Throws:
ConstraintFailure

setBoolean

public boolean setBoolean(boolean b)
                   throws ConstraintFailure
Description copied from interface: Setter
Set the value to true/false.

Specified by:
setBoolean in interface Setter
Parameters:
b - the new boolean value
Returns:
the value as set
Throws:
ConstraintFailure

setChar

public char setChar(char c)
             throws ConstraintFailure
Description copied from interface: Setter
Set the value to a character.

Specified by:
setChar in interface Setter
Parameters:
c - the new character value
Returns:
the value as set
Throws:
ConstraintFailure

setByte

public byte setByte(byte b)
             throws ConstraintFailure
Description copied from interface: Setter
Set the value to a byte.

Specified by:
setByte in interface Setter
Parameters:
b - the new byte value
Returns:
the value as set
Throws:
ConstraintFailure

setShort

public short setShort(short s)
               throws ConstraintFailure
Description copied from interface: Setter
Set the value to a short integer..

Specified by:
setShort in interface Setter
Parameters:
s - the new short value
Returns:
the value as set
Throws:
ConstraintFailure

setInt

public int setInt(int i)
           throws ConstraintFailure
Description copied from interface: Setter
Set the value to an integer.

Specified by:
setInt in interface Setter
Parameters:
i - the new integer value
Returns:
the value as set
Throws:
ConstraintFailure

setLong

public long setLong(long l)
             throws ConstraintFailure
Throws:
ConstraintFailure

setFloat

public float setFloat(float f)
               throws ConstraintFailure
Description copied from interface: Setter
Set the value to a single precision floating point value.

Specified by:
setFloat in interface Setter
Parameters:
f - the new float value
Returns:
the value as set
Throws:
ConstraintFailure

setDouble

public double setDouble(double d)
                 throws ConstraintFailure
Description copied from interface: Setter
Set the value to a double precision floating point value.

Specified by:
setDouble in interface Setter
Parameters:
d - the new double value
Returns:
the value as set
Throws:
ConstraintFailure