Class ResultSetColumnProp

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, IVSColumnBestValueListener, IVSColumnListener, IVSComponentListener, IVSComponentState, IVSTableColumnReferenceOwner, Cloneable
Direct Known Subclasses:
EditorResultSetColumnProp

The result set Column property that connects the column name in a result set with a VSColumnHeader.
Author:
Christopher Mindus
  • Field Details Link icon

  • Constructor Details Link icon

    • ResultSetColumnProp Link icon

      public ResultSetColumnProp()
      Creates a ResultSetColumnProp property container with the specified name with a null value.
    • ResultSetColumnProp Link icon

      public ResultSetColumnProp(Atom propertyAtom)
      Creates a ResultSetColumnProp property container with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
  • Method Details Link icon

    • clone Link icon

      public ResultSetColumnProp clone()
      Clones this VSVariable instance.
      Overrides:
      clone in class AbstractVSVariable<VSColumnHeader,VSTableColumnReference>
    • getResultSetProps Link icon

      public ResultSetProps getResultSetProps()
      Gets the Result Set properties.
      Returns:
      The result set properties, or null if this property is orphaned.
    • getVSPropertyClass Link icon

      public Class<VSColumnHeader> getVSPropertyClass()
      Gets the class wanted for the VS component being referenced.
      Specified by:
      getVSPropertyClass in class AbstractVSVariable<VSColumnHeader,VSTableColumnReference>
      Returns:
      VSColumnHeader.class.
    • getVSReferenceClass Link icon

      public Class<VSTableColumnReference> getVSReferenceClass()
      Gets the class wanted for VS references.
      Specified by:
      getVSReferenceClass in class AbstractVSVariable<VSColumnHeader,VSTableColumnReference>
      Returns:
      VSTableColumnReference.class.
    • getVSTableReferenceOwnerData Link icon

      public VSReferenceOwnerData<VSTable,VSTableReference> getVSTableReferenceOwnerData()
      Gets the table reference owner data for the table column reference.
      Specified by:
      getVSTableReferenceOwnerData in interface IVSTableColumnReferenceOwner
      Returns:
      The VSReferenceOwnerData instance, always non-null.
    • getVSTable Link icon

      public VSTable getVSTable(VSTableColumnReference ref)
      Gets the VSTable for a VSTableColumnReference instance.
      Specified by:
      getVSTable in interface IVSTableColumnReferenceOwner
      Parameters:
      ref - The reference instance, null when property-editing the reference in the Designer.
      Returns:
      The table for the reference, or null if not found.
    • getVSColumn Link icon

      public VSColumnHeader getVSColumn()
      Gets the VSColumnHeader.
      Returns:
      The VSColumnHeader associated, or null for none (or unresolved).
    • setColumnIndex Link icon

      protected void setColumnIndex(int index)
      Sets the column index.

      This method is used internally by the Designer during creation of the SQL statement and should not be called elsewhere.

      Parameters:
      index - The column index.
    • getColumnIndex Link icon

      public int getColumnIndex()
      Gets the column index in the Result Set.
      Returns:
      The column index, or -1 if SQL statement is not yet parsed in the Designer, or if the column has been left "hanging around" and not yet deleted (this is a problem with warning severity level). This value should NEVER be -1 in the Server, unless it's running in Development Mode!
    • setColumnName Link icon

      protected void setColumnName(String name)
      Sets the column name, this method is used by the Designer.
      Parameters:
      name - The name of the column.
    • getColumnName Link icon

      public String getColumnName()
      Gets the column label as the SQL statement defines it.
      Returns:
      The name of the column.
    • setColumnLabel Link icon

      protected void setColumnLabel(String label)
      Sets the column name, this method is used by the Designer.
      Parameters:
      label - The name of the column to set, or null to clear it.
    • getColumnLabel Link icon

      public String getColumnLabel()
      Gets the column label as the SQL statement defines it.

      This is the label for the column specified with the SQL AS clause.

      Returns:
      The label of the column, or null for none.
    • setSQLDataType Link icon

      protected void setSQLDataType(int type)
      Sets the SQL data type.

      This method is used internally by the Designer during creation of the SQL statement and should not be called elsewhere.

      Parameters:
      type - The SQL data type for the column as defined by Types.
    • getSQLDataType Link icon

      public int getSQLDataType()
      Gets the SQL data type.
      Returns:
      The SQL data type for the column as defined by Types, or 0 if SQL statement is not yet parsed in the Designer, or if the column has been left "hanging around" and not yet deleted (this is a problem with warning severity level). This value should NEVER be 0 in the Server, unless it's running in Development Mode!
    • getSQLDataTypeString Link icon

      public String getSQLDataTypeString()
      Gets the SQL data type string.
      Returns:
      The SQL data type for the column as defined by Types, or "unknown" if not found or undefined
    • isNullable Link icon

      public boolean isNullable()
      Checks if NULL is allowed for values in this column.
      Returns:
      The Null-Allowed flag (i.e. NOT NOT NULL), default true.
    • setNullable Link icon

      protected void setNullable(boolean isAllowed)
      Sets if NULL is allowed for values in this column.
      Parameters:
      isAllowed - The Null-Allowed flag (i.e. NOT NOT NULL).
    • getDescription Link icon

      public String getDescription()
      Gets the column description.
      Returns:
      A description, or null for none.
    • getBestVSColumnHeaderValueType Link icon

      public Value.Type getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
      Requests the value type that would best suit the listener.
      Specified by:
      getBestVSColumnHeaderValueType in interface IVSColumnBestValueListener
      Parameters:
      reference - The VSRelativeReference instance holding the reference.
      Returns:
      null if none is available.
    • onResolved Link icon

      public void onResolved(VSRelativeReference<?> reference, VSColumnHeader column)
      Called when the property reference has been resolved. UI components use this method to set its state according to the field.
      Specified by:
      onResolved in interface IVSColumnListener
      Parameters:
      reference - The VSRelativeReference instance holding the reference.
      column - The target reference.
    • onBroken Link icon

      public void onBroken(VSRelativeReference<?> reference, VSColumnHeader column)
      Called when the property reference has been broken, i.e. unresolved.
      Specified by:
      onBroken in interface IVSColumnListener
      Parameters:
      reference - The VSRelativeReference instance holding the reference.
      column - The target reference.
    • onStateChanged Link icon

      public void onStateChanged(VSColumnHeader column, IVSComponentState.State state, boolean on)
      Called when the table changes state.
      Specified by:
      onStateChanged in interface IVSColumnListener
      Parameters:
      column - The VS table column.
      state - The state change.
      on - New state.
    • onParentStateChanged Link icon

      public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
      Called when the column changes state.
      Specified by:
      onParentStateChanged in interface IVSComponentListener
      Parameters:
      parent - The parent who's state was changed.
      state - The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.
      on - New state.
    • onSingleSelectionChanged Link icon

      public void onSingleSelectionChanged(VSColumnHeader column, int rowIndex)
      Called when the row selection in table single-selection mode is changed to forward to column listeners.
      Specified by:
      onSingleSelectionChanged in interface IVSColumnListener
      Parameters:
      column - The column.
      rowIndex - The row index selected, -1 for none.
    • onSelectionChanged Link icon

      public void onSelectionChanged(VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected)
      Called when the row selection is changed to forward to column listeners.
      Specified by:
      onSelectionChanged in interface IVSColumnListener
      Parameters:
      column - The column.
      row - The row that was changed.
      rowIndex - The row index.
      isSelected - The selected state.
    • onRowAdded Link icon

      public void onRowAdded(VSColumnHeader column, VSRow row, int rowIndex)
      Called when a row has been added to the table.
      Specified by:
      onRowAdded in interface IVSColumnListener
      Parameters:
      column - The column.
      row - The row that was added.
      rowIndex - The row index where it was inserted.
    • onRowRemoved Link icon

      public void onRowRemoved(VSColumnHeader column, VSRow row, int rowIndex)
      Called when a row has been removed from the table.
      Specified by:
      onRowRemoved in interface IVSColumnListener
      Parameters:
      column - The column.
      row - The row that was removed.
      rowIndex - The row index before removal.
    • onStateChanged Link icon

      public void onStateChanged(VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on)
      Called when a cell in the column changes state.
      Specified by:
      onStateChanged in interface IVSColumnListener
      Parameters:
      column - The VS column.
      cell - The VS field.
      state - The state change.
      on - New state.
    • onCellValueChanged Link icon

      public void onCellValueChanged(VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
      Called when the cell value is set in the column.
      Specified by:
      onCellValueChanged in interface IVSColumnListener
      Parameters:
      column - The VS column.
      cell - The VS field.
      value - The value, never null, but value.isNull() could be true.
      trigger - The trigger property that may be null.
      postProcessing - Post-processing instance.