dk.vajhoej.isam
Interface IsamSource

All Known Implementing Classes:
CacheIsamSource, DummyIsamSource, EmulatedIsamSource, LocalIsamSource, RemoteIsamSource

public interface IsamSource

Interface IsamSource represents an ISAM source.


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.
<T,TK> T
read(java.lang.Class<T> t, Key<TK> k)
          Read record from ISAM source.
<T,TK> IsamResult<T>
readGE(java.lang.Class<T> t, Key<TK> k)
          Find all records greater than or equal key.
<T,TK> IsamResult<T>
readGT(java.lang.Class<T> t, Key<TK> k)
          Read all records greater than key.
<T,TK> IsamResult<T>
readLE(java.lang.Class<T> t, Key<TK> k)
          Read all records less than or equal key.
<T,TK> IsamResult<T>
readLT(java.lang.Class<T> t, Key<TK> k)
          Read all records less than key.
<T> void
update(T o)
          Update record in ISAM source.
 

Method Detail

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

readGE

<T,TK> IsamResult<T> readGE(java.lang.Class<T> t,
                            Key<TK> k)
                     throws IsamException,
                            RecordException
Find all records greater than or equal key.

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

readGT

<T,TK> IsamResult<T> readGT(java.lang.Class<T> t,
                            Key<TK> k)
                     throws IsamException,
                            RecordException
Read all records greater than key.

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

readLE

<T,TK> IsamResult<T> readLE(java.lang.Class<T> t,
                            Key<TK> k)
                     throws IsamException,
                            RecordException
Read all records less than or equal key. Note that the performance of reading reverse may be very poor in some implementations.

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

readLT

<T,TK> IsamResult<T> readLT(java.lang.Class<T> t,
                            Key<TK> k)
                     throws IsamException,
                            RecordException
Read all records less than key. Note that the performance of reading reverse may be very poor in some implementations.

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