Package com.storedobject.iot
Class ValueDefinition<VT>
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.iot.ValueDefinition<VT>
- All Implemented Interfaces:
Displayable,StringFiller,Detail,HasId
- Direct Known Subclasses:
AlarmSwitch,ValueLimit
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprotected VTconvertValue(Object value) booleanbooleangetAlert()abstract StringgetAlertMessage(int alarmLevel) Get alert message for the value alarm levelgetCaption(int ordinality, int layoutStyle) getCaption(Unit unit) booleanintintgetImageX(int ordinality, int layoutStyle) intintintgetImageY(int ordinality, int layoutStyle) intgetLabel()getLabel(int ordinality, int layoutStyle) <IOT extends Data>
IOTgetLatestData(Id unitId) getName()booleanbooleanintgetTooltip(int ordinality, int layoutStyle) getTooltip(Unit unit) Get the unique value that determines the uniqueness of the detail entries.final VTfinal ObjectgetValueObject(Id unitId) booleanisDetailOf(Class<? extends StoredObject> masterClass) Check if the given class is a "master" for this class.static String[]links()voidsavePosition(Transaction t, int imageX, int imageY, Unit unit) static String[]voidsetActive(boolean active) voidsetAlert(boolean alert) voidsetAlertMessage(String alertMessage) voidsetCaption(String caption) voidsetCommand(boolean command) voidsetImagePrefix(String imagePrefix) voidsetImageX(int imageX) voidsetImageY(int imageY) voidvoidvoidsetShowChart(boolean showChart) voidsetShowImage(boolean showImage) voidsetSignificance(int significance) voidsetTooltip(String tooltip) toString()String representation of the instance.voidThe system will invoke this whenever the object is saved to the DB.voidThis method will be invoked whenever an existing instance is deleted from the database.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, getUniqueCondition, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listDeletedIds, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loadAttributesFrom, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.storedobject.core.Detail
copyValuesFrom, getId, getUniqueId
-
Constructor Details
-
ValueDefinition
public ValueDefinition()
-
-
Method Details
-
columns
-
searchColumns
-
links
-
setName
-
getName
-
setCaption
-
getCaption
-
setLabel
-
getLabel
-
setTooltip
-
getTooltip
-
setAlertMessage
-
getAlertMessage
-
setSignificance
public void setSignificance(int significance) -
getSignificance
-
setAlert
public void setAlert(boolean alert) -
getAlert
-
setCommand
public void setCommand(boolean command) -
getCommand
-
setActive
public void setActive(boolean active) -
getActive
-
setShowChart
public void setShowChart(boolean showChart) -
getShowChart
-
setShowImage
public void setShowImage(boolean showImage) -
getShowImage
-
setImageX
public void setImageX(int imageX) -
getImageX
-
setImageY
public void setImageY(int imageY) -
getImageY
-
setImagePrefix
-
getImagePrefix
-
validateData
Description copied from class:StoredObjectThe system will invoke this whenever the object is saved to the DB. It will be invoked in all cases while creating new objects and updating/deleting/undeleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object, and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Overrides:
validateDatain classStoredObject- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
validateDelete
Description copied from class:StoredObjectThis method will be invoked whenever an existing instance is deleted from the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is deleted from the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
StoredObject.validate().- Overrides:
validateDeletein classStoredObject- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
getUniqueValue
Description copied from interface:DetailGet the unique value that determines the uniqueness of the detail entries. By default,nullis returned so that no uniqueness can be checked using this. (In most cases,Detail.getUniqueId()may be enough unless some other type of values need to be checked).- Specified by:
getUniqueValuein interfaceDetail- Returns:
- Return the value to determine the uniqueness of the detail entries.
-
isDetailOf
Description copied from interface:DetailCheck if the given class is a "master" for this class. (Must return a consistent value).- Specified by:
isDetailOfin interfaceDetail- Parameters:
masterClass- Class to check.- Returns:
- True if it is a "master" to this detail class. Otherwise, false.
-
getDataClass
-
getUnitClass
-
getValueMethodForGet
-
getValueMethodForSet
-
getLatestData
-
getValueObject
-
getValue
-
convertValue
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-
getShortName
-
getImageX
-
getImageX
public int getImageX(int ordinality, int layoutStyle) -
getImageY
-
getImageY
public int getImageY(int ordinality, int layoutStyle) -
getLabel
-
getLabel
-
getTooltip
-
getTooltip
-
getCaption
-
getCaption
-
savePosition
- Throws:
Exception
-
getAlertMessage
Get alert message for the value alarm level- Parameters:
alarmLevel- Level. 0 = Normal, -1 = Low, -2 = Lower, -3 = Lowest, 1 = High, 2 = Higher, 3 = Highest- Returns:
- Alert message.
-