Class ResultSetProps

All Implemented Interfaces:
EventListener, IClassInstantiationAtResolve, IGProp<GProp<?>[]>, IPropCnr, IReferrerParticipant, IVSAccessor, IVSComponentListener, IVSComponentState, IVSParticipant, IVSTableListener, Cloneable
Direct Known Subclasses:
EditorResultSetProps

public class ResultSetProps extends VSVariables implements IVSParticipant, IVSTableListener, IClassInstantiationAtResolve
Result set property that ties a result set from the execution of an SQL query statement to VirtualSpace.
Author:
Christopher Mindus
  • Constructor Details

    • ResultSetProps

      public ResultSetProps()
      Creates a Result Set property container with the specified name with a null value.
    • ResultSetProps

      public ResultSetProps(Atom propertyAtom)
      Creates a Result Set property container with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
  • Method Details

    • clone

      public ResultSetProps clone()
      Clones this ResultSetProp.
      Overrides:
      clone in class VSVariables
    • getDatabaseProps

      public DatabaseProps getDatabaseProps()
      Gets the Database Transaction properties.
      Returns:
      The Database Transaction properties, or null if this property is orphaned.
    • getDescription

      public String getDescription()
      Gets the result set description.
      Returns:
      A description, or null for none.
    • getColumns

      public ResultSetColumnProp[] getColumns()
      Gets the result set columns.
      Returns:
      An array of result set columns, unordered in relation to the column index. Note that too many or too few columns may be returned in comparison to the query statement.
    • getMaximumRowCount

      public int getMaximumRowCount()
      Gets the maximum number of rows to retrieve.
      Returns:
      Zero for indefinite, otherwise a value for maximum row count.
    • getParticipantDescription

      public String getParticipantDescription()
      Returns the given description of the referrer participant.
      Specified by:
      getParticipantDescription in interface IReferrerParticipant
    • getParticipantType

      public String getParticipantType()
      Returns the given type of the referrer participant.
      Specified by:
      getParticipantType in interface IReferrerParticipant
    • getVSReference

      public VSParticipant getVSReference(Atom refAtom)
      Gets a VSReference instance from the container or any parent containers. The method is used by VSRelativeReference to look up the VSReference instance in order to resolve the relative path to the target property.
      Specified by:
      getVSReference in interface IGProp<GProp<?>[]>
      Overrides:
      getVSReference in class PropCnr
      Parameters:
      refAtom - The property atom of the requesting relative reference property.
      Returns:
      The instance of the VSReference or null if unassigned.
    • getVirtualSpace

      public VirtualSpace getVirtualSpace()
      Gets the VirtualSpace.
      Specified by:
      getVirtualSpace in interface IVSAccessor
      Returns:
      The VirtualSpace connected to the result set, or null for none.
    • getTargetVirtualSpaceParticipant

      public VSParticipant getTargetVirtualSpaceParticipant()
      Gets the target VirtualSpace participant for output data.
      Returns:
      The target VirtualSpace participating with the output data, null for none.
    • getVSTableReference

      public VSTableReference getVSTableReference()
      Gets the VirtualSpace table reference for all the output.
      Returns:
      The VSTableReference, null for none.
    • getVSTableReferenceOwnerData

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

      public VSTable getVSTable()
      Gets the VirtualSpace table for all the output.
      Returns:
      The VirtualSpace Table, null for none.
    • doOverwrite

      public boolean doOverwrite()
      Gets the flag if the table should overwrite existing entries in the VSTable when populating it. Default is to clear the table before populating it.
      Returns:
      true to overwrite, false otherwise.
    • onResolved

      public void onResolved(VSRelativeReference<?> reference, VSTable table)
      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 IVSTableListener
      Parameters:
      reference - The VSRelativeReference instance holding the reference.
      table - The target reference.
    • onBroken

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

      public void onStateChanged(VSTable table, IVSComponentState.State state, boolean on)
      Called when the table changes state.
      Specified by:
      onStateChanged in interface IVSTableListener
      Parameters:
      table - The VS table.
      state - The state change.
      on - New state.
    • onSingleSelectionChanged

      public void onSingleSelectionChanged(VSTable table, int index)
      Called when the single selection changes.
      Specified by:
      onSingleSelectionChanged in interface IVSTableListener
      Parameters:
      table - The table.
      index - The row index, -1 if table is unselected.
    • 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.
    • onRowAdded

      public void onRowAdded(VSRow row, int index)
      Called when a row is added.
      Specified by:
      onRowAdded in interface IVSTableListener
      Parameters:
      row - The row.
      index - The index.
    • onRowRemoved

      public void onRowRemoved(VSRow row, int index)
      Called when a row is removed.
      Specified by:
      onRowRemoved in interface IVSTableListener
      Parameters:
      row - The row.
      index - The index.
    • onRowStateChanged

      public void onRowStateChanged(VSRow row, IVSComponentState.State state, boolean on)
      Called when a row selection state changed.
      Specified by:
      onRowStateChanged in interface IVSTableListener
      Parameters:
      row - The row.
      state - The state change.
      on - New state.
    • onCellStateChanged

      public void onCellStateChanged(VSField cell, IVSComponentState.State state, boolean on)
      Called when the cell changes state.
      Specified by:
      onCellStateChanged in interface IVSTableListener
      Parameters:
      cell - The VS cell.
      state - The state change.
      on - New state.
    • onCellValueChanged

      public void onCellValueChanged(VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
      Called when the cell value is set.
      Specified by:
      onCellValueChanged in interface IVSTableListener
      Parameters:
      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.
    • getClassReference

      public ClassReference getClassReference()
      The Java class associated with result set output.
      Returns:
      The ClassReference instance, or null for none.
    • getResultSetProcessor

      public IResultSetProcessor getResultSetProcessor()
      Gets the instance of the IResultSetProcessor.
      Returns:
      The instance of IResultSetProcessor, or null for none.
    • onVirtualSpaceVirtualized

      public void onVirtualSpaceVirtualized(IAppSessionGyro appGyro, VirtualSpace virtualizedVirtualSpace)
      Called when the VirtualSpace has been virtualized, giving the opportunity for e.g. data connectors to prepare it's virtualized counterparts if this is required.

      This call is done to the non-virtualized instance of the VirtualSpace participant.

      Specified by:
      onVirtualSpaceVirtualized in interface IVSParticipant
      Parameters:
      appGyro - The application gyro instance.
      virtualizedVirtualSpace - The virtualized VirtualSpace instance.