dsql.value
Class JavaObject
java.lang.Object
dsql.DMExecuted
dsql.value.Value
dsql.value.NonScalarValue
dsql.value.JavaObject
- Direct Known Subclasses:
- List
- public class JavaObject
- extends NonScalarValue
A holder for a Java object. The columns correspond to fields,
if they are available, or getX methods
Field Summary |
protected java.lang.Object |
obj
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
obj
protected java.lang.Object obj
JavaObject
public JavaObject(DSQL _caller,
java.lang.Object _obj)
getObject
public java.lang.Object getObject()
- Description copied from class:
Value
- Attempt to return a Java object, e.g. StringValue returns String,
JavaObject returns the embedded object, etc. This is used when
passing values to java constructors and methods
- Overrides:
getObject
in class Value
getObjectClass
public java.lang.Class getObjectClass()
- Description copied from class:
Value
- return the object class; some scalars return the
primitive class (eg Integer.TYPE, rather than Integer.getClass()
- Overrides:
getObjectClass
in class Value
print
public void print(ASTPrint printer)
throws ExecuteException
- Description copied from class:
Value
- Print this value using printer
- Specified by:
print
in class Value
- Throws:
ExecuteException
getString
public java.lang.String getString()
- Specified by:
getString
in class Value
- Returns:
- a string representation of this value, to be used
within dsql expressions. This is distinct from toString(),
which is used to output the object for debugging purposes.
toString
public java.lang.String toString()
getMeta
public ConstructedResults getMeta()
throws ExecuteException
- Specified by:
getMeta
in class Value
- Returns:
- meta-information about this Value, e.g. for a table,
it returns the names,types,width,etc. of its columns.
- Throws:
ExecuteException
getBoolean
public boolean getBoolean()
- Specified by:
getBoolean
in class Value
- Returns:
- true if this Value is "non-zero", e.g. non-empty string,
tables has some record, etc.
create
public static JavaObject create(DSQL _caller,
java.lang.Object obj)