|
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.io.JFileImpl
public class JFileImpl
The JFile object is used to query, read, and write to jBASE files.
open(String fileName)
Constructor Summary | |
---|---|
protected |
JFileImpl()
This constructor can be used by ObjectReader to create a new object to be populated with deserialized data. |
protected |
JFileImpl(AbstractJRemoteConnection connection,
String fileName)
|
protected |
JFileImpl(String fileName)
|
Method Summary | |
---|---|
boolean |
clear()
Delete all records from the file. |
boolean |
close()
Closes this jBASE file. |
boolean |
delete(String recordKey)
Delete a record where the supplied recordKey is the key to the record. |
boolean |
exists(String recordKey)
This method returns true if the supplied record id exists. |
JCursor |
getCursor()
Returns a cursor to this jBASE file. |
boolean |
hasLock(String recordKey)
Check if the specified key holds a lock. |
JDynArray |
read(String recordKey)
Read a record where the supplied recordKey is the key to the record. |
JDynArray |
readU(String recordKey,
boolean blockedRead)
Read a record where the supplied recordKey is the key to the record and locks it for update. |
boolean |
releaseLock(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(String recordKey,
JDynArray record)
Write the supplied record to the jBASE file. |
boolean |
writeU(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 JFileImpl(AbstractJRemoteConnection connection, String fileName)
protected JFileImpl(String fileName)
protected JFileImpl()
Method Detail |
---|
public boolean exists(String recordKey) throws JRemoteException
JFile
This method returns true if the supplied record id exists.
exists
in interface JFile
JRemoteException
JFile.exists(java.lang.String)
public JDynArray read(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
JFile.read(java.lang.String)
public JDynArray readU(String recordKey, boolean blockedRead) throws JRecordNotFoundException, JRecordLockedException, 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
JRecordLockedException
JFile.readU(java.lang.String, boolean)
public boolean write(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
JFile.write(java.lang.String, com.jbase.jremote.JDynArray)
public boolean writeU(String recordKey, JDynArray record, boolean blockedWrite) throws JRecordLockedException, 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
JRecordLockedException
JFile.writeU(java.lang.String, com.jbase.jremote.JDynArray, boolean)
public boolean releaseLock(String recordKey) throws JRemoteException
JFile
Release the update lock (if held) on the specified key.
releaseLock
in interface JFile
JRemoteException
JFile.releaseLock(java.lang.String)
public boolean releaseLocks() throws JRemoteException
JFile
Releases all locks held by this file.
releaseLocks
in interface JFile
JRemoteException
JFile.releaseLocks()
public boolean hasLock(String recordKey) throws JRemoteException
JFile
Check if the specified key holds a lock.
hasLock
in interface JFile
JRemoteException
JFile.hasLock(java.lang.String)
public boolean delete(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
JFile.delete(java.lang.String)
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
JFile.close()
public JSelectList select() throws JRemoteException
JFile
Returns a select list containing the record keys in this jBASE file.
select
in interface JFile
JRemoteException
JFile.select()
public JCursor getCursor() throws JRemoteException
JFile
Returns a cursor to this jBASE file.
getCursor
in interface JFile
JRemoteException
JFile.getCursor()
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
JFile.clear()
|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |