
public interface LogicalFile
| Modifier and Type | Method and Description |
|---|---|
int |
addTransaction(Transaction transaction)
Adds a C record to the logical file.
|
Checksum |
getChecksum()
Gets the E record of the logical file.
|
Header |
getHeader()
Gets the A record of the logical file.
|
Transaction |
getTransaction(int index)
Gets a C record for an index.
|
Transaction |
removeTransaction(int index)
Removes a C record at a given index.
|
Header |
setHeader(Header header)
Updates the A record of the logical file.
|
Transaction |
setTransaction(int index,
Transaction transaction)
Updates a C record at a given index.
|
int addTransaction(Transaction transaction) throws IOException
transaction - The transaction to add to the logical file.IndexOutOfBoundsException - if no more transactions can be added to the logical file.NullPointerException - if transaction is null.IllegalTransactionException - if transaction holds illegal values.IOException - if writing fails.Checksum getChecksum() throws IOException
IOException - if reading fails.Header getHeader() throws IOException
IOException - if reading fails.Transaction getTransaction(int index) throws IOException
index - The index of the transaction to return.index.IndexOutOfBoundsException - if the logical file holds transactions and index is either negative or
greater or equal to the number of transactions stored in the file.IOException - if reading fails.Transaction removeTransaction(int index) throws IOException
index - The index of the transaction to remove.IndexOutOfBoundsException - if the logical file holds transactions and index is either negative or
greater or equal to the number of transactions stored in the file.IOException - if reading or writing fails.Header setHeader(Header header) throws IOException
header - New A record for the logical file.NullPointerException - if header is null.IllegalHeaderException - if header holds illegal values.IOException - if reading or writing fails.Transaction setTransaction(int index, Transaction transaction) throws IOException
index - The index of the transaction to update.transaction - The transaction to overwrite the transaction at index with.index.IndexOutOfBoundsException - if the logical file holds transactions and index is either negative or
greater or equal to the number of transactions stored in the file.NullPointerException - if transaction is null.IllegalTransactionException - if transaction holds illegal values.IOException - if reading or writing fails.Copyright © 2005–2014 jDTAUS. All rights reserved.