|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.cics.server.API | +--com.ibm.cics.server.Resource | +--com.ibm.cics.server.RemotableResource | +--com.ibm.cics.server.File | +--com.ibm.cics.server.KeyedFile
This is the implementation class for the KeyedFile interface.
Constructor Summary | |
KeyedFile()
Construct a default KeyedFile object. |
Method Summary | |
void |
read(byte[] key,
RecordHolder holder)
Read a specific record from a file. |
void |
read(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using the specified type of search. |
void |
readForUpdate(byte[] key,
RecordHolder holder)
Read a specific record from a file, locking it for update. |
void |
readForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using the specified type of search, locking it for update. |
void |
readGeneric(byte[] key,
RecordHolder holder)
Read a record from a file using a generic key. |
void |
readGeneric(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using a generic key and specifying the type of search.. |
void |
readGenericForUpdate(byte[] key,
RecordHolder holder)
Read a record for update from a file using a generic key. |
void |
readGenericForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record for update from a file using a generic key. |
void |
rewrite(byte[] data)
Update a record in a file. |
KeyedFileBrowse |
startBrowse(byte[] key)
Create a browse against the file. |
KeyedFileBrowse |
startBrowse(byte[] key,
SearchType searchType)
Create a browse against the file with a starting position determined by the type of search specified. |
KeyedFileBrowse |
startGenericBrowse(byte[] key,
int fullKeyLength)
Create a browse against the file using a generic key to specify the starting position. |
KeyedFileBrowse |
startGenericBrowse(byte[] key,
int fullKeyLength,
SearchType searchType)
Create a browse against the file with a starting position determined by the type of search specified. |
void |
unlock()
Unlock a file. |
Methods inherited from class com.ibm.cics.server.RemotableResource |
getSysId, setSysId |
Methods inherited from class com.ibm.cics.server.Resource |
getDescription, getName, setDescription, setName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyedFile()
Method Detail |
public void read(byte[] key, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key for the record.holder
- A RecordHolder in which is returned a byte array containing
the record.
If you know in advance the size of the object to be returned you can
initialise the holder with a byte array of the correct size and CICS will
not then allocate one.
If you pass in a byte array shorter than is necessary CICS will ignore it
and allocate an array of the correct size.
The reference to the original array will be lost.FileDisabledException
- aDuplicateKeyException
- aFileNotFoundException
- aLogicException
- aInvalidRequestException
- aIOErrorException
- aISCInvalidRequestException
- aNotAuthorisedException
- aRecordNotFoundException
- aNotOpenException
- aInvalidSystemIdException
- apublic void read(byte[] key, SearchType searchType, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- asearchType
- aholder
- aFileDisabledException
- aDuplicateKeyException
- aFileNotFoundException
- aLogicException
- aInvalidRequestException
- aIOErrorException
- aISCInvalidRequestException
- aNotAuthorisedException
- aRecordNotFoundException
- aNotOpenException
- aInvalidSystemIdException
- apublic void readForUpdate(byte[] key, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- aholder
- aFileDisabledException
- aDuplicateKeyException
- aFileNotFoundException
- aLogicException
- aInvalidRequestException
- aIOErrorException
- aISCInvalidRequestException
- aNotAuthorisedException
- aRecordNotFoundException
- aNotOpenException
- aInvalidSystemIdException
- apublic void readForUpdate(byte[] key, SearchType searchType, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key to be used when searching for the record.searchType
- A value specifying the type of search to use.
Possible values are:
holder
- A RecordHolder in which is returned a byte array containing
the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateKeyException
- This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException
- This exception
is thrown in the following situations:
RecordNotFoundException
- This exception
is thrown if a record could not be found with the key specified.NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public void readGeneric(byte[] key, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The generic key. The length of the generic key must be
less than the full key length.holder
- A RecordHolder in which is returned a byte array containing
the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateKeyException
- This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException
- This exception
is thrown in the following situations:
RecordNotFoundException
- This exception
is thrown if a record could not be found with the key specified.NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public void readGeneric(byte[] key, SearchType searchType, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The generic key. The length of the generic key must be
less than the full key length.searchType
- A value specifying the type of search to use.
Possible values are:
holder
- A RecordHolder in which is returned a byte array containing
the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateKeyException
- This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException
- This exception
is thrown in the following situations:
RecordNotFoundException
- This exception
is thrown if a record could not be found with the key specified.NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public void readGenericForUpdate(byte[] key, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The generic key. The length of the generic key must be
less than the full key length.holder
- A RecordHolder in which is returned a byte array containing
the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateKeyException
- This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException
- This exception
is thrown in the following situations:
RecordNotFoundException
- This exception
is thrown if a record could not be found with the key specified.NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public void readGenericForUpdate(byte[] key, SearchType searchType, RecordHolder holder) throws FileDisabledException, DuplicateKeyException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The generic key. The length of the generic key must be
less than the full key length.searchType
- A value specifying the type of search to use.
Possible values are:
holder
- A RecordHolder in which is returned a byte array containing
the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateKeyException
- This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException
- This exception
is thrown in the following situations:
RecordNotFoundException
- This exception
is thrown if a record could not be found with the key specified.NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public void rewrite(byte[] data) throws FileDisabledException, DuplicateRecordException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, LengthErrorException, NoSpaceException, NotAuthorisedException, NotOpenException, InvalidSystemIdException
data
- The data comprising the new value of the record.FileDisabledException
- This exception is
thrown if the file is disabled.DuplicateRecordException
- This exception is
thrown if the underlying file has an active alternate index that
accepts only unique keys, and the record to be updated for this index
has a key that duplicates an existing value.FileNotFoundException
- This exception is
thrown if the file is not found in the File Definitions (FD).LogicException
- This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException
- This exception is
thrown in the following circumstances:
IOErrorException
- This exception is
thrown if an I/O error occurs.ISCInvalidRequestException
- This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.LengthErrorException
- This exceptionNoSpaceException
- This exceptionNotAuthorisedException
- This exception
is thrown in the following situations:
NotOpenException
- This exception
is thrown if the file is not open.InvalidSystemIdException
- This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).public KeyedFileBrowse startBrowse(byte[] key) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key of the record at which to start the browse.
This key must be an exact key.FileDisabledException
- The file is disabled.FileNotFoundException
- The file is not defined in the File
Definitions (FD).LogicException
- An error not covered by any other exception
occurred.InvalidRequestException
- This exception is thrown for the
following reasons:
IOErrorException
- This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException
- This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException
- This exception is thrown
for the following reasons:
RecordNotFoundException
- This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException
- This exception is thrown
for the following reasons:
InvalidSystemIdException
- This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).public KeyedFileBrowse startBrowse(byte[] key, SearchType searchType) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key of the record at which to start the browse.
This key must be a full-length key but it is not necessary for the key
to exactly match a record in the file if the search type is GTEQ.searchType
- A value specifying the type of search to use.
Possible values are:
FileDisabledException
- The file is disabled.FileNotFoundException
- The file is not defined in the File
Definitions (FD).LogicException
- An error not covered by any other exception
occurred.InvalidRequestException
- This exception is thrown for the
following reasons:
IOErrorException
- This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException
- This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException
- This exception is thrown
for the following reasons:
RecordNotFoundException
- This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException
- This exception is thrown
for the following reasons:
InvalidSystemIdException
- This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).public KeyedFileBrowse startGenericBrowse(byte[] key, int fullKeyLength) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key of the record at which to start the browse.
This key must be a generic key, that is be shorter than the full key.fullKeyLength
- The length of the full key of the file.FileDisabledException
- The file is disabled.FileNotFoundException
- The file is not defined in the File
Definitions (FD).LogicException
- An error not covered by any other exception
occurred.InvalidRequestException
- This exception is thrown for the
following reasons:
IOErrorException
- This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException
- This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException
- This exception is thrown
for the following reasons:
RecordNotFoundException
- This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException
- This exception is thrown
for the following reasons:
InvalidSystemIdException
- This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).public KeyedFileBrowse startGenericBrowse(byte[] key, int fullKeyLength, SearchType searchType) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException
key
- The key of the record at which to start the browse.
This key must be a generic key, that is, be shorter than the full key.fullKeyLength
- The length of the full key of the file.searchType
- A value specifying the type of search to use.
Possible values are:
FileDisabledException
- The file is disabled.FileNotFoundException
- The file is not defined in the File
Definitions (FD).LogicException
- An error not covered by any other exception
occurred.InvalidRequestException
- This exception is thrown for the
following reasons:
IOErrorException
- This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException
- This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException
- This exception is thrown
for the following reasons:
RecordNotFoundException
- This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException
- This exception is thrown
for the following reasons:
InvalidSystemIdException
- This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).public void unlock() throws FileDisabledException, FileNotFoundException, LogicException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, NotOpenException, InvalidSystemIdException
FileDisabledException
- FileNotFoundException
- LogicException
- IOErrorException
- ISCInvalidRequestException
- NotAuthorisedException
- NotOpenException
- InvalidSystemIdException
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |