public class SDataSet
extends java.lang.Object
implements java.io.Serializable
A DataSet is normally associated with a SSession/Jdbc, and is accessed indirectly via the SSessionJdbc methods. But a DataSet can also be accessed directly when it is detached from the SSession.
Constructor and Description |
---|
SDataSet() |
Modifier and Type | Method and Description |
---|---|
void |
attach(SRecordInstance rinst)
Deprecated.
|
void |
clearDirtyList() |
SDataSet |
clone()
Clone the dataset.
|
<RI extends SRecordInstance> |
create(SRecordMeta<RI> rmeta,
java.lang.Object... keys) |
static <RI extends SRecordInstance> |
createDetachedInstance(SRecordMeta<RI> rmeta)
Deprecated.
|
<RI extends SRecordInstance> |
createWithNullKey(SRecordMeta<RI> rmeta)
Used if no key is known, and one is to be provided later.
|
void |
destroy() |
void |
dumpDataSet()
Dumps out the entire cache of records for this connection.
|
<RI extends SRecordInstance> |
find(SRecordMeta<RI> rmeta,
java.lang.Object... keys) |
<RI extends SRecordInstance> |
findOrCreate(SRecordMeta<RI> rmeta,
java.lang.Object... keys) |
<RI extends SRecordInstance> |
findUsingPrototype(RI rinst)
Deprecated.
|
java.util.List<SRecordInstance> |
getDirtyRecords()
Ordered list of SRecordInstances to flush and purge.
|
SLog |
getLogger() |
SSessionI |
getSession() |
boolean |
isAttached() |
<RI extends SRecordInstance> |
newInstanceNotInDataSet(SRecordMeta<RI> rmeta)
Deprecated.
|
void |
pokeIntoDataSet(SRecordInstance rinst)
Deprecated.
|
void |
purge()
Remove all records from cache and update list.
|
java.util.Collection<SRecordInstance> |
queryAllRecords() |
<I extends SRecordInstance,R extends SRecordInstance> |
queryReferencing(I refed,
SFieldReference<I> ref)
Return all records in dataset where rec.ref == ref.
|
void |
removeRecord(SRecordInstance rinst)
Remove record from cache, does not flag it for deletion.
|
void |
setSession(SSessionI session) |
java.lang.String |
toString() |
public <RI extends SRecordInstance> RI findOrCreate(SRecordMeta<RI> rmeta, java.lang.Object... keys)
public <RI extends SRecordInstance> RI find(SRecordMeta<RI> rmeta, java.lang.Object... keys)
public <RI extends SRecordInstance> RI create(SRecordMeta<RI> rmeta, java.lang.Object... keys)
public <RI extends SRecordInstance> RI createWithNullKey(SRecordMeta<RI> rmeta)
public void removeRecord(SRecordInstance rinst)
public java.util.Collection<SRecordInstance> queryAllRecords()
public <I extends SRecordInstance,R extends SRecordInstance> java.util.List<R> queryReferencing(I refed, SFieldReference<I> ref)
public boolean isAttached()
public void clearDirtyList()
public java.util.List<SRecordInstance> getDirtyRecords()
public void purge()
public void destroy()
public SDataSet clone()
Curent implementation uses slow serialization alg, should really use clone()/able.
clone
in class java.lang.Object
@Deprecated public <RI extends SRecordInstance> RI newInstanceNotInDataSet(SRecordMeta<RI> rmeta)
@Deprecated public <RI extends SRecordInstance> RI findUsingPrototype(RI rinst)
@Deprecated public void pokeIntoDataSet(SRecordInstance rinst)
public SLog getLogger()
@Deprecated public static <RI extends SRecordInstance> RI createDetachedInstance(SRecordMeta<RI> rmeta)
@Deprecated public void attach(SRecordInstance rinst)
public void dumpDataSet()
public java.lang.String toString()
toString
in class java.lang.Object
public SSessionI getSession()
public void setSession(SSessionI session)