All Packages Class Hierarchy This Package Previous Next Index
Class asjava.uniobjects.UniFile
java.lang.Object
|
+----asjava.uniobjects.UniBase
|
+----asjava.uniobjects.UniFile
- public class UniFile
- extends UniBase
UniFile
is used to access to all file operations
- Version:
- Version 1.0
- Author:
- David T. Meeks
-
uniFileHandle
-
-
UniFile()
-
Default constructor for this class.
-
UniFile(UniSession, Object, int)
-
-
clearFile()
- clears a file, deleting all records contained within it.
-
close()
- closes the file.
-
deleteRecord()
- deletes the record identified by
setRecordID
.
-
deleteRecord(Object)
- deletes the record identified by
aRecordIDObj
.
-
deleteRecord(UniDataSet)
- deletes the records identified by
aDataSet
UniDataSet object
-
fileAction(int, UniDataSet, Object, int)
-
-
getAkInfo(Object)
- obtains information concerning the secondary key indexes available for this
object.
-
getBlockingStrategy()
-
returns the current blocking strategy.
-
getFileName()
-
returns the name of the file this object represents
-
getFileType()
- returns the type of file this is.
-
getLockStrategy()
-
returns the current locking strategy.
-
getRecord()
- returns the contents of the record that was last read.
-
getRecordID()
- returns the ID of the record that was last read.
-
getReleaseStrategy()
-
returns the current release strategy.
-
isOpen()
- Denotes whether the file is open.
-
isRecordLocked()
- determines whether or not a user or session currently holds a lock on a given
record ID.
-
isRecordLocked(Object)
- determines whether or not a user or session currently holds a lock on a given
record ID.
-
iType(Object, Object)
- Evalutes the specified I-descriptor and returns the evaluated string.
-
lockFile()
- locks this UniVerse file.
-
lockRecord(int)
- locks the recordID established with the
setRecordID
method.
-
lockRecord(Object, int)
- locks the recordID established with the
aRecordIDObj
argument..
-
lockRecord(UniDataSet, int)
- locks the recordIDs established with the
UniDataSet
object argument..
-
open()
- Opens the named file.
-
read()
-
reads the UniVerse record from this file.
-
read(Object)
-
reads the UniVerse record from this file.
-
read(Object, int)
-
reads the UniVerse record from this file.
-
read(UniDataSet)
-
reads the set of UniVerse records passed in via the UniDataSet object.
-
readField(Object, int)
-
reads the specified field from the UniVerse record identified.
-
readField(Object, int, int)
-
reads the specified field from the UniVerse record identified.
-
readField(UniDataSet, int)
-
reads the set of UniVerse records passed in via the UniDataSet object.
-
readField(UniDataSet, Object)
-
reads the set of UniVerse records passed in via the UniDataSet object.
-
readNamedField(Object)
-
reads the field identifed by the named field in
aFieldNameObj
.
-
readNamedField(Object, Object)
-
reads the field identifed by the named field in
aFieldNameObj
.
-
readNamedField(UniDataSet, Object)
-
reads the set of UniVerse records passed in via the UniDataSet object.
-
setBlockingStrategy(int)
-
set the blocking strategy to the value indicated by the
aBlock
parameter.
-
setFileName(Object)
-
set the filename to be opened
-
setLockStrategy(int)
-
set the locking strategy to the value indicated by the
aLock
parameter.
-
setRecord(Object)
-
set the data portion of the record, primarily to be used for subsequent
write
methods.
-
setRecordID(Object)
-
set the record ID of the record to be read
-
setReleaseStrategy(int)
-
set the release strategy to the value indicated by the
aRelease
parameter.
-
unlockFile()
- unlocks the file
-
unlockRecord()
- unlocks the recordID established with the
setRecordID
method.
-
unlockRecord(Object)
- unlocks the recordID established with the
aRecordIDObj
parameter.
-
unlockRecord(UniDataSet)
- unlocks the recordIDs established with the
UniDataSet
object argument..
-
write()
- used to write the data specified with the
setRecord
and setRecordID
methods into the file.
-
write(Object, Object)
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file.
-
write(Object, Object, int)
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file.
-
write(UniDataSet)
- used to write the data specified with the
aDataSet
parameters into the file.
-
writeField(int)
- used to write the data specified with the
setRecord
and setRecordID
methods into the file, but only the field specified.
-
writeField(Object, Object, int)
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the field specified.
-
writeField(Object, Object, int, int)
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the field specified.
-
writeField(UniDataSet, int)
- used to write the data specified with the
aDataSet
parameters into the file.
-
writeField(UniDataSet, Object)
- used to write the data specified with the
aDataSet
parameters into the file.
-
writeNamedField(Object, Object)
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the name field specified.
-
writeNamedField(Object, Object, Object)
- used to write the data specified with the
aRecordID
and aRecordDataObj
parameters into the file, but only the name field specified.
-
writeNamedField(UniDataSet, Object)
- used to write the data specified with the
aDataSet
parameters into the file.
uniFileHandle
protected int uniFileHandle
UniFile
public UniFile() throws UniFileException
- Default constructor for this class.
- Throws: UniFileException
- is thrown if an error occurs
UniFile
public UniFile(UniSession aSession,
Object aFileName,
int aDictFlag) throws UniFileException
clearFile
public void clearFile() throws UniFileException
- clears a file, deleting all records contained within it. If a file is locked by
another user, the
BlockingStrategy
, which can be set with the
setBlockingStrategy
method, determines the behavior
- Throws: UniFileException
- is thrown is an error occurs
close
public void close() throws UniFileException
- closes the file. All file and record locks are released
- Throws: UniFileException
- is thrown is an error occurs
deleteRecord
public void deleteRecord() throws UniFileException
- deletes the record identified by
setRecordID
.
- Throws: UniFileException
- is thrown is an error occurs
deleteRecord
public UniDataSet deleteRecord(UniDataSet aDataSet) throws UniFileException
- deletes the records identified by
aDataSet
UniDataSet object
- Parameters:
- aDataSet -
UniDataSet
object which identifies which record IDs to be deleted.
- Throws: UniFileException
- is thrown is an error occurs
deleteRecord
public void deleteRecord(Object aRecordIDObj) throws UniFileException
- deletes the record identified by
aRecordIDObj
.
- Parameters:
- aRecordIDObj - identifies which record ID is to be deleted.
- Throws: UniFileException
- is thrown is an error occurs
getAkInfo
public UniDynArray getAkInfo(Object akNameObj) throws UniFileException
- obtains information concerning the secondary key indexes available for this
object. The return value will vary depending on the type of index, as follows:
- For D-Type indexes: Field 1 contains D as first character and Field 2
contains the location number of the indexed field
- For I-type indexes: Field 1 contains I as first character, Field 2 contains
the I-type expression, and the compiled I-type resides
in field 19 and onward.
- For both types: 2nd value of Field 1 indicates if the index needs to
be rebuilt. It is an empty string otherwise.
3rd value of Field 1 is set if the index is null-suppressed.
It is an empty string otherwise.
4th value of Field 1 is set if automatic updates are
disabled. It is an empty string otherwise.
6th value of Field 1 contains an S for single valued
indices or M for a multivalued index.
If akNameObj
is passed in as an empty string, then the list of
available indices is returned
- Parameters:
- akNameObj - name of the index to query about
- Returns:
- the information concerning the given index, or a list of all the indexes
available
- Throws: UniFileException
- is thrown if an error occurs
getBlockingStrategy
public int getBlockingStrategy()
- returns the current blocking strategy. The initial value is inherited from the
UniSession.setDefaultBlockingStrategy
method. Valid values are:
- WAIT_ON_LOCKED (1) - If the record is locked, wait until it is released
- RETURN_ON_LOCKED (2) - Return a value to
status
to indicate
the state of the lock.
- Returns:
- integer representing the current blocking strategy for this object
- See Also:
- setBlockingStrategy
getFileName
public String getFileName()
- returns the name of the file this object represents
- Returns:
- String representing the UniVerse file that was opened
- See Also:
- setFileName
getFileType
public int getFileType()
- returns the type of file this is. The file is either a static hashed (2-18),
directory (1 or 19), b-tree (25), or dynamic (30).
- Returns:
- integer representing the type of UniVerse file that was opened.
getLockStrategy
public int getLockStrategy()
- returns the current locking strategy. The initial value is inherited from the
UniSession.setDefaultLockStrategy
method. Valid values are:
- NO_LOCKS (0) - No locking is to be done by default
- EXCLUSIVE_UPDATE - Sets an exclusive update lock (READU) for all file access
- SHARED_READ - Sets a shared lock (READL) for all file access
- Returns:
- integer representing the current locking strategy for this object
- See Also:
- setLockStrategy
getRecord
public UniString getRecord()
- returns the contents of the record that was last read. It is updated every time
a
read
, readField
, or readNamedField
is performed.
- Returns:
- UniString representing the data that was last read
- See Also:
- setRecord, read, readField, readNamedField
getRecordID
public String getRecordID()
- returns the ID of the record that was last read. It is updated every time
a
read
, readField
, or readNamedField
is performed.
- Returns:
- String representing the ID of the data that was last read
- See Also:
- setRecordID, read, readField, readNamedField
getReleaseStrategy
public int getReleaseStrategy()
- returns the current release strategy. The initial value is inherited from the
UniSession.setDefaultReleaseStrategy
method. Valid values are:
- WRITE_RELEASE (1) - Release the lock when the record is written
- READ_RELEASE (2) - Release the lock when the record is read
- EXPLICIT_RELEASE (4) - maintains locks as specified by the
setLockStrategy
method. Locks can only be released with the
unlockRecord
method
- CHANGE_RELEASE (8) - releases the lock whenever a new value is set using the
setRecordID
method
- Returns:
- integer representing the current release strategy for this object
- See Also:
- setReleaseStrategy, setLockStrategy, unlockRecord
isOpen
public boolean isOpen()
- Denotes whether the file is open. A
true
value indicates the file is
still open for use, a false
indicates the file is closed and unavailable
until reopened.
- Returns:
- boolean representing whether the file is opened or closed
isRecordLocked
public boolean isRecordLocked() throws UniFileException
- determines whether or not a user or session currently holds a lock on a given
record ID.
- Returns:
- boolean representing whether the record is locked.
- Throws: UniFileException
- is thrown if an error occurs
isRecordLocked
public boolean isRecordLocked(Object aRecordIDObj) throws UniFileException
- determines whether or not a user or session currently holds a lock on a given
record ID.
- Parameters:
- aRecordIDObj - represents the record ID to be checked.
- Returns:
- boolean representing whether the record is locked.
- Throws: UniFileException
- is thrown if an error occurs
iType
public UniString iType(Object aRecordIDObj,
Object aITypeIDObj) throws UniFileException
- Evalutes the specified I-descriptor and returns the evaluated string. It applies
no conversion to the data.
- Parameters:
- aRecordIDObj - record ID of the record supplied as data to the Itype facility
- aITypeIDObj - record ID of the Idescriptor record to be evaluated
- Returns:
- UniString representing the evaluated string
- Throws: UniFileException
- is thrown if an error occurs
lockFile
public void lockFile() throws UniFileException
- locks this UniVerse file. If another user currently owns a lock, it will throw
a UniFileException
- Throws: UniFileException
- is thrown if an error is detected
lockRecord
public void lockRecord(int aLockFlag) throws UniFileException
- locks the recordID established with the
setRecordID
method.
This method is used to override the current locking strategy
- Parameters:
- aLockFlag - Type of lock to set. Valid values are:
- EXCLUSIVE_UPDATE (1) - Sets a READU lock
- SHARED_READ (2) - Sets a READL lock
- Throws: UniFileException
- is thrown if an error is detected
lockRecord
public void lockRecord(Object aRecordIDObj,
int aLockFlag) throws UniFileException
- locks the recordID established with the
aRecordIDObj
argument..
This method is used to override the current locking strategy
- Parameters:
- aRecordIDObj - String denoting which record ID to lock
- aLockFlag - Type of lock to set. Valid values are:
- EXCLUSIVE_UPDATE (1) - Sets a READU lock
- SHARED_READ (2) - Sets a READL lock
- Throws: UniFileException
- is thrown if an error is detected
lockRecord
public UniDataSet lockRecord(UniDataSet aDataSet,
int aLockFlag) throws UniFileException
- locks the recordIDs established with the
UniDataSet
object argument..
This method is used to override the current locking strategy
- Parameters:
- aDataSet - UniDataSet denoting which record IDs to lock
- aLockFlag - Type of lock to set. Valid values are:
- EXCLUSIVE_UPDATE (1) - Sets a READU lock
- SHARED_READ (2) - Sets a READL lock
- Returns:
- UniDataSet object denoting which records were successfully locked
- Throws: UniFileException
- is thrown if an error is detected
open
public void open() throws UniFileException
- Opens the named file. If it cannot be opened, a UniFileException will be thrown
- Throws: UniFileException
- is thrown if an error occurs
read
public UniString read() throws UniFileException
- reads the UniVerse record from this file. It uses the record ID established via
the
setRecordID
method.
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
- See Also:
- setRecordID
read
public UniDataSet read(UniDataSet aRowSet) throws UniFileException
- reads the set of UniVerse records passed in via the UniDataSet object. This
UniDataSet object should contain the list of record IDs to be read from
this file.
- Parameters:
- aRowSet - list of record IDs to be read from this file
- Returns:
- UniDataSet representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
read
public UniString read(Object aRecordIDObj) throws UniFileException
- reads the UniVerse record from this file. It uses the record ID established via
the
aRecordIDObj
argument that is passed in.
- Parameters:
- aRecordIDObj - record ID to be read from the file
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
read
public UniString read(Object aRecordIDObj,
int aLockFlag) throws UniFileException
- reads the UniVerse record from this file. It uses the record ID established via
the
aRecordIDObj
argument that is passed in. It will also lock the
record according to the aLockFlag
argument that is passed in.
- Parameters:
- aRecordIDObj - record ID to be read from the file
- aLockFlag - is the type of lock that is to be set. See
setLockStrategy
for details on valid values
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
- See Also:
- setLockStrategy
readField
public UniString readField(Object aRecordIDObj,
int aFieldNumber) throws UniFileException
- reads the specified field from the UniVerse record identified. It uses the record ID
established via the
aRecordIDObj
argument that is passed in. It will
return only the field number specified in aFieldNumber
- Parameters:
- aRecordIDObj - record ID to be read from the file
- aFieldNumber - integer representing which field is to be read
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readField
public UniString readField(Object aRecordIDObj,
int aFieldNumber,
int aLockFlag) throws UniFileException
- reads the specified field from the UniVerse record identified. It uses the record ID
established via the
aRecordIDObj
argument that is passed in. It will
return only the field number specified in aFieldNumber
. It will set
a lock on the record based on the value of aLockFlag
- Parameters:
- aRecordIDObj - record ID to be read from the file
- aFieldNumber - integer representing which field is to be read
- aLockFlag - type of lock to be set on the record
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readField
public UniDataSet readField(UniDataSet aRowSet,
int aFieldNumber) throws UniFileException
- reads the set of UniVerse records passed in via the UniDataSet object. This
UniDataSet object should contain the list of record IDs to be read from
this file.
- Parameters:
- aRowSet - list of record IDs to be read from this file
- Returns:
- UniDataSet representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readField
public UniDataSet readField(UniDataSet aRowSet,
Object aFieldNumber) throws UniFileException
- reads the set of UniVerse records passed in via the UniDataSet object. This
UniDataSet object should contain the list of record IDs to be read from
this file.
- Parameters:
- aRowSet - list of record IDs to be read from this file
- Returns:
- UniDataSet representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readNamedField
public UniString readNamedField(Object aFieldNameObj) throws UniFileException
- reads the field identifed by the named field in
aFieldNameObj
. It
does this by extracting the physical field number from the dictionary associated
with this file, and then performs a readField
on that field. It will
use the record ID established via the setRecordID
as the record to
be read
- Parameters:
- aFieldNameObj - name of the field in the dictionary to use as the field number
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readNamedField
public UniString readNamedField(Object aRecordIDObj,
Object aFieldNameObj) throws UniFileException
- reads the field identifed by the named field in
aFieldNameObj
. It
does this by extracting the physical field number from the dictionary associated
with this file, and then performs a readField
on that field.
- Parameters:
- aRecordIDObj - record ID to be read
- aFieldNameObj - name of the field in the dictionary to use as the field number
- Returns:
- UniString representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
readNamedField
public UniDataSet readNamedField(UniDataSet aRowSet,
Object aFieldNameObj) throws UniFileException
- reads the set of UniVerse records passed in via the UniDataSet object. This
UniDataSet object should contain the list of record IDs to be read from
this file.
- Parameters:
- aRowSet - list of record IDs to be read from this file
- aFieldNameObj - name of the field in the dictionary to use as the field number
- Returns:
- UniDataSet representing the data read
- Throws: UniFileException
- will be thrown if an error occurs
setBlockingStrategy
public void setBlockingStrategy(int aBlock) throws UniFileException
- set the blocking strategy to the value indicated by the
aBlock
parameter.
- Parameters:
- aBlock - integer representing the blocking strategy to be used
- Throws: UniFileException
- is thrown if an invalid blocking strategy is set
- See Also:
- getBlockingStrategy
setFileName
public void setFileName(Object aFileNameObj)
- set the filename to be opened
- Parameters:
- aFileNameObj - name of the UniVerse file to be opened
- See Also:
- getFileName
setLockStrategy
public void setLockStrategy(int aLock) throws UniFileException
- set the locking strategy to the value indicated by the
aLock
parameter.
- Parameters:
- aLock - integer representing the locking strategy to be used
- Throws: UniFileException
- is thrown if an invalid blocking strategy is set
- See Also:
- getLockStrategy
setRecord
public void setRecord(Object aStringObj)
- set the data portion of the record, primarily to be used for subsequent
write
methods.
- Parameters:
- aStringObj - data portion of the record
- See Also:
- getRecord, write
setRecordID
public void setRecordID(Object aStringObj) throws UniFileException
- set the record ID of the record to be read
- Parameters:
- aStringObj - String representing the record ID to be read from the file
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- getRecordID
setReleaseStrategy
public void setReleaseStrategy(int aRelease)
- set the release strategy to the value indicated by the
aRelease
parameter.
- Parameters:
- aRelease - integer representing the release strategy to be used
- See Also:
- getReleaseStrategy
unlockFile
public void unlockFile() throws UniFileException
- unlocks the file
- Throws: UniFileException
- is thrown if an error is detected
- See Also:
- lockFile
unlockRecord
public void unlockRecord() throws UniFileException
- unlocks the recordID established with the
setRecordID
method.
- Throws: UniFileException
- is thrown if an error is detected
- See Also:
- setRecordID
unlockRecord
public void unlockRecord(UniDataSet aDataSet) throws UniFileException
- unlocks the recordIDs established with the
UniDataSet
object argument..
- Parameters:
- aDataSet - UniDataSet denoting which record IDs to lock
- Throws: UniFileException
- is thrown if an error is detected
unlockRecord
public void unlockRecord(Object aRecordIDObj) throws UniFileException
- unlocks the recordID established with the
aRecordIDObj
parameter.
- Parameters:
- aRecordIDObj - record id to be unlocked
- Throws: UniFileException
- is thrown if an error is detected
- See Also:
- setRecordID
write
public void write() throws UniFileException
- used to write the data specified with the
setRecord
and setRecordID
methods into the file. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- setRecord, setRecordID, status
write
public void write(Object aRecordIDObj,
Object aRecordDataObj) throws UniFileException
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aRecordIDObj - record ID that is to be written
- aRecordDataOBJ - record data that is to be written
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- setRecord, setRecordID, status
write
public void write(Object aRecordIDObj,
Object aRecordDataObj,
int aLockFlag) throws UniFileException
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked. You can use this version to also specify the kind of
locking to be used during the write operation
- Parameters:
- aRecordIDObj - record ID that is to be written
- aRecordDataOBJ - record data that is to be written
- aLockFlag - type of lock to be set
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- setRecord, setRecordID, status
write
public UniDataSet write(UniDataSet aDataSet) throws UniFileException
- used to write the data specified with the
aDataSet
parameters into the file. After completion, the returned UniDataSet object can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aDataSet - UniDataSet object representing the data that is to be written
- Throws: UniFileException
- is thrown if an error occurs
writeField
public void writeField(int uniFieldNumber) throws UniFileException
- used to write the data specified with the
setRecord
and setRecordID
methods into the file, but only the field specified. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- uniFieldNumber - field to be written
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- setRecord, setRecordID, status
writeField
public UniDataSet writeField(UniDataSet aDataSet,
int uniFieldNumber) throws UniFileException
- used to write the data specified with the
aDataSet
parameters into the file. After completion, the returned UniDataSet object can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aDataSet - UniDataSet object representing the data that is to be written
- uniFieldNumber - field to be written
- Throws: UniFileException
- is thrown if an error occurs
writeField
public UniDataSet writeField(UniDataSet aDataSet,
Object uniFieldName) throws UniFileException
- used to write the data specified with the
aDataSet
parameters into the file. After completion, the returned UniDataSet object can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aDataSet - UniDataSet object representing the data that is to be written
- uniFieldNumber - field to be written
- Throws: UniFileException
- is thrown if an error occurs
writeField
public void writeField(Object aRecordIDObj,
Object aRecordDataObj,
int aFieldNumber) throws UniFileException
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the field specified. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aRecordIDObj - record ID to be written
- aRecordDataObj - data to be written
- aFieldNumber - field within the record to be written
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- status
writeField
public void writeField(Object aRecordIDObj,
Object aRecordDataObj,
int aFieldNumber,
int aLockFlag) throws UniFileException
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the field specified. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked. You can also specify the specific locking to be used via
the aLockFlag parameter
- Parameters:
- aRecordIDObj - record ID to be written
- aRecordDataObj - data to be written
- aFieldNumber - field within the record to be written
- aLockFlag - integer representing the type of lock to be set.
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- status
writeNamedField
public void writeNamedField(Object aFieldName,
Object aString) throws UniFileException
- used to write the data specified with the
aRecordIDObj
and aRecordDataObj
parameters into the file, but only the name field specified. The Named Field
is extracted from the files Dictionary. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aFieldName - name of the field that is to be written
- aString - data to be written to that field
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- status
writeNamedField
public void writeNamedField(Object aRecordID,
Object aFieldName,
Object aString) throws UniFileException
- used to write the data specified with the
aRecordID
and aRecordDataObj
parameters into the file, but only the name field specified. The Named Field
is extracted from the files Dictionary. After completion, the status
method can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aRecordID - record ID that is to be written
- aFieldName - name of the field that is to be written
- aString - data to be written to that field
- Throws: UniFileException
- is thrown if an error occurs
- See Also:
- status
writeNamedField
public UniDataSet writeNamedField(UniDataSet aDataSet,
Object aFieldName) throws UniFileException
- used to write the data specified with the
aDataSet
parameters into the file. After completion, the returned UniDataSet object can be used
to determine the results of the operation. A 0 indicates the record was locked, a -2
indicates it was not locked
- Parameters:
- aDataSet - UniDataSet object representing the data that is to be written
- uniFieldNumber - field to be written
- Throws: UniFileException
- is thrown if an error occurs
fileAction
protected UniDataSet fileAction(int actionRequested,
UniDataSet dataSet,
Object fieldList,
int lockType) throws UniFileException
All Packages Class Hierarchy This Package Previous Next Index