Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class ListManager

java.lang.Object
  extended by com.ibm.etools.iseries.ui.ListManager
All Implemented Interfaces:
ContainerManagement, PropertyChangeListener, Serializable, EventListener

public class ListManager
extends Object
implements ContainerManagement, PropertyChangeListener, Serializable

The ListManager bean is used to associate one or more JComponents with the fields in a record format. These JComponents must allow a list of items, such as JTable, JList, JComboBox, JFormattedTable and JFormattedComboBox. The record format of a database file is defined in property recordIOManager. To associate a JComponent with a field, the JComponent bean name and the field name must match. If the JComponent bean name cannot be set to the name of the field, use addFieldMapping(String,String) or addFieldMapping(String[],String[]) to explicitly map the fields. If the displayContainer is a JFormattedTable or JTable, then the identifier of the JFormattedTableColumn or TableColumn has to match with the field name. When access to multiple record formats or database files is required, ListManager can join with another instance of ListManager, then only records whose foreign keys matches the key values of the joined record format can be accessed. Foreign keys can be any fields in the record format. All file access is done via RecordIOManager.

Before a ListManager can associate a JComponent to a field, following is required:

If the JComponent is a javax.swing.JTable, and it has no TableColumn defined, then ListManager will automatically create table columns based on the selectedColumnNames defined in recordIOManager.

If the JComponent is a javax.swing.JTable, and the openType of the database file is OPENTYPE_READ_WRITE, then whenever a different row is selected, and data in the previously-selected row has been changed, the previously-selected row will be updated in the database file automatically. If a new row is inserted before or after the current row, you can enter new values to the inserted row, and when the selected item of the table is changed, the inserted row will be added to the database file automatically.

If the JComponent that has field association is a JFormattedComponent, and its data attributes do not match the data type, data length or decimal places of the database field, ListManager will automatically change the attributes of the JFormattedComponent if property autoChangeDataAttributes is set to true. The following table outlines the attributes that can be changed for the different data types:

FIELD TYPE DATA TYPE LENGTH DECIMAL PLACES
binary (B) DATATYPE_NUMERIC no change 0
character (A) DATATYPE_CHARACTER field length 0
DBCS Either (E) DATATYPE_CHARACTER field length 0
DBCS Graphic (G) DATATYPE_CHARACTER field length 0
DBCS Only (J) DATATYPE_CHARACTER field length 0
DBCS Open (O) DATATYPE_CHARACTER field length 0
date (L) DATATYPE_CHARACTER field length 0
float (F) DATATYPE_CHARACTER 20 0
hexadecimal (H) DATATYPE_CHARACTER field length x 2, ListManager will display the hexadecimal representation of the field 0
packed decimal (P) DATATYPE_NUMERIC field length field decimal places
time (T) DATATYPE_CHARACTER field length (8 bytes) 0
timestamp (Z) DATATYPE_CHARACTER field length (26 bytes) 0
zoned decimal (S) DATATYPE_NUMERIC field length field decimal places

If ListManager is used inside VisualCompositionEditor, then a RecordIOManager serialized data class will be generated to preserve the RecordIOManager bean properties and the state of the object as serialized data in a generated class. The persistent data can be restored at any time when you want to change or set the bean properties of a new ListManager object.

Sample code:

        JFormattedTable itemTable = new JFormattedTable();
        JScrollPane scrollPane = new JScrollPane(itemTable);   
        
        // add the scroll pane to the JFrame
        getContentPane().add(scrollPane, BorderLayout.CENTER);

        // set up the list manager
        ListManager myListManager = new ListManager();
        try
        {
                myListManager.setRecordIOManager(new RecordIOManager("PRODUCT","ADTSLAB"));
                
                // set the scrollPane as the display container
                myListManager.setDisplayContainer(scrollPane);

                // read all the records from database PRODUCT in library ADTSLAB
                myListManager.readAllRecords();
        }
        catch (Throwable e)
        {
                e.printStackTrace();
        }

 

See Also:
RecordIOManager, FormManager, Serialized Form

Field Summary
static String Copyright
           
protected  PropertyChangeSupport propertyChange
           
 
Fields inherited from interface com.ibm.etools.iseries.ui.ContainerManagement
copyright
 
Constructor Summary
ListManager()
          ListManager constructor.
 
Method Summary
 boolean addFieldMapping(String[] componentBeanName, String[] dataFieldName)
          To map multiple JComponents with multiple fields in the record format specified in recordIOManager object.
 boolean addFieldMapping(String componentBeanName, String dataFieldName)
          To map a single JComponents with a single field in the record format specified in recordIOManager object.
 boolean addFirstSelectedRecord()
          If multiple items are selected from a JComponent, only the first selected item is added to the database file.
 void addPropertyChangeListener(PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 boolean addRecord(int row)
          Add the data in row number row of a JComponent to the database file as new record.
 void cancelReadAllRecords()
          Depends on the size of the file(s), the operation of readAllRecords() may take a long time to complete.
protected  void checkTableComponent()
          User should never use this method, unexpected result may occur.
 void clearAllData()
          To clear data of all JComponents that have field associations inside the displayContainer.
 void closeFile()
          Close database files including joined files, then invoke clearAllData.
 void commit()
          Invoke RecordIOManager.commit.
static String Copyright()
          Copyright notice.
 boolean deleteRecord(int row)
          The record with the row number will be deleted.
 boolean deleteSelectedRecords()
          The records of selected rows of a JTable or JList or JComboBox will be deleted.
 void displayData(DefaultTableModel resultSetModel)
          Display data in resultSetModel onto the components.
 boolean endJournalPhysicalFile()
          Invoke RecordIOManager.endJournalPhysicalFile.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 boolean getAscendingOrder()
          Invoke RecordIOManager.getAscendingOrder.
 boolean getAutoChangeDataAttributes()
          Gets the autoChangeDataAttributes property value.
 String getDatabaseFieldValue(String libraryName, String fileName, String fieldName, int row)
          Return the database value of a field of the specified row from the result set of last file operation.
 int getDebugLevel()
          Gets the debugLevel property value.
 Container getDisplayContainer()
          Gets the displayContainer property (java.awt.Container) value.
protected  PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 boolean getReadingAll()
          Property readingAll indicates if method readAllRecords is still in action, because method readAllRecords is run in a separate thread.
 RecordIOManager getRecordIOManager()
          Gets the recordIOManager property value.
 int getRecordNumber(int row)
          Returns the record number of a row.
 DefaultTableModel getResultSetTableModel()
          Returns the resultSetTableModel of the last file operation.
 AS400 getSystem()
          Gets the AS400 system object of the server specified in property server.
 boolean getThreadUsed()
          Gets the threadUsed property value.
protected  void handleException(String messageHeader, Throwable e)
          Print a throwable exception to the console with a message header if debug is greater than 0.
protected  void handleException(Throwable e)
          Prints the Throwable e and its backtrace to the standard error stream if debug is greater than 0.
 void insertAfterCurrentRecord()
          Insert a new row of data after the current row in a JTable.
 void insertBeforeCurrentRecord()
          Insert a new row of data before the current row in a JTable.
 void joinDataBase(String[] foreignKeyNames, ListManager listMgr)
          To join the database file specified in property recordIOManager, with another database file specified in another ListManager's RecordIOManager object.
 boolean openFile()
          Opens a database file based on the property recordIOManager.
 boolean positionCursor(int recordNumber)
          Invoke RecordIOManager.positionCursor(int).
 boolean positionCursor(String[] keyValues)
          Invoke RecordIOManager.positionCursor(String[]).
 boolean positionCursorAfterLast()
          Invoke RecordIOManager.positionCursorAfterLast.
 boolean positionCursorBeforeFirst()
          Invoke RecordIOManager.positionCursorBeforeFirst.
 boolean positionCursorToFirst()
          Invoke RecordIOManager.positionCursorToFirst.
 boolean positionCursorToLast()
          Invoke RecordIOManager.positionCursorToLast.
 boolean positionCursorToNext()
          Invoke RecordIOManager.positionCursorToNext.
 boolean positionCursorToPrevious()
          Invoke RecordIOManager.positionCursorToPrevious.
 void propertyChange(PropertyChangeEvent e)
          Examine the PropertyChangeEvent and decides what to do on a particular event.
 void readAllRecords()
          Invoke RecordIOManager.readAllRecords and the data returned will be displayed on the JComponents that have field associations.
 boolean readAllRecordsEqual(String[] keyValues)
          Invoke RecordIOManager.readAllRecordsEqual and the data returned will be displayed on the JComponents that have field associations.
 boolean readFirstSetOfRecords()
          Invoke RecordIOManager.readFirstSetOfRecords and the data returned will be displayed on the JComponents that have field associations.
 boolean readNextRecord()
          Invoke RecordIOManager.readNextRecord and the data returned will be displayed on the JComponents that have field associations.
 boolean readNextRecordEqual(String[] keyValues)
          Invoke RecordIOManager.readNextRecordEqual and the data returned will be displayed on the JComponents that have field associations.
 boolean readNextSetOfRecords()
          Invoke RecordIOManager.readNextSetOfRecords and the data returned will be displayed on the JComponents that have field associations.
 boolean readPreviousRecord()
          Invoke RecordIOManager.readPreviousRecord and the data returned will be displayed on the JComponents that have field associations.
 boolean readPreviousRecordEqual(String[] keyValues)
          Invoke RecordIOManager.readPreviousRecordEqual and the data returned will be displayed on the JComponents that have field associations.
 boolean readPreviousSetOfRecords()
          Invoke RecordIOManager.readPreviousSetOfRecords and the data returned will be displayed on the JComponents that have field associations.
 boolean readRecord()
          Invoke RecordIOManager.readRecord and the data returned will be displayed on the JComponents that have field associations.
 boolean readRecord(int recordNumber)
          Invoke RecordIOManager.readRecord(int) and the data returned will be displayed on the JComponents that have field associations.
 boolean readRecord(String[] keyValues)
          Invoke RecordIOManager.readRecord(String[]) and the data returned will be displayed on the JComponents that have field associations.
 boolean readRecord(String[] keyValues, int searchType)
          Invoke RecordIOManager.readRecord(String[],int) and the data returned will be displayed on the JComponents that have field associations.
 boolean removeFieldMapping(String componentBeanName, String dataFieldName)
          To remove a field mapping that was added by addFieldMapping(String,String) or addFieldMapping(String[],String[]).
 void removePropertyChangeListener(PropertyChangeListener listener)
          The removePropertyChangeListener method was generated to support the propertyChange field.
 void rollback()
          Invoke RecordIOManager.rollback.
 void setAscendingOrder(boolean order)
          Set the order of record retrieval.
 void setAutoChangeDataAttributes(boolean autoChange)
          Sets the autoChangeDataAttributes property value.
 void setDebugLevel(int value)
          Sets the debug property value.
 void setDisplayContainer(Container container)
          Sets the displayContainer property (java.awt.Component) value.
 void setRecordIOManager(RecordIOManager reciomgr)
          Sets the recordIOManager property value.
protected  void setResultSetTableModel(DefaultTableModel resultSetModel)
          Insert the method's description here.
 void setSystem(AS400 as400)
          Sets the system property value.
 void setThreadUsed(boolean useThreads)
          Sets whether the bean uses threads in communication with the host servers.
 boolean startJournalPhysicalFile()
          Invoke RecordIOManager.startJournalPhysicalFile.
 boolean updateFirstSelectedRecord()
          If multiple items are selected from a JComponent, only the first selected item is updated to the database file.
 boolean updateRecord(int row)
          Update the data in row number row of a JComponent to the database file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

propertyChange

protected transient PropertyChangeSupport propertyChange
Constructor Detail

ListManager

public ListManager()
ListManager constructor.

Method Detail

addFieldMapping

public boolean addFieldMapping(String[] componentBeanName,
                               String[] dataFieldName)
To map multiple JComponents with multiple fields in the record format specified in recordIOManager object. The first element of componentBeanName maps to the first element of dataFieldName, and the second element of componentBeanName maps to the second element of dataFieldName, and so forth. If the number of elements in the two string arrays are different, then only the lesser number of elements will be mapped.

Parameters:
componentBeanName - String array that contains the bean names of JComponents.
dataFieldName - String array that contains the names of the fields in record format.
Returns:
True if field mapping is done successfully; false otherwise.
See Also:
addFieldMapping(String,String), removeFieldMapping(String,String)

addFieldMapping

public boolean addFieldMapping(String componentBeanName,
                               String dataFieldName)
To map a single JComponents with a single field in the record format specified in recordIOManager object.

Parameters:
componentBeanName - The bean name of a JComponents.
dataFieldName - The name of a field in record format.
Returns:
True if field mapping is done successfully; false otherwise.
See Also:
addFieldMapping(String[],String[]), removeFieldMapping(String,String)

addFirstSelectedRecord

public boolean addFirstSelectedRecord()
                               throws AS400Exception,
                                      AS400SecurityException,
                                      InterruptedException,
                                      IOException,
                                      InvalidFieldDataException
If multiple items are selected from a JComponent, only the first selected item is added to the database file. If database files are joined, then record will be added to each database file. Any missing fields will be defaulted to the following values according to their data type:
DATA TYPE DEFAULT VALUE
binary (B) 0
character (A) ""
DBCS Either (E) ""
DBCS Graphic (G) ""
DBCS Only (J) ""
DBCS Open (O) ""
date (L) "0001-01-01"
float (F) 0
hexadecimal (H) 0x40
packed decimal (P) 0
time (T) "00.00.00"
timestamp (Z) "0001-01-01-00.00.00.000000"
zoned decimal (S) 0

Returns:
True if record is added successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
InvalidFieldDataException - Invalid data in one or more fields.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
addRecord(int)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.


addRecord

public boolean addRecord(int row)
                  throws AS400Exception,
                         AS400SecurityException,
                         InterruptedException,
                         IOException,
                         InvalidFieldDataException
Add the data in row number row of a JComponent to the database file as new record. If the database file is joined, then record will be added to each database file. Any missing fields will have default values according to the field's data type.

Returns:
True if record is added successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
InvalidFieldDataException - Invalid data in one or more fields.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
addFirstSelectedRecord()

cancelReadAllRecords

public void cancelReadAllRecords()
Depends on the size of the file(s), the operation of readAllRecords() may take a long time to complete. This method allows user to cancel the readAllRecords operation at any time.

See Also:
readAllRecords()

checkTableComponent

protected void checkTableComponent()
User should never use this method, unexpected result may occur. This method is only to be invoked by classes within the same package internally.


clearAllData

public void clearAllData()
To clear data of all JComponents that have field associations inside the displayContainer.


closeFile

public void closeFile()
               throws AS400Exception,
                      AS400SecurityException,
                      InterruptedException,
                      IOException
Close database files including joined files, then invoke clearAllData.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
openFile()

commit

public void commit()
            throws AS400Exception,
                   AS400SecurityException,
                   InterruptedException,
                   IOException
Invoke RecordIOManager.commit.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
rollback(), RecordIOManager.commit()

Copyright

public static String Copyright()
Copyright notice.

Returns:
java.lang.String

deleteRecord

public boolean deleteRecord(int row)
                     throws RecordNotFoundException,
                            AS400Exception,
                            AS400SecurityException,
                            InterruptedException,
                            IOException
The record with the row number will be deleted. If the file is joined, records in joined databases will also be deleted. If there are more than one JComponent such as JTable, JComboBox or JList within the same displayContainer, delete records are not allowed. No actions is taken.

Parameters:
row - The row number of a JTable or JList or JComboBox. row 0 is the first row.
Returns:
True if record(s) is deleted successfully; false otherwise.
Throws:
RecordNotFoundException - Records of the specified row are not found.
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException

deleteSelectedRecords

public boolean deleteSelectedRecords()
                              throws RecordNotFoundException,
                                     AS400Exception,
                                     AS400SecurityException,
                                     InterruptedException,
                                     IOException
The records of selected rows of a JTable or JList or JComboBox will be deleted. If the database file is joined, records in joined databases will also be deleted. If there are more than one JComponent such as JTable, JComboBox or JList within the same displayContainer, delete records are not allowed. No actions is taken.

Returns:
True if record(s) are deleted successfully; false otherwise.
Throws:
RecordNotFoundException - Records of selected items are not found.
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException

displayData

public void displayData(DefaultTableModel resultSetModel)
Display data in resultSetModel onto the components.

Parameters:
DefaultTableModel - resultSetTableModel

endJournalPhysicalFile

public boolean endJournalPhysicalFile()
                               throws AS400Exception,
                                      AS400SecurityException,
                                      InterruptedException,
                                      IOException,
                                      ErrorCompletingRequestException,
                                      ExtendedIllegalStateException
Invoke RecordIOManager.endJournalPhysicalFile.

Returns:
True if the journal physical file is ended successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
com.ibm.as400.access.ErrorCompletingRequestException - If an error occurs before the request is completed.
com.ibm.as400.access.ExtendedIllegalStateException - An object is not in the proper state to perform the requested operation.
AS400Exception
AS400SecurityException
InterruptedException
IOException
ErrorCompletingRequestException
ExtendedIllegalStateException
See Also:
startJournalPhysicalFile(), RecordIOManager.endJournalPhysicalFile()

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
The firePropertyChange method was generated to support the propertyChange field.


getAscendingOrder

public boolean getAscendingOrder()
Invoke RecordIOManager.getAscendingOrder.

Returns:
boolean
See Also:
setAscendingOrder(boolean), RecordIOManager.getAscendingOrder()

getAutoChangeDataAttributes

public boolean getAutoChangeDataAttributes()
Gets the autoChangeDataAttributes property value. The default value is true. When autoChangeDataAttributes is true, and if the component is a JFormattedTableColumn, JFormattedList or JFormattedComboBox, then if the data attributes in the fieldModel of the component do not match with the database field attributes, such as the data length, data type, and decimal places, then the ListManager will automatically change the attributes for you. However, this will slightly affect the performance. If the debugLevel is 2, you can see what columns are being changed.

Returns:
boolean
See Also:
setAutoChangeDataAttributes(boolean)

getDatabaseFieldValue

public String getDatabaseFieldValue(String libraryName,
                                    String fileName,
                                    String fieldName,
                                    int row)
Return the database value of a field of the specified row from the result set of last file operation. If any of the parameter values are null, the return value will be null.

Parameters:
libraryName - java.lang.String
fileName - java.lang.String
fieldName - java.lang.String
Returns:
java.lang.String

getDebugLevel

public int getDebugLevel()
Gets the debugLevel property value. If debugLevel is 0, no exceptions, nor any messages will be displayed in the console. If debugLevel is 1, only exceptions are displayed in the console. If debugLevel is >=2, all messages including exceptions, error and informational messages are dumped on the console for debugging purpose. The default value is 1.

Returns:
int debug level.

getDisplayContainer

public Container getDisplayContainer()
Gets the displayContainer property (java.awt.Container) value. displayContainer can be any java.awt.Container, thus can be any JComponents, such as JPanel, JFrame, JDialog, JTable, JList, etc.

Specified by:
getDisplayContainer in interface ContainerManagement
Returns:
The displayContainer property value.
See Also:
setDisplayContainer(java.awt.Container)

getPropertyChange

protected PropertyChangeSupport getPropertyChange()
Accessor for the propertyChange field.


getReadingAll

public boolean getReadingAll()
Property readingAll indicates if method readAllRecords is still in action, because method readAllRecords is run in a separate thread.

Returns:
True if method readAllRecords has not complete its reading; false otherwise.

getRecordIOManager

public RecordIOManager getRecordIOManager()
Gets the recordIOManager property value. recordIOManager is for defining fields to work with in a record format, and attributes of a database file, and conditions in selecting records.

Specified by:
getRecordIOManager in interface ContainerManagement
Returns:
com.ibm.etools.iseries.ui.RecordIOManager object.
See Also:
setRecordIOManager(com.ibm.etools.iseries.ui.RecordIOManager)

getRecordNumber

public int getRecordNumber(int row)
Returns the record number of a row. If the row specified exceeds the the size of the table, -1 is returned. row 0 is first row in the table.

Parameters:
row - int
Returns:
int record number

getResultSetTableModel

public DefaultTableModel getResultSetTableModel()
Returns the resultSetTableModel of the last file operation.

Returns:
javax.swing.table.DefaultTableModel

getSystem

public AS400 getSystem()
Gets the AS400 system object of the server specified in property server.

Returns:
The com.ibm.as400.access.AS400 system object.
See Also:
setSystem(AS400)

getThreadUsed

public boolean getThreadUsed()
Gets the threadUsed property value. The default value is true. If your application needs to be compliant with the Enterprise Java Beans specification, you might want to set threadUsed to false.

Returns:
boolean
See Also:
setThreadUsed(boolean)

handleException

protected void handleException(String messageHeader,
                               Throwable e)
Print a throwable exception to the console with a message header if debug is greater than 0.

Parameters:
messageHeader - java.lang.String
e - java.lang.Throwable

handleException

protected void handleException(Throwable e)
Prints the Throwable e and its backtrace to the standard error stream if debug is greater than 0.

Parameters:
e - java.lang.Throwable

insertAfterCurrentRecord

public void insertAfterCurrentRecord()
Insert a new row of data after the current row in a JTable. A blank row will be a added after the first selected row in a JTable. This method has effect on a JTable or JFormattedTable only. When user has finished entering data in the new row, by selecting a different row, the new row will automatically be added into the database file if its openType is com.ibm.etools.iseries.ui.RecordIOManager.OPENTYPE_READ_WRITE. A new row of data cannot be added to a JList or JComboBox.

Parameters:
jtable - com.sun.java.swing.JTable

insertBeforeCurrentRecord

public void insertBeforeCurrentRecord()
Insert a new row of data before the current row in a JTable. A blank row will be a added before the first selected row in a JTable. This method has effect on a JTable or JFormattedTable only. When user has finished entering data in the new row, by selecting a different row, the new row will automatically be added into the database file if its openType is com.ibm.etools.iseries.ui.RecordIOManager.OPENTYPE_READ_WRITE. A new row of data cannot be added to a JList or JComboBox.

Parameters:
jtable - com.sun.java.swing.JTable

joinDataBase

public void joinDataBase(String[] foreignKeyNames,
                         ListManager listMgr)
To join the database file specified in property recordIOManager, with another database file specified in another ListManager's RecordIOManager object. Joined database files have to be in keyed file access.

Parameters:
foreignKeyNames - A string array that contains the names of the foreign keys, the field names that join the two database files together with equal values.
listMgr - ListManager object to be joined. It is actually joining the database file defined in the property recordIOManager of listMgr.
See Also:
RecordIOManager.joinDataBase(java.lang.String[], com.ibm.etools.iseries.ui.RecordIOManager)

openFile

public boolean openFile()
                 throws DisplayContainerNotFoundException,
                        AS400Exception,
                        AS400SecurityException,
                        InterruptedException,
                        IOException,
                        IllegalPathNameException
Opens a database file based on the property recordIOManager. If the database file is joined, the joined database files are also opened.

Returns:
True if file is opened successfully; false otherwise.
Throws:
DisplayContainerNotFoundException - Display container is not defined or not found.
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
com.ibm.as400.access.IllegalPathNameException - Indicates that the integrated file system path name is not valid.
AS400Exception
AS400SecurityException
InterruptedException
IOException
IllegalPathNameException
See Also:
closeFile(), RecordIOManager.openFile()

positionCursor

public boolean positionCursor(String[] keyValues)
                       throws AS400Exception,
                              AS400SecurityException,
                              InterruptedException,
                              IOException
Invoke RecordIOManager.positionCursor(String[]). If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record.
Returns:
True if cursor can be position to record with the specified keys; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursor(String[])

positionCursor

public boolean positionCursor(int recordNumber)
                       throws AS400Exception,
                              AS400SecurityException,
                              InterruptedException,
                              IOException
Invoke RecordIOManager.positionCursor(int). If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Parameters:
recordNumber - The record number of the record to which cursor is positioned.
Returns:
True if cursor can be position to the specified recordNumber; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursor(int)

positionCursorAfterLast

public boolean positionCursorAfterLast()
                                throws AS400Exception,
                                       AS400SecurityException,
                                       InterruptedException,
                                       IOException
Invoke RecordIOManager.positionCursorAfterLast. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to after the last record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorAfterLast()

positionCursorBeforeFirst

public boolean positionCursorBeforeFirst()
                                  throws AS400Exception,
                                         AS400SecurityException,
                                         InterruptedException,
                                         IOException
Invoke RecordIOManager.positionCursorBeforeFirst. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to before the first record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorBeforeFirst()

positionCursorToFirst

public boolean positionCursorToFirst()
                              throws AS400Exception,
                                     AS400SecurityException,
                                     InterruptedException,
                                     IOException
Invoke RecordIOManager.positionCursorToFirst. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to the first record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorToFirst()

positionCursorToLast

public boolean positionCursorToLast()
                             throws AS400Exception,
                                    AS400SecurityException,
                                    InterruptedException,
                                    IOException
Invoke RecordIOManager.positionCursorToLast. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to the last record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorToLast()

positionCursorToNext

public boolean positionCursorToNext()
                             throws AS400Exception,
                                    AS400SecurityException,
                                    InterruptedException,
                                    IOException
Invoke RecordIOManager.positionCursorToNext. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to the next record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorToNext()

positionCursorToPrevious

public boolean positionCursorToPrevious()
                                 throws AS400Exception,
                                        AS400SecurityException,
                                        InterruptedException,
                                        IOException
Invoke RecordIOManager.positionCursorToPrevious. If the database file is not opened, it will be opened automatically prior to positioning the cursor. This file operation does not affect resultSetTableModel.

Returns:
True if the file cursor can be positioned to the previous record; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.positionCursorToPrevious()

propertyChange

public void propertyChange(PropertyChangeEvent e)
Examine the PropertyChangeEvent and decides what to do on a particular event.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - PropertyChangeEvent

readAllRecords

public void readAllRecords()
                    throws AS400Exception,
                           AS400SecurityException,
                           InterruptedException,
                           IOException
Invoke RecordIOManager.readAllRecords and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readAllRecords(), cancelReadAllRecords()

readAllRecordsEqual

public boolean readAllRecordsEqual(String[] keyValues)
                            throws AS400Exception,
                                   AS400SecurityException,
                                   InterruptedException,
                                   IOException
Invoke RecordIOManager.readAllRecordsEqual and the data returned will be displayed on the JComponents that have field associations.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record. The keyValues may be a partial key.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readAllRecordsEqual(java.lang.String[]), RecordIOManager.readRecord(String[])

readFirstSetOfRecords

public boolean readFirstSetOfRecords()
                              throws AS400Exception,
                                     AS400SecurityException,
                                     InterruptedException,
                                     IOException
Invoke RecordIOManager.readFirstSetOfRecords and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readFirstSetOfRecords()

readNextRecord

public boolean readNextRecord()
                       throws AS400Exception,
                              AS400SecurityException,
                              InterruptedException,
                              IOException
Invoke RecordIOManager.readNextRecord and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readNextRecord()

readNextRecordEqual

public boolean readNextRecordEqual(String[] keyValues)
                            throws AS400Exception,
                                   AS400SecurityException,
                                   InterruptedException,
                                   IOException
Invoke RecordIOManager.readNextRecordEqual and the data returned will be displayed on the JComponents that have field associations.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record. The keyValues may be a partial key.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readNextRecordEqual(java.lang.String[]), RecordIOManager.readRecord(String[])

readNextSetOfRecords

public boolean readNextSetOfRecords()
                             throws AS400Exception,
                                    AS400SecurityException,
                                    InterruptedException,
                                    IOException
Invoke RecordIOManager.readNextSetOfRecords and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readNextSetOfRecords()

readPreviousRecord

public boolean readPreviousRecord()
                           throws AS400Exception,
                                  AS400SecurityException,
                                  InterruptedException,
                                  IOException
Invoke RecordIOManager.readPreviousRecord and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readPreviousRecord()

readPreviousRecordEqual

public boolean readPreviousRecordEqual(String[] keyValues)
                                throws AS400Exception,
                                       AS400SecurityException,
                                       InterruptedException,
                                       IOException
Invoke RecordIOManager.readPreviousRecordEqual and the data returned will be displayed on the JComponents that have field associations.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record. The keyValues may be a partial key.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readPreviousRecordEqual(java.lang.String[]), RecordIOManager.readRecord(String[])

readPreviousSetOfRecords

public boolean readPreviousSetOfRecords()
                                 throws AS400Exception,
                                        AS400SecurityException,
                                        InterruptedException,
                                        IOException
Invoke RecordIOManager.readPreviousSetOfRecords and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readPreviousSetOfRecords()

readRecord

public boolean readRecord()
                   throws AS400Exception,
                          AS400SecurityException,
                          InterruptedException,
                          IOException
Invoke RecordIOManager.readRecord and the data returned will be displayed on the JComponents that have field associations.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readRecord()

readRecord

public boolean readRecord(String[] keyValues)
                   throws AS400Exception,
                          AS400SecurityException,
                          InterruptedException,
                          IOException
Invoke RecordIOManager.readRecord(String[]) and the data returned will be displayed on the JComponents that have field associations.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record. The key may be a partial key.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readRecord(String[])

readRecord

public boolean readRecord(String[] keyValues,
                          int searchType)
                   throws AS400Exception,
                          AS400SecurityException,
                          InterruptedException,
                          IOException
Invoke RecordIOManager.readRecord(String[],int) and the data returned will be displayed on the JComponents that have field associations.

Parameters:
keyValues - The String array that contains the string values which make up the key with which to find the record. The key may be a partial key.
searchType - Valid values are:
  • RecordIOManager.SEARCHTYPE_KEY_EQ
  • RecordIOManager.SEARCHTYPE_KEY_GE
  • RecordIOManager.SEARCHTYPE_KEY_GT
  • RecordIOManager.SEARCHTYPE_KEY_LE
  • RecordIOManager.SEARCHTYPE_KEY_LT
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readRecord(String[],int)

readRecord

public boolean readRecord(int recordNumber)
                   throws AS400Exception,
                          AS400SecurityException,
                          InterruptedException,
                          IOException
Invoke RecordIOManager.readRecord(int) and the data returned will be displayed on the JComponents that have field associations.

Parameters:
recordNumber - Record with this record number will be read.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
RecordIOManager.readRecord(int)

removeFieldMapping

public boolean removeFieldMapping(String componentBeanName,
                                  String dataFieldName)
To remove a field mapping that was added by addFieldMapping(String,String) or addFieldMapping(String[],String[]).

Parameters:
componentBeanName - The bean name of a JComponents.
dataFieldName - The name of a field in record format.
Returns:
True if field mapping is removed successfully; false otherwise.
See Also:
addFieldMapping(String[],String[]), addFieldMapping(String,String), removeFieldMapping(String,String)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.


rollback

public void rollback()
              throws AS400Exception,
                     AS400SecurityException,
                     InterruptedException,
                     IOException
Invoke RecordIOManager.rollback.

Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
commit(), RecordIOManager.rollback()

setAscendingOrder

public void setAscendingOrder(boolean order)
Set the order of record retrieval. This method will invoke RecordIOManager.setAscendingOrder.

Parameters:
ascendingOrder - True for ascending order, false for descending order.
See Also:
RecordIOManager.setAscendingOrder(boolean)

setAutoChangeDataAttributes

public void setAutoChangeDataAttributes(boolean autoChange)
Sets the autoChangeDataAttributes property value. The default value is true. When autoChangeDataAttributes is true, and if the component is a JFormattedTableColumn, JFormattedList or JFormattedComboBox, then if the data attributes in the fieldModel of the component do not match with the database field attributes, such as the data length, data type, and decimal places, then the ListManager will automatically change the attributes for you. However, this will slightly affect the performance. If the debugLevel is 2, you can see what columns are being changed.

Parameters:
autoChange - - true to change dataAttributes automatically; false not to change even if there is mismatch.
See Also:
getAutoChangeDataAttributes()

setDebugLevel

public void setDebugLevel(int value)
Sets the debug property value. This method will also invoke RecordIOManager.setDebugLevel.

Parameters:
value -
  • 0 - no exceptions nor messages will be dumped on the console for debugging purpose.
  • 1 - only exceptions will be dumped on the console.
  • 2 - exceptions, error and informational messages will be dumped on the console.
See Also:
getDebugLevel(), RecordIOManager.setDebugLevel(int)

setDisplayContainer

public void setDisplayContainer(Container container)
Sets the displayContainer property (java.awt.Component) value.

Specified by:
setDisplayContainer in interface ContainerManagement
Parameters:
container - Can be any java.awt.Container, thus can be any JComponents, such as JPanel, JFrame, JDialog, JTable, JList, etc.
See Also:
getDisplayContainer()

setRecordIOManager

public void setRecordIOManager(RecordIOManager reciomgr)
Sets the recordIOManager property value.

Specified by:
setRecordIOManager in interface ContainerManagement
Parameters:
reciomgr - RecordIOManager object for defining fields to work with in a record format, and attributes of a database file, and conditions in selecting records.
See Also:
getRecordIOManager()

setResultSetTableModel

protected void setResultSetTableModel(DefaultTableModel resultSetModel)
Insert the method's description here.

Parameters:
resultSetModel - javax.swing.table.DefaultTableModel

setSystem

public void setSystem(AS400 as400)
Sets the system property value. This method will also invoke RecordIOManager.setSystem(AS400). If system is set, system has preference over the values set for server, userid and password in RecordIOManager; and system's threadUsed will be used to determine if threading is allowed.

Parameters:
system - The com.ibm.as400.access.AS400 system object of the server specified in property server.
See Also:
getSystem(), RecordIOManager.setSystem(AS400)

setThreadUsed

public void setThreadUsed(boolean useThreads)
Sets whether the bean uses threads in communication with the host servers. The default is true. Letting the bean use threads may be beneficial to performance, turning threads off may be necessary if your application needs to be compliant with the Enterprise Java Beans specification. The thread used property cannot be changed once a connection to the AS/400 has been established. If there is a call to setSystem(AS400 as400), the threadUsed value of system as400 will be used instead, and this useThreads value will be ignored.

Parameters:
useThreads - - true to use threads; false otherwise.
See Also:
getThreadUsed()

startJournalPhysicalFile

public boolean startJournalPhysicalFile()
                                 throws AS400Exception,
                                        AS400SecurityException,
                                        InterruptedException,
                                        IOException,
                                        ErrorCompletingRequestException,
                                        ExtendedIllegalStateException
Invoke RecordIOManager.startJournalPhysicalFile.

Returns:
True if the journal physical file is started successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
com.ibm.as400.access.ErrorCompletingRequestException - If an error occurs before the request is completed.
com.ibm.as400.access.ExtendedIllegalStateException - An object is not in the proper state to perform the requested operation.
AS400Exception
AS400SecurityException
InterruptedException
IOException
ErrorCompletingRequestException
ExtendedIllegalStateException
See Also:
endJournalPhysicalFile(), RecordIOManager.startJournalPhysicalFile()

updateFirstSelectedRecord

public boolean updateFirstSelectedRecord()
                                  throws RecordNotFoundException,
                                         AS400Exception,
                                         AS400SecurityException,
                                         InterruptedException,
                                         IOException,
                                         InvalidFieldDataException
If multiple items are selected from a JComponent, only the first selected item is updated to the database file. If database files are joined, then record will be updated to each database file. All the missing fields will retain the original value in the record.

Returns:
True if record is added successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
InvalidFieldDataException - Invalid data in one or more fields.
RecordNotFoundException
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
updateRecord(int)

updateRecord

public boolean updateRecord(int row)
                     throws RecordNotFoundException,
                            AS400Exception,
                            AS400SecurityException,
                            InterruptedException,
                            IOException,
                            InvalidFieldDataException
Update the data in row number row of a JComponent to the database file. If the database file is joined, then record will be updated to each database file. All the missing fields will retain the original value in the record.

Returns:
True if record is added successfully; false otherwise.
Throws:
com.ibm.as400.access.AS400Exception - If the AS/400 system returns an error message.
com.ibm.as400.access.AS400SecurityException - If a security or authority error occurs.
com.ibm.as400.access.InterruptedException - If this thread is interrupted.
com.ibm.as400.access.IOException - If an error occurs while communicating with the AS/400.
InvalidFieldDataException - Invalid data in one or more fields.
RecordNotFoundException
AS400Exception
AS400SecurityException
InterruptedException
IOException
See Also:
updateFirstSelectedRecord()

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.