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:
- DataAreaEvent
- DA_CLEARED
- DA_CREATED
- DA_DELETED
- DA_READ
- DA_WRITTEN
- PropertyChangeEvent
- VetoableChangeEvent
-
DataArea()
- Constructs a DataArea object.
-
DataArea(AS400, String)
- Constructs a DataArea object.
-
addDataAreaListener(DataAreaListener)
- Adds a data area listener to receive data area events from this data area.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds the VetoableChangeListener.
-
getLength()
- Returns the size of the data area.
-
getName()
- Returns the data area name.
-
getSystem()
- Returns the AS400 system object for the data area.
-
refreshAttributes()
- Refreshes the attributes of the data area.
-
removeDataAreaListener(DataAreaListener)
- Removes the DataAreaListener from the internal list.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes the PropertyChangeListener from the internal list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes the VetoableChangeListener from the internal list.
-
setSystem(AS400)
- Sets the system on which the data area exists.
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.
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
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
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
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
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.
getName
public String getName()
- Returns the data area name.
- Returns:
- The name of the data area.
getSystem
public AS400 getSystem()
- Returns the AS400 system object for the data area.
- Returns:
- The AS400 system object for the data area.
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.
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
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
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
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