All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.DataArea

java.lang.Object
   |
   +----com.ibm.as400.access.DataArea

public abstract class DataArea
extends Object
implements Serializable
The DataArea class is an abstract base class that represents an AS/400 data area object.

DataArea objects generate the following events:


Constructor Index

 o DataArea()
Constructs a DataArea object.
 o DataArea(AS400, String)
Constructs a DataArea object.

Method Index

 o addDataAreaListener(DataAreaListener)
Adds a data area listener to receive data area events from this data area.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the VetoableChangeListener.
 o getLength()
Returns the size of the data area.
 o getName()
Returns the data area name.
 o getSystem()
Returns the AS400 system object for the data area.
 o refreshAttributes()
Refreshes the attributes of the data area.
 o removeDataAreaListener(DataAreaListener)
Removes the DataAreaListener from the internal list.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the VetoableChangeListener from the internal list.
 o setSystem(AS400)
Sets the system on which the data area exists.

Constructors

 o DataArea
 public DataArea()
Constructs a DataArea object. It creates a default DataArea object. The system and path properties must be set before attempting a connection.

 o DataArea
 public DataArea(AS400 system,
                 String path)
Constructs a DataArea object. It creates a DataArea instance that represents the data area path on system.

Parameters:
system - The AS/400 that contains the data area.
path - The fully qualified integrated file system path name. The integrated file system file extension for a data area is DTAARA. An example of a fully qualified integrated file system path to a data area "MYDATA" in library "MYLIB" is: /QSYS.LIB/MYLIB.LIB/MYDATA.DTAARA

Methods

 o addDataAreaListener
 public void addDataAreaListener(DataAreaListener listener)
Adds a data area listener to receive data area events from this data area.

Parameters:
listener - The data area listener.
See Also:
removeDataAreaListener
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method will be called each time the value of any bound property is changed.

Parameters:
listener - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds the VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method will be called each time the value of any constrained property is changed.

Parameters:
listener - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o getLength
 public int getLength() throws AS400SecurityException, ErrorCompletingRequestException, IllegalObjectTypeException, InterruptedException, IOException, ObjectDoesNotExistException, PropertyVetoException
Returns the size of the data area.

Returns:
The size of the data area.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: IllegalObjectTypeException
If the AS/400 object is not the required type.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: PropertyVetoException
If the change is vetoed.
 o getName
 public String getName()
Returns the data area name.

Returns:
The name of the data area.
 o getSystem
 public AS400 getSystem()
Returns the AS400 system object for the data area.

Returns:
The AS400 system object for the data area.
 o refreshAttributes
 public void refreshAttributes() throws AS400SecurityException, ErrorCompletingRequestException, IllegalObjectTypeException, InterruptedException, IOException, ObjectDoesNotExistException, PropertyVetoException
Refreshes the attributes of the data area. This method should be called if the underlying AS/400 data area has changed and it is desired that this object should reflect those changes.

Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: IllegalObjectTypeException
If the AS/400 object is not the required type.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: PropertyVetoException
If the change is vetoed.
 o removeDataAreaListener
 public synchronized void removeDataAreaListener(DataAreaListener listener)
Removes the DataAreaListener from the internal list. If the DataAreaListener is not on the list, nothing is done.

Parameters:
listener - The data area listener.
See Also:
addDataAreaListener
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
listener - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the VetoableChangeListener from the internal list. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
listener - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setSystem
 public void setSystem(AS400 system) throws PropertyVetoException
Sets the system on which the data area exists. The system cannot be set if a connection has already been established.

Parameters:
system - The AS/400 system on which the data area exists.
Throws: PropertyVetoException
If the change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index