public class ArchiveData extends java.lang.Object implements DBDataInterface
Constructor and Description |
---|
ArchiveData(DBData data,
ArchiveDataSource ads)
The archive data
|
Modifier and Type | Method and Description |
---|---|
void |
addDependanceListener(DependanceListener dl)
Add a dependence listener
No changes can ever be made to an archive data source so we will never notify
dependences added or removed.
|
int |
getBaseLayerId()
The base layer for this record.
|
GlobalKey |
getGlobalKey(Hint hint)
The globalKey for this DBData.
|
GlobalKey |
getGlobalKey(VirtualDB vDB,
DBField field,
Hint hint)
Retrieve the global key for this field.
|
LayerData |
getLayerData(VirtualDB layer,
Hint hint)
Return the layer data for this record
We'll just return the normal DBData if 1) The matching transaction header can't be found. |
long |
getLinkedRowId(VirtualDB vDB,
DBField field,
Hint hint)
Get the linked row id if known.
|
java.lang.Object |
getRawValue(VirtualDB vDB,
DBField field,
Hint hint)
Retrieves the raw data for the specified field
the supplied virtual db indicates how the object views the data for this field
We will scroll down the virtual db tree until we find a value for the field.
|
DBClass |
getRealDBClass(VirtualDB vDB,
Hint hint)
Return the REAL DBClass if known
|
GlobalKeyId |
getRootDBClassId()
The root class
|
long |
getRowId()
The row id for this database object.
|
long |
getTransId(VirtualDB vDB,
Hint hint)
The current transaction id for this database object.
|
boolean |
hasRawFieldInLayer(VirtualDB vDB,
DBField field,
Hint hint)
Does raw data for a field exist in this layer ? This ignores the final flag
as it is used for deleting data.
|
boolean |
hasRawRowInLayer(VirtualDB vDB,
Hint hint)
Does raw data for a field exist in this layer ? This ignores the final flag
as it is used for deleting data.
|
boolean |
isDeleted(VirtualDB vDB,
Hint hint)
Is the database object deleted.
|
boolean |
isFinal(VirtualDB vDB,
Hint hint)
Is this layers data marked as final ?
No changes may be recorded for a record that is final from below.
|
void |
register(DBObject theObject)
registers any objects that contain this data object
this allows us to notify these objects of any changes made to the data
READ ONLY So we don't care.
|
void |
reloadLayer(VirtualDB vDB)
Reloads this layer's data from the raw database.
|
public ArchiveData(DBData data, ArchiveDataSource ads)
data
- the current dataads
- the data source.public void addDependanceListener(DependanceListener dl)
addDependanceListener
in interface DBDataInterface
dl
- The listenerpublic int getBaseLayerId()
getBaseLayerId
in interface DBDataInterface
public GlobalKeyId getRootDBClassId()
getRootDBClassId
in interface DBDataInterface
public GlobalKey getGlobalKey(Hint hint)
getGlobalKey
in interface DBDataInterface
hint
- If we need to hit the database, then also get these rowspublic GlobalKey getGlobalKey(VirtualDB vDB, DBField field, Hint hint)
getGlobalKey
in interface DBDataInterface
vDB
- Which layer.field
- The field to gethint
- Which other rows will we be asking for.@CheckReturnValue public LayerData getLayerData(VirtualDB layer, Hint hint)
getLayerData
in interface DBDataInterface
layer
- the data layerhint
- What other records will you be asking@CheckReturnValue public long getLinkedRowId(VirtualDB vDB, DBField field, Hint hint)
getLinkedRowId
in interface DBDataInterface
vDB
- Which layer.field
- The field to gethint
- Which other rows will we be asking for.@CheckReturnValue public java.lang.Object getRawValue(@Nonnull VirtualDB vDB, @Nonnull DBField field, @Nullable Hint hint)
getRawValue
in interface DBDataInterface
vDB
- Which layer.field
- The field to gethint
- Which other rows will we be asking for.@CheckReturnValue public DBClass getRealDBClass(VirtualDB vDB, Hint hint)
getRealDBClass
in interface DBDataInterface
vDB
- the layerhint
- the hint of other records to load.@CheckReturnValue public long getRowId()
getRowId
in interface DBDataInterface
@CheckReturnValue public long getTransId(@Nonnull VirtualDB vDB, @Nullable Hint hint)
getTransId
in interface DBDataInterface
vDB
- Which layerhint
- What other rows.public boolean hasRawFieldInLayer(VirtualDB vDB, DBField field, Hint hint)
hasRawFieldInLayer
in interface DBDataInterface
vDB
- From which layer.field
- The fieldhint
- Which other rows.public boolean hasRawRowInLayer(VirtualDB vDB, Hint hint)
hasRawRowInLayer
in interface DBDataInterface
vDB
- From which layerhint
- Which other rows.public boolean isDeleted(VirtualDB vDB, Hint hint)
isDeleted
in interface DBDataInterface
vDB
- In which layer ?hint
- What other rows will you be asking aboutpublic boolean isFinal(VirtualDB vDB, Hint hint)
isFinal
in interface DBDataInterface
vDB
- From which layer.hint
- What other rows.public void register(DBObject theObject)
register
in interface DBDataInterface
theObject
- to notifypublic void reloadLayer(VirtualDB vDB) throws java.lang.Exception
reloadLayer
in interface DBDataInterface
vDB
- For which layerjava.lang.Exception
- A serious problem.stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.