com.ibm.as400.util.servlet

Class ListMetaData

  • java.lang.Object
    • com.ibm.as400.util.servlet.ListMetaData
  • All Implemented Interfaces:
    RowMetaData, java.io.Serializable


    public class ListMetaData
    extends java.lang.Object
    implements RowMetaData, java.io.Serializable
    A ListMetaData object can be used to find out information about the columns of a ListRowData object.

    ListMetaData objects generate the following events:

    • PropertyChangeEvent
    • VetoableChangeEvent
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ListMetaData()
      Constructs a default ListMetaData object.
      ListMetaData(int columns)
      Constructs a ListMetaData object with the specified number of columns.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
      Adds a PropertyChangeListener.
      void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
      Adds the VetoableChangeListener.
      java.lang.String getColumnAlignment(int columnIndex)
      Returns the alignment of the column specified by columnIndex.
      int getColumnCount()
      Returns the number of columns.
      java.lang.String getColumnDirection(int columnIndex)
      Returns the direction of the column specified by columnIndex.
      int getColumnDisplaySize(int columnIndex)
      Returns the display size in characters of the column specified by columnIndex.
      java.lang.String getColumnLabel(int columnIndex)
      Returns the label of the column specified by columnIndex.
      java.lang.String getColumnName(int columnIndex)
      Returns the name of the column specified by columnIndex.
      int getColumnType(int columnIndex)
      Returns the data type of the column specified by columnIndex.
      java.lang.String getColumnTypeName(int columnIndex)
      Returns the data type name of the column specified by columnIndex.
      int getPrecision(int columnIndex)
      Returns the precision of the column specified by columnIndex.
      int getScale(int columnIndex)
      Returns the scale of the column specified by columnIndex.
      boolean isNumericData(int columnIndex)
      Indicates if the data type is numeric data.
      boolean isTextData(int columnIndex)
      Indicates if the data type is text data.
      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 setColumnAlignment(int columnIndex, java.lang.String alignment)
      Sets the specified horizontal alignment for the column data specified by columnIndex.
      void setColumnDirection(int columnIndex, java.lang.String dir)
      Sets the specified direction for the column data specified by columnIndex.
      void setColumnDisplaySize(int columnIndex, int displaySize)
      Sets the specified displaySize for the column specified by columnIndex.
      void setColumnLabel(int columnIndex, java.lang.String label)
      Sets the specified label for the column specified by columnIndex.
      void setColumnName(int columnIndex, java.lang.String name)
      Sets the specified name for the column specified by columnIndex.
      void setColumns(int columns)
      Sets the number of columns.
      void setColumnType(int columnIndex, int type)
      Sets the specified data type for the column specified by columnIndex.
      • Methods inherited from class java.lang.Object

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

      • ListMetaData

        public ListMetaData()
        Constructs a default ListMetaData object.
      • ListMetaData

        public ListMetaData(int columns)
        Constructs a ListMetaData object with the specified number of columns.
        Parameters:
        columns - The number of columns.
    >
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method is 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 is called each time the value of any constrained property is changed.
        Parameters:
        listener - The VetoableChangeListener.
        See Also:
        removeVetoableChangeListener(java.beans.VetoableChangeListener)
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns.
        Specified by:
        getColumnCount in interface RowMetaData
        Returns:
        The column count.
      • getColumnDisplaySize

        public int getColumnDisplaySize(int columnIndex)
        Returns the display size in characters of the column specified by columnIndex.
        Specified by:
        getColumnDisplaySize in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column display size in characters.
      • getColumnLabel

        public java.lang.String getColumnLabel(int columnIndex)
        Returns the label of the column specified by columnIndex.
        Specified by:
        getColumnLabel in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column label.
      • getColumnName

        public java.lang.String getColumnName(int columnIndex)
        Returns the name of the column specified by columnIndex.
        Specified by:
        getColumnName in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column name.
      • getColumnType

        public int getColumnType(int columnIndex)
        Returns the data type of the column specified by columnIndex.
        Specified by:
        getColumnType in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column RowMetaDataType.
        See Also:
        RowMetaDataType
      • getColumnAlignment

        public java.lang.String getColumnAlignment(int columnIndex)
        Returns the alignment of the column specified by columnIndex.
        Specified by:
        getColumnAlignment in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The horizontal column alignment. One of the following constants defined in HTMLConstants: LEFT, CENTER, RIGHT, or JUSTIFY.
        See Also:
        HTMLConstants
      • getColumnDirection

        public java.lang.String getColumnDirection(int columnIndex)
        Returns the direction of the column specified by columnIndex.
        Specified by:
        getColumnDirection in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column direction.
        See Also:
        HTMLConstants
      • getColumnTypeName

        public java.lang.String getColumnTypeName(int columnIndex)
        Returns the data type name of the column specified by columnIndex.
        Specified by:
        getColumnTypeName in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column data type name.
      • getPrecision

        public int getPrecision(int columnIndex)
        Returns the precision of the column specified by columnIndex. This value is not used. It will always return zero.
        Specified by:
        getPrecision in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column precision (number of decimal digits).
      • getScale

        public int getScale(int columnIndex)
        Returns the scale of the column specified by columnIndex. This value is not used. It will always return zero.
        Specified by:
        getScale in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        The column scale (number of digits to the right of the decimal point).
      • isNumericData

        public boolean isNumericData(int columnIndex)
        Indicates if the data type is numeric data.
        Specified by:
        isNumericData in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        true if numeric data; false otherwise.
      • isTextData

        public boolean isTextData(int columnIndex)
        Indicates if the data type is text data.
        Specified by:
        isTextData in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        Returns:
        true if text data; false otherwise.
      • 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)
      • setColumnAlignment

        public void setColumnAlignment(int columnIndex,
                              java.lang.String alignment)
        Sets the specified horizontal alignment for the column data specified by columnIndex.
        Specified by:
        setColumnAlignment in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        alignment - The horizontal column alignment. One of the following constants defined in HTMLConstants: LEFT, CENTER, RIGHT, or JUSTIFY.
        See Also:
        HTMLConstants
      • setColumnDirection

        public void setColumnDirection(int columnIndex,
                              java.lang.String dir)
        Sets the specified direction for the column data specified by columnIndex.
        Specified by:
        setColumnDirection in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        dir - The column direction.
        See Also:
        HTMLConstants
      • setColumnDisplaySize

        public void setColumnDisplaySize(int columnIndex,
                                int displaySize)
        Sets the specified displaySize for the column specified by columnIndex.
        Parameters:
        columnIndex - The column index (0-based).
        displaySize - The column display size in characters.
      • setColumnLabel

        public void setColumnLabel(int columnIndex,
                          java.lang.String label)
        Sets the specified label for the column specified by columnIndex.
        Specified by:
        setColumnLabel in interface RowMetaData
        Parameters:
        columnIndex - The column index (0-based).
        label - The column label.
      • setColumnName

        public void setColumnName(int columnIndex,
                         java.lang.String name)
        Sets the specified name for the column specified by columnIndex.
        Parameters:
        columnIndex - The column index (0-based).
        name - The column name.
      • setColumns

        public void setColumns(int columns)
                        throws java.beans.PropertyVetoException
        Sets the number of columns. Any previous column information is cleared.
        Parameters:
        columns - The number of columns.
        Throws:
        java.beans.PropertyVetoException - If a change is vetoed.
      • setColumnType

        public void setColumnType(int columnIndex,
                         int type)
        Sets the specified data type for the column specified by columnIndex.
        Parameters:
        columnIndex - The column index (0-based).
        type - The RowMetaDataType type.
        See Also:
        RowMetaDataType