com.ibm.as400.access

Class DataArea

  • java.lang.Object
    • com.ibm.as400.access.DataArea
  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CharacterDataArea, DecimalDataArea, LocalDataArea, LogicalDataArea


    public abstract class DataArea
    extends java.lang.Object
    implements java.io.Serializable
    The DataArea class is an abstract base class that represents a data area object.

    DataArea objects generate the following events:

    • DataAreaEvent
      • DA_CLEARED
      • DA_CREATED
      • DA_DELETED
      • DA_READ
      • DA_WRITTEN
    • PropertyChangeEvent
    • VetoableChangeEvent
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      DataArea()
      Constructs a DataArea object.
      DataArea(AS400 system, java.lang.String path)
      Constructs a DataArea object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addDataAreaListener(DataAreaListener listener)
      Adds a data area listener to receive data area events from this data area.
      void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
      Adds a PropertyChangeListener.
      void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
      Adds the VetoableChangeListener.
      int getLength()
      Returns the size of the data area.
      java.lang.String getName()
      Returns the data area name.
      AS400 getSystem()
      Returns the AS400 system object for the data area.
      void refreshAttributes()
      Refreshes the attributes of the data area.
      void removeDataAreaListener(DataAreaListener listener)
      Removes the DataAreaListener from the internal list.
      void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
      Removes the PropertyChangeListener from the internal list.
      void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
      Removes the VetoableChangeListener from the internal list.
      void setSystem(AS400 system)
      Sets the system on which the data area exists.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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,
                java.lang.String path)
        Constructs a DataArea object. It creates a DataArea instance that represents the data area path on system.
        Parameters:
        system - The system 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
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.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(java.beans.PropertyChangeListener)
      • addVetoableChangeListener

        public void addVetoableChangeListener(java.beans.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(java.beans.VetoableChangeListener)
      • getName

        public java.lang.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.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.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(java.beans.PropertyChangeListener)
      • removeVetoableChangeListener

        public void removeVetoableChangeListener(java.beans.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(java.beans.VetoableChangeListener)
      • setSystem

        public void setSystem(AS400 system)
                       throws java.beans.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 system on which the data area exists.
        Throws:
        java.beans.PropertyVetoException - If the change is vetoed.