Class JDOPrimitive
- java.lang.Object
-
- net.ontopia.persistence.query.jdo.JDOPrimitive
-
- All Implemented Interfaces:
JDOValueIF
public class JDOPrimitive extends 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
Fields Modifier and Type Field Description 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 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
Constructors Constructor Description JDOPrimitive(int value_type, Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getPrimitiveType()
INTERNAL: Returns the type of primitive as indicated by one of the constants in theJDOPrimitive
interface.int
getType()
INTERNAL: Returns the type of JDO value indicated by one of the constants in theJDOValueIF
interface.Object
getValue()
INTERNAL: Returns the primitive value.Class
getValueType()
int
hashCode()
boolean
isNumeric()
INTERNAL: Returns true if the primitive is of numeric type.String
toString()
void
visit(JDOVisitorIF visitor)
INTERNAL: Allows the value to be visited.
-
-
-
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 Object value
-
-
Constructor Detail
-
JDOPrimitive
public JDOPrimitive(int value_type, 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 theJDOValueIF
interface.- Specified by:
getType
in interfaceJDOValueIF
-
getValueType
public Class getValueType()
-
getPrimitiveType
public int getPrimitiveType()
INTERNAL: Returns the type of primitive as indicated by one of the constants in theJDOPrimitive
interface.
-
getValue
public 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.
-
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 interfaceJDOValueIF
-
-