|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdai.lang.ExternalData
An ExternalData object encapsulates data for an entity instance which is
not covered by the attribute values of the entity instance. Because of this
the external data is not covered by the underlying Express schema. It is up to
JSDAI application to take advantage of this and define the meaning of this data.
The data is loaded and stored using InputStream and OutputStream thus allowing
to handle big chunks of data available in a file.
An ExternalData object is always combined with an entity instance ant thus only
available when corresponding entity instance is available. An ExternalData object
belongs to the SdaiModel to which the entity instance belongs to. If access to
the SdaiModel is ended the ExternalData object becomes invalid.
This object can be obtained from EEntity.getExternalData()
.
The state of the object can become invalid if external data
is deleted by calling EEntity.removeExternalData()
.
Method Summary | |
EEntity |
getInstance()
Gets the instance this external data belongs to. |
java.lang.String |
getName()
Gets the name of this external data. |
void |
loadToStream(java.io.OutputStream stream)
Loads data in this object to specified stream. |
void |
setName(java.lang.String name)
Sets the name of this external data. |
void |
storeFromStream(java.io.InputStream stream)
Stores data from specified stream to this object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public EEntity getInstance()
public void loadToStream(java.io.OutputStream stream) throws SdaiException
stream
- the stream to load data to.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void storeFromStream(java.io.InputStream stream) throws SdaiException
SdaiTransaction#abort()
,
SdaiTransaction#endTransactionAccessAbort()
,
SdaiTransaction#commit()
,
SdaiTransaction#endTransactionAccessCommit()
, or
SdaiTransaction#endTransactionAccessCommit(String)
.
If loadToStream
is invoked after call to
storeFromStream
then provided stream has to
support mark/reset, ie. stream.markSupported()
has to return true
and calls to
stream.mark(0)
and stream.reset()
have to be functional.
Use jsdai.io.ResettableFileInputStream
for this purpose as file input.
stream
- the stream to get data from.
This stream has to be valid until the end of transaction.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsSdaiTransaction.abort()
,
SdaiTransaction.endTransactionAccessAbort()
,
SdaiTransaction.commit()
,
SdaiTransaction.endTransactionAccessCommit()
,
SdaiTransaction.endTransactionAccessCommit(String)
,
jsdai.io.ResettableFileInputStream
public java.lang.String getName() throws SdaiException
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic void setName(java.lang.String name) throws SdaiException
name
- The new name of this external data
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operations
|
Copyright © LKSoftWare GmbH, 1999-2008 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |