dk.vajhoej.isam.remote
Interface IsamProtocolClient

All Superinterfaces:
IsamProtocol
All Known Implementing Classes:
ByteClient, ObjectClient

public interface IsamProtocolClient
extends IsamProtocol

Interface IsamProtocolClient defines the API for remote ISAM sources clients. This interface is not intended for use by applications.


Field Summary
 
Fields inherited from interface dk.vajhoej.isam.remote.IsamProtocol
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
 
Method Summary
 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.
 

Method Detail

handshake

void handshake()
               throws IsamException
Send preferred version.

Throws:
IsamException - if problem with ISAM source

read

<T,TK> T read(java.lang.Class<T> t,
              Key<TK> k)
       throws IsamException,
              RecordException
Read record from ISAM source.

Parameters:
t - type to read
k - key of record to read
Returns:
object read
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

create

<T> void create(T o)
            throws IsamException,
                   RecordException
Create record in ISAM source.

Parameters:
o - object to create
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

update

<T> void update(T o)
            throws IsamException,
                   RecordException
Update record in ISAM source.

Parameters:
o - object to update
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

delete

<T,TK> void delete(java.lang.Class<T> t,
                   Key<TK> k)
            throws IsamException,
                   RecordException
Delete record from ISAM source.

Parameters:
t - type to delete
k - key of record to delete
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

close

void close()
           throws IsamException
Close ISAM source.

Throws:
IsamException - if problem with ISAM source

readXX

<T,TK> IsamResult<T> readXX(int cmd,
                            java.lang.Class<T> t,
                            Key<TK> k)
                     throws IsamException,
                            RecordException
Find all records matching criteria.

Parameters:
t - type to find
k - key to find
Returns:
result
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

resultRead

boolean resultRead()
                   throws IsamException,
                          RecordException
Read record.

Returns:
true if record read false if record not read
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

resultCurrent

<T> T resultCurrent()
                throws IsamException,
                       RecordException
Return current record.

Returns:
current record
Throws:
IsamException - if problem with ISAM source
RecordException - if problem converting data

resultClose

void resultClose()
                 throws IsamException
Close.

Throws:
IsamException - if problem with ISAM source