PAJES 2.3.9

org.pajes.db.entity
Class Value

java.lang.Object
  extended byorg.pajes.db.entity.Value
All Implemented Interfaces:
java.io.Serializable

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

A representation of the value in a single column in a single entity (row) in a database entity.

See Also:
Serialized Form

Method Summary
 Attributes getAttributes()
          Returns the entity attribute with which this value is associated.
 int getDataType()
          Retrieves the SQL data type of this attribute.
 Entity getEntity()
          Returns the Entity object to which this attribute belongs.
 java.lang.String getName()
          Returns the database column name that this attribute represents.
 java.lang.Object getValue()
          Retrieves the current value of this attribute.
 java.lang.Object getValue(boolean initial)
          Retrieves the value of the attribute.
 boolean isAutoIncrement()
          Determines whether this attribute is automatically incremented by the database server.
 boolean isChanged()
          Returns the status of the attribute value.
 boolean isDate()
          Determines if this attribute represents a date/time value or not.
 boolean isNumeric()
          Determines if this attribute represents a numeric value or not.
 boolean setValue(java.lang.Object value)
          Alters the existing value of this object.
 boolean setValue(java.lang.Object value, boolean initial)
          Alters the existing value of this object.
 boolean setValue(java.lang.String text, boolean initial)
          Alters the existing value of this object.
 java.lang.String toString()
          Returns the current value as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAttributes

public Attributes getAttributes()
Returns the entity attribute with which this value is associated.

Returns:
the attributes object.

isAutoIncrement

public boolean isAutoIncrement()
Determines whether this attribute is automatically incremented by the database server.

Returns:
true if the value of the attribute is automatically incremented.

isChanged

public boolean isChanged()
Returns the status of the attribute value.

Returns:
true if the value of the attribute has been updated.

getDataType

public int getDataType()
Retrieves the SQL data type of this attribute.

Returns:
the SQL data type of this attribute.

isDate

public boolean isDate()
Determines if this attribute represents a date/time value or not.

Returns:
true if this attribute represents a date/time value, or false if it does not.

getEntity

public Entity getEntity()
Returns the Entity object to which this attribute belongs.

Returns:
the Entity object to which this attribute belongs.

getName

public java.lang.String getName()
Returns the database column name that this attribute represents.

Returns:
the database column name that this attribute represents.

isNumeric

public boolean isNumeric()
Determines if this attribute represents a numeric value or not.

Returns:
true if this attribute represents a numeric value, or false if it does not.

setValue

public boolean setValue(java.lang.Object value)
Alters the existing value of this object. The change is NOT automatically reflected in the database.

Parameters:
value - the new value.
Returns:
true if the value was updated, or false if it was not (eg that value had not changed).

setValue

public boolean setValue(java.lang.Object value,
                        boolean initial)
Alters the existing value of this object. The change is NOT automatically reflected in the database.

Parameters:
value - the new value.
initial - true if the value provided is the initial value of this attribute.
Returns:
true if the value was updated, or false if it was not (eg that value had not changed).

setValue

public boolean setValue(java.lang.String text,
                        boolean initial)
Alters the existing value of this object. The change is NOT automatically reflected in the database.

Parameters:
text - the new value as a String, which will be converted to an appropriate Object based on the data type of this object.
initial - true if the value provided is the initial value of this attribute.
Returns:
true if the value was updated, or false if it was not (eg that value had not changed).

getValue

public java.lang.Object getValue()
Retrieves the current value of this attribute.

Returns:
the attribute value.

getValue

public java.lang.Object getValue(boolean initial)
Retrieves the value of the attribute.

Parameters:
initial - true if the value returned is to be the initial value of this attribute, or false if the current value is to be returned.
Returns:
the attribute value.

toString

public java.lang.String toString()
Returns the current value as a String.

Returns:
the value. If the value is null, the String "null" is returned.

PAJES 2.3.9

Copyright © 2002-2003 Viridian Pty Limited. All Rights Reserved.