com.hardcode.gdbms.engine.values
Interface Value

All Known Subinterfaces:
Geometry
All Known Implementing Classes:
AbstractGeometryValue, AbstractValue, BinaryValue, BooleanValue, ByteValue, DateValue, DoubleValue, FloatValue, GeometryCollection, GeometryImpl, IntValue, LongValue, NullValue, NumericValue, ShortValue, StringValue, TimestampValue, TimeValue, ValueCollection

public interface Value

Datatypes must implement this interface in order to the drivers to return that datatype. The implementation can inherit from AbstractValue or must implement equals and hashCode in the way explained at doEquals method javadoc


Field Summary
static int BINARY
           
static int BOOLEAN
           
static int BYTE
           
static int DATE
           
static int DOUBLE
           
static int FLOAT
           
static int INT
           
static int LONG
           
static int SHORT
           
static int STRING
           
static int TIME
           
static int TIMESTAMP
           
 
Method Summary
 Value and(Value value)
           
 boolean doEquals(java.lang.Object obj)
          In order to index the tables equals and hashCode must be defined.
 int doHashCode()
          The hashCode implementation.
 Value equals(Value value)
           
 java.lang.String getStringValue(ValueWriter writer)
          Gets the string representation of the value as it is defined in the specified ValueWriter
 int getType()
          Gets the type of the value
 Value greater(Value value)
           
 Value greaterEqual(Value value)
           
 Value inversa()
          DOCUMENT ME!
 Value less(Value value)
           
 Value lessEqual(Value value)
           
 Value like(Value value)
           
 Value notEquals(Value value)
           
 Value or(Value value)
           
 Value producto(Value value)
           
 Value suma(Value value)
           
 

Field Detail

BINARY

static final int BINARY
See Also:
Constant Field Values

BOOLEAN

static final int BOOLEAN
See Also:
Constant Field Values

BYTE

static final int BYTE
See Also:
Constant Field Values

DATE

static final int DATE
See Also:
Constant Field Values

DOUBLE

static final int DOUBLE
See Also:
Constant Field Values

FLOAT

static final int FLOAT
See Also:
Constant Field Values

INT

static final int INT
See Also:
Constant Field Values

LONG

static final int LONG
See Also:
Constant Field Values

SHORT

static final int SHORT
See Also:
Constant Field Values

STRING

static final int STRING
See Also:
Constant Field Values

TIMESTAMP

static final int TIMESTAMP
See Also:
Constant Field Values

TIME

static final int TIME
See Also:
Constant Field Values
Method Detail

and

Value and(Value value)
          throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#and(com.hardcode.gdbms.engine.values.value);

or

Value or(Value value)
         throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#or(com.hardcode.gdbms.engine.values.value);

producto

Value producto(Value value)
               throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#producto(com.hardcode.gdbms.engine.values.value);

suma

Value suma(Value value)
           throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#suma(com.hardcode.gdbms.engine.values.value);

inversa

Value inversa()
              throws IncompatibleTypesException
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
IncompatibleTypesException - DOCUMENT ME!

equals

Value equals(Value value)
             throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#equals(com.hardcode.gdbms.engine.values.Value)

notEquals

Value notEquals(Value value)
                throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#notEquals(com.hardcode.gdbms.engine.values.Value)

greater

Value greater(Value value)
              throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#greater(com.hardcode.gdbms.engine.values.Value)

less

Value less(Value value)
           throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#less(com.hardcode.gdbms.engine.values.Value)

greaterEqual

Value greaterEqual(Value value)
                   throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#greaterEqual(com.hardcode.gdbms.engine.values.Value)

lessEqual

Value lessEqual(Value value)
                throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.instruction.Operations#lessEqual(com.hardcode.gdbms.engine.values.Value)

like

Value like(Value value)
           throws IncompatibleTypesException
Throws:
IncompatibleTypesException
See Also:
com.hardcode.gdbms.engine.values.Operations#like(com.hardcode.gdbms.engine.values.Value)

doEquals

boolean doEquals(java.lang.Object obj)
In order to index the tables equals and hashCode must be defined. AbstractValue overrides these methods by calling doEquals and doHashCode. Any Value must inherit from abstract Value or override those methods in the same way.

See Also:
Object.equals(java.lang.Object)

doHashCode

int doHashCode()
The hashCode implementation. Every value with the same semantic information must return the same int

Returns:
integer
See Also:
Object.hashCode()

getStringValue

java.lang.String getStringValue(ValueWriter writer)
Gets the string representation of the value as it is defined in the specified ValueWriter

Parameters:
writer - Specifies the string representation for the values
Returns:
String

getType

int getType()
Gets the type of the value

Returns:
a java.sql.Types constant


Copyright © 2005-2006 . All Rights Reserved.