|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jbase.jremote.jca.WrappedJFile
public class WrappedJFile
Provide an interface to remote jBASE files and ensures connection validity.
Constructor Summary | |
---|---|
protected |
WrappedJFile(WrappedJConnection connection,
JFile jfile)
|
Method Summary | |
---|---|
boolean |
clear()
Delete all records from the file. |
boolean |
close()
Closes this jBASE file. |
boolean |
delete(java.lang.String recordKey)
Delete a record where the supplied recordKey is the key to the record. |
boolean |
exists(java.lang.String recordKey)
This method returns true if the supplied record id exists. |
JCursor |
getCursor()
Returns a cursor to this jBASE file. |
boolean |
hasLock(java.lang.String recordKey)
Check if the specified key holds a lock. |
JDynArray |
read(java.lang.String recordKey)
Read a record where the supplied recordKey is the key to the record. |
JDynArray |
readU(java.lang.String recordKey,
boolean blockedRead)
Read a record where the supplied recordKey is the key to the record and locks it for update. |
boolean |
releaseLock(java.lang.String recordKey)
Release the update lock (if held) on the specified key. |
boolean |
releaseLocks()
Releases all locks held by this file. |
JSelectList |
select()
Returns a select list containing the record keys in this jBASE file. |
boolean |
write(java.lang.String recordKey,
JDynArray record)
Write the supplied record to the jBASE file. |
boolean |
writeU(java.lang.String recordKey,
JDynArray record,
boolean blockedWrite)
Write the supplied record to the jBASE file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WrappedJFile(WrappedJConnection connection, JFile jfile)
Method Detail |
---|
public boolean exists(java.lang.String recordKey) throws JRemoteException
JFile
This method returns true if the supplied record id exists.
exists
in interface JFile
JRemoteException
public JDynArray read(java.lang.String recordKey) throws JRecordNotFoundException, JRemoteException
JFile
Read a record where the supplied recordKey is the key to the record.
read
in interface JFile
JRecordNotFoundException
JRemoteException
public JDynArray readU(java.lang.String recordKey, boolean blockedRead) throws JRecordNotFoundException, JRemoteException
JFile
Read a record where the supplied recordKey is the key to the record and locks it for update.
readU
in interface JFile
recordKey
- The record keyblockedRead
- Specifies whether this method call should block if the record is locked
JRecordNotFoundException
JRemoteException
public boolean write(java.lang.String recordKey, JDynArray record) throws JRemoteException
JFile
Write the supplied record to the jBASE file. If an update lock was held against the supplied key, it will be released after the record has been written.
write
in interface JFile
JRemoteException
public boolean writeU(java.lang.String recordKey, JDynArray record, boolean blockedWrite) throws JRemoteException
JFile
Write the supplied record to the jBASE file. If an update lock was held against the supplied key, it will NOT be released.
writeU
in interface JFile
blockedWrite
- Specifies whether this method call should block if the record is already locked
JRemoteException
public boolean delete(java.lang.String recordKey) throws JRemoteException
JFile
Delete a record where the supplied recordKey is the key to
the record.
Returns true if the delete was successful or false if the record
was not found.
An exception will be thrown if an error occurs whilst deleting
the record.
delete
in interface JFile
JRemoteException
public boolean releaseLock(java.lang.String recordKey) throws JRemoteException
JFile
Release the update lock (if held) on the specified key.
releaseLock
in interface JFile
JRemoteException
public boolean releaseLocks() throws JRemoteException
JFile
Releases all locks held by this file.
releaseLocks
in interface JFile
JRemoteException
public boolean hasLock(java.lang.String recordKey) throws JRemoteException
JFile
Check if the specified key holds a lock.
hasLock
in interface JFile
JRemoteException
public boolean close() throws JRemoteException
JFile
Closes this jBASE file.
Closing a JFile frees the associate remote system resources. Subsequent actions on this JFile object will reopen the file.
close
in interface JFile
JRemoteException
public JSelectList select() throws JRemoteException
JFile
Returns a select list containing the record keys in this jBASE file.
select
in interface JFile
JRemoteException
public JCursor getCursor() throws JRemoteException
JFile
Returns a cursor to this jBASE file.
getCursor
in interface JFile
JRemoteException
public boolean clear() throws JRemoteException
JFile
Delete all records from the file.
Returns true if the operation was successful or false if the records could not be deleted.
clear
in interface JFile
JRemoteException
|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |