Package com.storedobject.core
Class Logic
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.core.Logic
- All Implemented Interfaces:
Displayable
,StringFiller
,DisplayOrder
,HasId
,RequiresApproval
,Comparable<DisplayOrder>
Used for defining a menu option. (Menus can be grouped using
LogicGroup
).- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
static void
static Logic
int
boolean
Gets the class name of the Logicint
static String[]
static String
getDeviceValue
(int value) int
int
int
int
int
Class
<? extends StoredObject> static Logic
getRunningLogic
(Device device) static String
getRunningLogicTitle
(Device device, String defaultTitle) boolean
getTitle()
Gets the title of the Logic.static void
boolean
isApplicableTo
(String deviceName) static String[]
links()
static ObjectIterator
<Logic> static String[]
void
setApprovalCount
(int approvalCount) void
setAutoExecute
(boolean autoExecute) void
setClassName
(String className) Sets the class name of the Logic.void
setDevice
(int device) void
setDisplayOrder
(int displayOrder) void
setExecutable
(Executable executable) void
setIconImageName
(String iconImageName) void
setMaximumDeviceHeight
(int maximumDeviceHeight) void
setMaximumDeviceWidth
(int maximumDeviceWidth) void
setMinimumDeviceHeight
(int minimumDeviceHeight) void
setMinimumDeviceWidth
(int minimumDeviceWidth) void
setSingleInstance
(boolean singleInstance) void
Sets the title of the Logic.toString()
String representation of the instance.void
This will be invoked by the system whenever the object is saved to the DB.void
This 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, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttachment, getAttachmentId, getChildren, 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, 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, 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, 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, valueEquals
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.core.DisplayOrder
compareTo, getDisplayOrderGap
-
Constructor Details
-
Logic
-
Logic
public Logic()Constructor for internal use only
-
-
Method Details
-
columns
-
indices
-
links
-
browseColumns
-
searchColumns
-
getObjectClass
-
getApprovalCount
-
setApprovalCount
public void setApprovalCount(int approvalCount) -
getClassName
-
setClassName
Sets the class name of the Logic.- Parameters:
className
- The class name.
-
getTitle
Gets the title of the Logic.- Specified by:
getTitle
in interfaceDisplayOrder
- Returns:
- The title.
-
setTitle
Sets the title of the Logic.- Specified by:
setTitle
in interfaceDisplayOrder
- Parameters:
title
- The new title.
-
setIconImageName
-
getIconImageName
-
setAutoExecute
public void setAutoExecute(boolean autoExecute) -
getAutoExecute
public boolean getAutoExecute() -
getSingleInstance
public boolean getSingleInstance() -
setSingleInstance
public void setSingleInstance(boolean singleInstance) -
validateData
Description copied from class:StoredObject
This will be invoked by the system whenever the object is saved to the DB. It will be invoked in all cases, while creating new objects and updating/deleting/un-deleting 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:
validateData
in classStoredObject
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
validateDelete
Description copied from class:StoredObject
This 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:
validateDelete
in classStoredObject
- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
toString
Description copied from class:StoredObject
String representation of the instance. Mostly used for logging purposes.- Overrides:
toString
in classStoredObject
- Returns:
- String representation of the instance.
-
setDisplayOrder
public void setDisplayOrder(int displayOrder) - Specified by:
setDisplayOrder
in interfaceDisplayOrder
-
getDisplayOrder
- Specified by:
getDisplayOrder
in interfaceDisplayOrder
-
setDevice
public void setDevice(int device) -
getDevice
-
getDeviceBitValues
-
getDeviceValue
-
getDeviceValue
-
setMinimumDeviceHeight
public void setMinimumDeviceHeight(int minimumDeviceHeight) -
getMinimumDeviceHeight
-
setMaximumDeviceHeight
public void setMaximumDeviceHeight(int maximumDeviceHeight) -
getMaximumDeviceHeight
-
setMinimumDeviceWidth
public void setMinimumDeviceWidth(int minimumDeviceWidth) -
getMinimumDeviceWidth
-
setMaximumDeviceWidth
public void setMaximumDeviceWidth(int maximumDeviceWidth) -
getMaximumDeviceWidth
-
get
-
list
-
getExecutable
-
setExecutable
-
getRunningLogic
-
getRunningLogicTitle
-
isApplicableTo
-