net.ontopia.persistence.query.jdo
Class JDOPrimitive

java.lang.Object
  extended by net.ontopia.persistence.query.jdo.JDOPrimitive
All Implemented Interfaces:
JDOValueIF

public class JDOPrimitive
extends java.lang.Object
implements JDOValueIF

INTERNAL: JDOQL value: primitive. Class used to reference primitive values. These can be boolean, byte, short, integer, long, float or double. [FIXME: In addition the classes BigInteger and BigDouble are supported.] Syntax: the same as their Java syntax representations.


Field Summary
static int BIGDECIMAL
           
static int BIGINTEGER
           
static int BOOLEAN
           
static int BYTE
           
static int DOUBLE
           
static int FLOAT
           
static int INTEGER
           
static int LONG
           
static int SHORT
           
protected  java.lang.Object value
           
protected  int value_type
           
 
Fields inherited from interface net.ontopia.persistence.query.jdo.JDOValueIF
COLLECTION, FIELD, FUNCTION, NATIVE_VALUE, NULL, OBJECT, PARAMETER, PRIMITIVE, STRING, VARIABLE
 
Constructor Summary
JDOPrimitive(int value_type, java.lang.Object value)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getPrimitiveType()
          INTERNAL: Returns the type of primitive as indicated by one of the constants in the JDOPrimitive interface.
 int getType()
          INTERNAL: Returns the type of JDO value indicated by one of the constants in the JDOValueIF interface.
 java.lang.Object getValue()
          INTERNAL: Returns the primitive value.
 java.lang.Class getValueType()
           
 int hashCode()
           
 boolean isNumeric()
          INTERNAL: Returns true if the primitive is of numeric type.
 java.lang.String toString()
           
 void visit(JDOVisitorIF visitor)
          INTERNAL: Allows the value to be visited.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

BIGDECIMAL

public static final int BIGDECIMAL
See Also:
Constant Field Values

BIGINTEGER

public static final int BIGINTEGER
See Also:
Constant Field Values

value_type

protected int value_type

value

protected java.lang.Object value
Constructor Detail

JDOPrimitive

public JDOPrimitive(int value_type,
                    java.lang.Object value)
Method Detail

getType

public int getType()
Description copied from interface: JDOValueIF
INTERNAL: Returns the type of JDO value indicated by one of the constants in the JDOValueIF interface.

Specified by:
getType in interface JDOValueIF

getValueType

public java.lang.Class getValueType()

getPrimitiveType

public int getPrimitiveType()
INTERNAL: Returns the type of primitive as indicated by one of the constants in the JDOPrimitive interface.


getValue

public java.lang.Object getValue()
INTERNAL: Returns the primitive value. An object wrapper is represented using its primitive wrapper class.


isNumeric

public boolean isNumeric()
INTERNAL: Returns true if the primitive is of numeric type.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

visit

public void visit(JDOVisitorIF visitor)
Description copied from interface: JDOValueIF
INTERNAL: Allows the value to be visited. This method is used for retrieval of nested data in expressions.

Specified by:
visit in interface JDOValueIF


Copyright © 2000-2012 Ontopia.