|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDataman.DatamanIndex
public class DatamanIndex
This implements most of verbs of the Dataman Package. All master data file records are associated with an index. When a key is retrieved, it's associated data record is also retrieved and stored in the master data record array. Almost everything in Dataaman is done by referencing an index.
| Field Summary | |
|---|---|
static int |
AFTER
Insert the new record after the current one in memory. |
static int |
BEFORE
Insert the new record before the current one in memory. |
static int |
RDONLY
Opens an index and related datafiles in read-only mode. |
static int |
UPDATE
Opens and index an related datafiels in update mode. |
| Constructor Summary | |
|---|---|
DatamanIndex(java.lang.String name,
int mode)
Define and open an index. |
|
| Method Summary | |
|---|---|
boolean |
back()
Retrieve the record preceeding the current one. |
void |
clear()
Unlock the current database record. |
void |
delete()
Delete the current database record. |
java.lang.String |
fileName()
Return the name of the current data file. |
boolean |
forward()
Retrieve the record following the current one. |
boolean |
get_current()
Retrieve the record associated with the current key. |
boolean |
get_first()
Retrieve the lowest order key and it's associated data record from the index. |
java.lang.String |
get_ixname()
Return the String name of this index. |
DatamanKey |
get_key()
Returns this index's current key |
boolean |
get_last()
Retrieve the highest order key and it's associated data record from the index. |
boolean |
get_next()
Retrieve the next higher order key and it's associated data record from the index. |
boolean |
get_prior()
Retrieve the next lower order key and it's associated data record from the index. |
boolean |
get(DatamanField key)
Lookup the named key an return it's associated data record. |
boolean |
get(DatamanKey key)
Lookup the named key and return it's associated record. |
boolean |
get(java.lang.String key)
Lookup the named key and return it's associated data record. |
void |
iclose()
Close an open index. |
void |
include(DatamanField field)
Include a new key into an index. |
void |
include(DatamanIndex idx,
DatamanField field)
Include a new key into an index. |
void |
include(DatamanIndex idx,
java.lang.String key)
Include a new key into an index. |
void |
include(java.lang.String key)
Include a new key into an index. |
void |
insert(int fmt,
int pos)
Insert a new record in the databse. |
boolean |
protect()
Lock the current database record. |
boolean |
remove(DatamanKey key)
Remove the specified key from the index. |
boolean |
remove(java.lang.String key)
Remove the specified key from the index. |
boolean |
restore()
Restore the saved state of the index. |
void |
save()
Save the current state of the index. |
void |
sort(DatamanField key)
Add a key to an index. |
void |
sort(int i)
Add a key to an index. |
void |
sort(java.lang.String key)
Add a key to an index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RDONLY
public static final int UPDATE
public static final int BEFORE
public static final int AFTER
| Constructor Detail |
|---|
public DatamanIndex(java.lang.String name,
int mode)
name - - the index name to openmode - - the open mode either RDONLY or UPDATE
DatamanRuntimeException| Method Detail |
|---|
public void iclose()
DatamanRuntimeExceptionpublic boolean get(DatamanKey key)
key - - the key to search for.
DatamanRuntimeExceptionpublic boolean get(java.lang.String key)
key - - the key to search for.
DatamanRuntimeExceptionpublic boolean get(DatamanField key)
key - - the key to search for.
DatamanRuntimeExceptionpublic boolean get_next()
DatamanRuntimeExceptionpublic boolean get_prior()
DatamanRuntimeExceptionpublic boolean get_first()
DatamanRuntimeExceptionpublic boolean get_last()
DatamanRuntimeExceptionpublic boolean get_current()
DatamanRuntimeExceptionpublic boolean forward()
DatamanRuntimeExceptionpublic boolean back()
DatamanRuntimeExceptionpublic boolean protect()
DatamanRuntimeExceptionpublic void clear()
DatamanRuntimeExceptionpublic void delete()
DatamanRuntimeExceptionpublic boolean remove(DatamanKey key)
key - - the key to remove from the index.
DatamanRuntimeExceptionpublic boolean remove(java.lang.String key)
key - - the key to remove from the index.
DatamanRuntimeExceptionpublic void save()
DatamanRuntimeExceptionpublic boolean restore()
DatamanRuntimeExceptionpublic void sort(java.lang.String key)
key - - the key to sort into the index.
DatamanRuntimeExceptionpublic void sort(DatamanField key)
key - - the key to sort into the index.
DatamanRuntimeExceptionpublic void sort(int i)
i - - the key to sort into the index.
DatamanRuntimeException
public void insert(int fmt,
int pos)
fmt - - the record format number of the new record.pos - - either DatamanIndex.BEFORE or DatamanIndex.AFTER
DatamanRuntimeException
public void include(DatamanIndex idx,
java.lang.String key)
idx - - the source index.key - - the new key to include
DatamanRuntimeException
public void include(DatamanIndex idx,
DatamanField field)
idx - - the source index.field - - the key to include.
DatamanRuntimeExceptionpublic void include(java.lang.String key)
key - - the new key to include.
DatamanRuntimeExceptionpublic void include(DatamanField field)
field - - the new key to include.
DatamanRuntimeExceptionpublic java.lang.String get_ixname()
public DatamanKey get_key()
public java.lang.String fileName()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||