Class EntityFrame
java.lang.Object
|
+----Frame
|
+----EntityFrame
- public class EntityFrame
- extends Frame
The class `EntityFrame', a subclass of Frame,
represents a frame internally as an exjava Entity object - such frames should
only be used to represent entities in EXPRESS models.
-
EntityFrame(Entity)
- Constructs this frame by plugging in the given exjava Entity object
(it does so by copying the reference, which is maximally efficient,
but the client should not then alter the Entity directly, as that
would compromise the integrity of the frame).
-
EntityFrame(Entity, Hashtable)
- Constructs this frame by plugging in the given exjava Entity object
(it does so by copying the reference, which is maximally efficient,
but the client should not then alter the Entity directly, as that
would compromise the integrity of the frame).
-
buildFrame()
- Fills in the slots for this frame from the underlying exjava Entity
object.
-
buildQueuedFrames()
- Builds any EntityFrames that are queued to be built (those that were
constructed before the frame class was constructed).
-
getFrameClass()
- Returns the frame class of this frame.
-
getQueryVariables()
- Returns the stack of query variables on this frame.
-
initialise(Express)
- Initialises the EntityFrame class by setting the class variable
_frameClass after looking up the `entity_type' entity in the given
EXPRESS (meta)model.
-
lookupAttribute(String)
- Looks up the attribute with the given name.
-
popQueryVariable()
- Pops the top query variable off of this frame.
-
pushQueryVariable(Frame)
- Pushes a given query variable onto the stack.
-
readClass(ObjectInput)
- Deserialises the static data members (class variables) of
EntityFrame.
-
writeClass(ObjectOutput)
- Serialises the static data members (class variables) of EntityFrame.
EntityFrame
public EntityFrame(Entity instanceData) throws FrameAlreadyExists
- Constructs this frame by plugging in the given exjava Entity object
(it does so by copying the reference, which is maximally efficient,
but the client should not then alter the Entity directly, as that
would compromise the integrity of the frame).
- Parameters:
- instanceData - An exjava Entity object to wrap in this frame.
- Throws: FrameAlreadyExists
- If an EntityFrame has already been
constructed for `instanceData'.
EntityFrame
public EntityFrame(Entity instanceData,
Hashtable moreInstanceData) throws FrameAlreadyExists
- Constructs this frame by plugging in the given exjava Entity object
(it does so by copying the reference, which is maximally efficient,
but the client should not then alter the Entity directly, as that
would compromise the integrity of the frame). This constructor
allows the entity frame to be tagged with extra slots, given in a
hash table.
- Parameters:
- instanceData - An exjava Entity object to wrap in this frame.
- moreInstanceData - Extra slots to tag this entity frame with.
- Throws: FrameAlreadyExists
- If an EntityFrame has already been
constructed for `instanceData'.
initialise
public static void initialise(Express metamodel)
- Initialises the EntityFrame class by setting the class variable
_frameClass after looking up the `entity_type' entity in the given
EXPRESS (meta)model.
- Parameters:
- metamodel - An EXPRESS metamodel, which is expected to contain
the entity `entity_type'.
buildQueuedFrames
public static void buildQueuedFrames()
- Builds any EntityFrames that are queued to be built (those that were
constructed before the frame class was constructed). Their slots are
filled from the exjava objects with which they were constructed, and
they are then validated.
buildFrame
public void buildFrame()
- Fills in the slots for this frame from the underlying exjava Entity
object.
getFrameClass
public FrameClass getFrameClass()
- Returns the frame class of this frame.
- Returns:
- The frame class of this frame.
- Overrides:
- getFrameClass in class Frame
writeClass
public static void writeClass(ObjectOutput oo) throws IOException
- Serialises the static data members (class variables) of EntityFrame.
- Parameters:
- oo - An output object to save the class data to.
- Throws: IOException
- If an I/O exception occurs.
readClass
public static void readClass(ObjectInput oi) throws IOException
- Deserialises the static data members (class variables) of
EntityFrame.
- Parameters:
- ois - An input object to save the class data to.
- Throws: IOException
- If an I/O exception occurs.
lookupAttribute
public Frame lookupAttribute(String attrName) throws InvalidAttribute
- Looks up the attribute with the given name.
- Parameters:
- attrName - The name of the attribute to return.
- Returns:
- The attribute frame whose name is `attrName'.
- Throws: InvalidAttribute
- If the entity frame does not have an
attribute of that name.
getQueryVariables
public Vector getQueryVariables()
- Returns the stack of query variables on this frame.
- Returns:
- The query variables on this entity frame.
pushQueryVariable
public void pushQueryVariable(Frame queryVariable)
- Pushes a given query variable onto the stack.
- Parameters:
- queryVariable - The query variable to be pushed onto this frame,
which is supposed to be a query_variable frame.
popQueryVariable
public void popQueryVariable()
- Pops the top query variable off of this frame.