public class ObjectClient extends java.lang.Object implements IsamProtocolClient
B_V1, CLOSE, CREATE, DELETE, ERROR, FIND_GE, FIND_GT, FIND_LE, FIND_LT, O_V1, OK, READ, RESULT_CLOSE, RESULT_CURRENT, RESULT_READ, UPDATE| Constructor and Description |
|---|
ObjectClient(java.io.InputStream is,
java.io.OutputStream os)
Create instance of ObjectClient.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close ISAM source.
|
<T> void |
create(T o)
Create record in ISAM source.
|
<T,TK> void |
delete(java.lang.Class<T> t,
Key<TK> k)
Delete record from ISAM source.
|
void |
handshake()
Send preferred version.
|
<T,TK> T |
read(java.lang.Class<T> t,
Key<TK> k)
Read record from ISAM source.
|
<T,TK> IsamResult<T> |
readXX(int cmd,
java.lang.Class<T> t,
Key<TK> k)
Find all records matching criteria.
|
void |
resultClose()
Close.
|
<T> T |
resultCurrent()
Return current record.
|
boolean |
resultRead()
Read record.
|
<T> void |
update(T o)
Update record in ISAM source.
|
public ObjectClient(java.io.InputStream is,
java.io.OutputStream os)
is - input stream to wrap in input object streamos - output stream to wrap in output object streampublic void handshake()
throws IsamException
IsamProtocolClienthandshake in interface IsamProtocolClientIsamException - if problem with ISAM sourcepublic <T,TK> T read(java.lang.Class<T> t,
Key<TK> k)
throws IsamException
IsamProtocolClientread in interface IsamProtocolClientT - type of recordTK - type of keyt - type to readk - key of record to readIsamException - if problem with ISAM sourcepublic <T> void create(T o)
throws IsamException,
RecordException
IsamProtocolClientcreate in interface IsamProtocolClientT - type of recordo - object to createIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic <T> void update(T o)
throws IsamException,
RecordException
IsamProtocolClientupdate in interface IsamProtocolClientT - type of recordo - object to updateIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic <T,TK> void delete(java.lang.Class<T> t,
Key<TK> k)
throws IsamException,
RecordException
IsamProtocolClientdelete in interface IsamProtocolClientT - type of recordTK - type of keyt - type to deletek - key of record to deleteIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic void close()
throws IsamException
IsamProtocolClientclose in interface IsamProtocolClientIsamException - if problem with ISAM sourcepublic <T,TK> IsamResult<T> readXX(int cmd, java.lang.Class<T> t, Key<TK> k) throws IsamException, RecordException
IsamProtocolClientreadXX in interface IsamProtocolClientT - type of recordTK - type of keycmd - FIND_xx valuet - type to findk - key to findIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic boolean resultRead()
throws IsamException,
RecordException
IsamProtocolClientresultRead in interface IsamProtocolClientIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic <T> T resultCurrent()
throws IsamException,
RecordException
IsamProtocolClientresultCurrent in interface IsamProtocolClientT - type of recordIsamException - if problem with ISAM sourceRecordException - if problem converting datapublic void resultClose()
throws IsamException
IsamProtocolClientresultClose in interface IsamProtocolClientIsamException - if problem with ISAM source