|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RuntimeModel
A RuntimeModel
is used by the XL run-time system
as an interface to the concrete relational data source in use.
It corresponds to a compile-time model which was used at
compile-time: The invocation of
CompiletimeModel.getRuntimeName()
returns a name,
which is passed to RuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader)
in order to
obtain the corresponding RuntimeModel
.
This interface contains methods related to unwrapping
of values, for determining if a value represents a node value,
and for the retrieval of a Graph
associated with this model
and the current thread. Roughly speaking, a RuntimeModel
provides a set of operations, a Graph
provides the data.
A comprehensive specification of the behaviour of RuntimeModel
is given by the specification of the XL programming language.
Method Summary | |
---|---|
Graph |
currentGraph()
Returns the graph that shall be used in the context of the current thread. |
void |
initialize(java.lang.String params)
Initializes this model. |
boolean |
isNode(java.lang.Object value)
Determines if value represents a valid node
for this run-time model. |
boolean |
isWrapperFor(java.lang.Object object,
Type<?> type)
Tests if the object is a wrapper for values of the given type. |
boolean |
unwrapBoolean(java.lang.Object wrapper)
Extracts the boolean value of a wrapper. |
byte |
unwrapByte(java.lang.Object wrapper)
Extracts the byte value of a wrapper. |
char |
unwrapChar(java.lang.Object wrapper)
Extracts the char value of a wrapper. |
double |
unwrapDouble(java.lang.Object wrapper)
Extracts the double value of a wrapper. |
float |
unwrapFloat(java.lang.Object wrapper)
Extracts the float value of a wrapper. |
int |
unwrapInt(java.lang.Object wrapper)
Extracts the int value of a wrapper. |
long |
unwrapLong(java.lang.Object wrapper)
Extracts the long value of a wrapper. |
java.lang.Object |
unwrapObject(java.lang.Object wrapper)
Extracts the Object value of a wrapper. |
short |
unwrapShort(java.lang.Object wrapper)
Extracts the short value of a wrapper. |
Method Detail |
---|
Graph currentGraph()
void initialize(java.lang.String params)
RuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader)
after a new RuntimeModel
instance has been created. The format of params
depends on implementations of RuntimeModel
.
params
- initialization parameters, possibly null
boolean isNode(java.lang.Object value)
value
represents a valid node
for this run-time model.
value
- the value to be tested
true
iff the value represents a nodeboolean isWrapperFor(java.lang.Object object, Type<?> type)
object
- the potential wrapper to be testedtype
- the value type
true
iff object
is a wrapper for values of type type
boolean unwrapBoolean(java.lang.Object wrapper)
wrapper
- the wrapper
byte unwrapByte(java.lang.Object wrapper)
wrapper
- the wrapper
char unwrapChar(java.lang.Object wrapper)
wrapper
- the wrapper
double unwrapDouble(java.lang.Object wrapper)
wrapper
- the wrapper
float unwrapFloat(java.lang.Object wrapper)
wrapper
- the wrapper
int unwrapInt(java.lang.Object wrapper)
wrapper
- the wrapper
long unwrapLong(java.lang.Object wrapper)
wrapper
- the wrapper
java.lang.Object unwrapObject(java.lang.Object wrapper)
wrapper
- the wrapper
short unwrapShort(java.lang.Object wrapper)
wrapper
- the wrapper
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |