Class ResultSetColumnProp

    • Field Detail

      • COLUMN_LABEL

        public static final java.lang.String COLUMN_LABEL
        The name of the property: Column Label.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResultSetColumnProp

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

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

      • getResultSetProps

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

        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

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

        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

        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

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

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

        protected void setColumnLabel​(java.lang.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

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

        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

        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

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

        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

        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

        public java.lang.String getDescription()
        Gets the column description.
        Returns:
        A description, or null for none.
      • onResolved

        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:
        column - The target reference.
        reference - The VSRelativeReference instance holding the reference.
      • onBroken

        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:
        column - The target reference.
        reference - The VSRelativeReference instance holding the reference.
      • onParentStateChanged

        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

        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

        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

        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

        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.
      • onCellValueChanged

        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.