Class SQLPropertyAdapter

All Implemented Interfaces:
Adapter, Adapter.ValueHolder, SearchablePropertyAdapter, PropertyAdapter, IQueryResponseListener, PropertyChangeListener, EventListener

  • Field Details

  • Constructor Details

    • SQLPropertyAdapter

      public SQLPropertyAdapter()
  • Method Details

    • getInteractions

      public InteractionDescriptor[] getInteractions()
      Description copied from interface: Adapter
      Retrieves an array of the interactions that this adapter depends on. An interaction descriptor describes an inter-component interaction.
      Specified by:
      getInteractions in interface Adapter
    • getBindingConfiguration

      public BindingConfiguration getBindingConfiguration()
      Specified by:
      getBindingConfiguration in interface SearchablePropertyAdapter
    • connect

      public void connect(VisionClientContext appContext)
      Description copied from class: AbstractPropertyAdapter
      Calls connect() on all interaction descriptors
      Specified by:
      connect in interface Adapter
      Overrides:
      connect in class AbstractPropertyAdapter
    • disconnect

      public void disconnect()
      Description copied from class: AbstractPropertyAdapter
      Calls disconnect() on all interaction descriptors
      Specified by:
      disconnect in interface Adapter
      Overrides:
      disconnect in class AbstractPropertyAdapter
    • startup

      public void startup()
      Description copied from interface: Adapter
      Notifies the adapter that it is becoming active, and should start any polling/threaded activities.
      Specified by:
      startup in interface Adapter
      Overrides:
      startup in class AbstractPropertyAdapter
    • shutdown

      public void shutdown()
      If pollingMode is POLLING_RELATIVE_RATE or POLLING_ABSOLUTE_RATE, then this disconnects the SQLPropertyAdapter from the QueryManager. If pollingMode is POLLING_OFF, this is a noop.
      Specified by:
      shutdown in interface Adapter
      Overrides:
      shutdown in class AbstractPropertyAdapter
    • registerQuery

      protected Object registerQuery(int updateRate, boolean runOnce)
      Specified by:
      registerQuery in class AbstractQueryAdapter
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • updateTarget

      protected void updateTarget()
      Description copied from class: AbstractPropertyAdapter
      Sets the target property to the value. If a problem occurs, the problem is displayed, not thrown. Note that updateValue() is probably a better bet, as it updates both value and quality.
      Overrides:
      updateTarget in class AbstractPropertyAdapter
    • notifyQueryRunning

      public void notifyQueryRunning(boolean loading)
      Specified by:
      notifyQueryRunning in interface IQueryResponseListener
    • handleQueryReturnedError

      public void handleQueryReturnedError(Exception error)
      Specified by:
      handleQueryReturnedError in interface IQueryResponseListener
    • handleQueryReturnedNoRows

      public void handleQueryReturnedNoRows()
      Specified by:
      handleQueryReturnedNoRows in interface IQueryResponseListener
    • handleQueryReturnedValue

      public void handleQueryReturnedValue(Object value)
      Called by the query manager when the pull query has been run successfully
      Specified by:
      handleQueryReturnedValue in interface IQueryResponseListener
    • toString

      public String toString()
      Overrides:
      toString in class AbstractPropertyAdapter
    • getPullQuery

      public QueryHolder getPullQuery()
    • setPullQuery

      public void setPullQuery(QueryHolder holder)
    • getPushQuery

      public QueryHolder getPushQuery()
      Returns the update query. If the update query is a legacy query it returns that. If not the new query is returned.
      Returns:
      The legacy update query if not null else the new version of update query.
    • setPushQuery

      public void setPushQuery(QueryHolder holder)
    • getEffectiveUpdateQuery

      public QueryHolder getEffectiveUpdateQuery()
      Returns the update query QueryHolder object.
      Returns:
      the QueryHolder for the update query or null if there is none.
    • setPushConnected

      public void setPushConnected(boolean b)
    • isPushEnabled

      public boolean isPushEnabled()
      Returns:
      whether or not the update query is enabled and whether pushing is currently allowed on this property.
    • setPushEnabled

      public void setPushEnabled(boolean enabled)
    • getDatasource

      public String getDatasource()
    • setDatasource

      public void setDatasource(String string)
    • getAdapterMode

      public int getAdapterMode()
    • getKeyCols

      public String[] getKeyCols()
    • getSelectedCols

      public String[] getSelectedCols()
    • getTableName

      public String getTableName()
    • setAdapterMode

      public void setAdapterMode(int i)
    • setKeyCols

      public void setKeyCols(String[] strings)
    • setSelectedCols

      public void setSelectedCols(String[] strings)
    • setTableName

      public void setTableName(String string)
    • getFallbackValue

      public String getFallbackValue()
    • setFallbackValue

      public void setFallbackValue(String fallbackValue)
    • getReferenceType

      public PropertyAdapter.PAType getReferenceType()
      Specified by:
      getReferenceType in interface PropertyAdapter
    • getKeyVals

      public String[] getKeyVals()
    • setKeyVals

      public void setKeyVals(String[] keyVals)
    • getOrderCols

      public String[] getOrderCols()
    • setOrderCols

      public void setOrderCols(String[] orderCols)
    • getDatasourceListener

      public QueryHolder getDatasourceListener()
    • setDatasourceListener

      public void setDatasourceListener(QueryHolder datasourceListener)