Class SQLPropertyAdapter
java.lang.Object
com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
com.inductiveautomation.factorypmi.application.binding.AbstractQueryAdapter
com.inductiveautomation.factorypmi.application.binding.SQLPropertyAdapter
- All Implemented Interfaces:
- Adapter,- Adapter.ValueHolder,- SearchablePropertyAdapter,- PropertyAdapter,- IQueryResponseListener,- PropertyChangeListener,- EventListener
public class SQLPropertyAdapter
extends AbstractQueryAdapter
implements PropertyChangeListener, IQueryResponseListener, SearchablePropertyAdapter
- 
Nested Class SummaryNested classes/interfaces inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapterAbstractPropertyAdapter.EdtUpdateValueNested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.AdapterAdapter.ValueHolderNested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdapterPropertyAdapter.PAType
- 
Field SummaryFieldsFields inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapterappContext, isTargetPropertyDynamic, log, overlayOptOut, target, targetPropertyName, value, valueClass
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidconnect(VisionClientContext appContext) Calls connect() on all interaction descriptorsvoidCalls disconnect() on all interaction descriptorsintReturns the update queryQueryHolderobject.Retrieves an array of the interactions that this adapter depends on.String[]String[]String[]Returns the update query.String[]voidvoidvoidhandleQueryReturnedValue(Object value) Called by the query manager when the pull query has been run successfullybooleanvoidnotifyQueryRunning(boolean loading) voidprotected ObjectregisterQuery(int updateRate, boolean runOnce) voidsetAdapterMode(int i) voidsetDatasource(String string) voidsetDatasourceListener(QueryHolder datasourceListener) voidsetFallbackValue(String fallbackValue) voidsetKeyCols(String[] strings) voidsetKeyVals(String[] keyVals) voidsetOrderCols(String[] orderCols) voidsetPullQuery(QueryHolder holder) voidsetPushConnected(boolean b) voidsetPushEnabled(boolean enabled) voidsetPushQuery(QueryHolder holder) voidsetSelectedCols(String[] strings) voidsetTableName(String string) voidshutdown()If pollingMode is POLLING_RELATIVE_RATE or POLLING_ABSOLUTE_RATE, then this disconnects the SQLPropertyAdapter from the QueryManager.voidstartup()Notifies the adapter that it is becoming active, and should start any polling/threaded activities.toString()protected voidSets the target property to the value.Methods inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractQueryAdaptergetPollingConfig, getPollingMode, getUpdateRate, isSerializableDataset, restartQuery, setPollingMode, setQValue, setSerializableDataset, setUpdateRate, shutdownQuery, startupQueryMethods inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdaptergetQValue, getTarget, getTargetDesc, getTargetFullPath, getTargetPropertyName, getValueClass, handleError, handleNullToPrimitive, initLogger, isDataUsed, isDataUsed, isOverlayOptOut, isTargetPropertyDynamic, isValid, isValueClassPrimitive, setOverlayOptOut, setSetterMethodName, setTarget, setTargetPropertyDynamic, setTargetPropertyName, setValue, setValueClass, updateQuality, updateValue, useQualityMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.factorypmi.application.binding.AdaptergetTarget, isValid, setTargetMethods inherited from interface com.inductiveautomation.factorypmi.application.gateway.IQueryResponseListenergetTargetFullPathMethods inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdaptergetTargetPropertyName, setTargetPropertyName
- 
Field Details- 
MODE_EXPERTpublic static final int MODE_EXPERT- See Also:
 
- 
MODE_SIMPLEpublic static final int MODE_SIMPLE- See Also:
 
 
- 
- 
Constructor Details- 
SQLPropertyAdapterpublic SQLPropertyAdapter()
 
- 
- 
Method Details- 
getInteractionsDescription copied from interface:AdapterRetrieves an array of the interactions that this adapter depends on. An interaction descriptor describes an inter-component interaction.- Specified by:
- getInteractionsin interface- Adapter
 
- 
getBindingConfiguration- Specified by:
- getBindingConfigurationin interface- SearchablePropertyAdapter
 
- 
connectDescription copied from class:AbstractPropertyAdapterCalls connect() on all interaction descriptors- Specified by:
- connectin interface- Adapter
- Overrides:
- connectin class- AbstractPropertyAdapter
 
- 
disconnectpublic void disconnect()Description copied from class:AbstractPropertyAdapterCalls disconnect() on all interaction descriptors- Specified by:
- disconnectin interface- Adapter
- Overrides:
- disconnectin class- AbstractPropertyAdapter
 
- 
startuppublic void startup()Description copied from interface:AdapterNotifies the adapter that it is becoming active, and should start any polling/threaded activities.- Specified by:
- startupin interface- Adapter
- Overrides:
- startupin class- AbstractPropertyAdapter
 
- 
shutdownpublic 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:
- shutdownin interface- Adapter
- Overrides:
- shutdownin class- AbstractPropertyAdapter
 
- 
registerQuery- Specified by:
- registerQueryin class- AbstractQueryAdapter
 
- 
propertyChange- Specified by:
- propertyChangein interface- PropertyChangeListener
 
- 
updateTargetprotected void updateTarget()Description copied from class:AbstractPropertyAdapterSets 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:
- updateTargetin class- AbstractPropertyAdapter
 
- 
notifyQueryRunningpublic void notifyQueryRunning(boolean loading) - Specified by:
- notifyQueryRunningin interface- IQueryResponseListener
 
- 
handleQueryReturnedError- Specified by:
- handleQueryReturnedErrorin interface- IQueryResponseListener
 
- 
handleQueryReturnedNoRowspublic void handleQueryReturnedNoRows()- Specified by:
- handleQueryReturnedNoRowsin interface- IQueryResponseListener
 
- 
handleQueryReturnedValueCalled by the query manager when the pull query has been run successfully- Specified by:
- handleQueryReturnedValuein interface- IQueryResponseListener
 
- 
toString- Overrides:
- toStringin class- AbstractPropertyAdapter
 
- 
getPullQuery
- 
setPullQuery
- 
getPushQueryReturns 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
- 
getEffectiveUpdateQueryReturns the update queryQueryHolderobject.- Returns:
- the QueryHolder for the update query or null if there is none.
 
- 
setPushConnectedpublic void setPushConnected(boolean b) 
- 
isPushEnabledpublic boolean isPushEnabled()- Returns:
- whether or not the update query is enabled and whether pushing is currently allowed on this property.
 
- 
setPushEnabledpublic void setPushEnabled(boolean enabled) 
- 
getDatasource
- 
setDatasource
- 
getAdapterModepublic int getAdapterMode()
- 
getKeyCols
- 
getSelectedCols
- 
getTableName
- 
setAdapterModepublic void setAdapterMode(int i) 
- 
setKeyCols
- 
setSelectedCols
- 
setTableName
- 
getFallbackValue
- 
setFallbackValue
- 
getReferenceType- Specified by:
- getReferenceTypein interface- PropertyAdapter
 
- 
getKeyVals
- 
setKeyVals
- 
getOrderCols
- 
setOrderCols
- 
getDatasourceListener
- 
setDatasourceListener
 
-