Package com.storedobject.core
Class SystemEntity
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.core.SystemEntity
- All Implemented Interfaces:
Displayable,StringFiller,HasId,HasName,RequiresApproval
This class represents an entity whose accounting system exists in this server.
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for internal use onlySystemEntity(Id entityId, String currency, Date workingDate) Construct a System Entity -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]static void<D extends Date>
Ddate(D dateGMT) Convert a date/date-time value from GMT to local.<D extends Date>
DdateGMT(D date) Convert a date/date-time value from local to GMT.static String[]static SystemEntityget()Get the default System Entity.static SystemEntitystatic SystemEntitybooleanstatic SystemEntityGets the currency.static CurrencyGet the default currency.Get the ending date of the financial yeargetEndOfFinancialYear(Date today) Get the ending date of the financial year for the given dateGets the entity of this System EntityGets the Id of the entity.Gets the location of the Entity.getName()Gets the name of the EntityGet the starting date of the financial yeargetStartOfFinancialYear(Date today) Get the starting date of the financial year for the given date.intintGet the time difference in minutes.Gets the unique index condition of this object.Get the working datestatic inthints()static voidstatic String[]links()static ObjectIterator<SystemEntity> <D extends Date,P extends AbstractPeriod<D>>
Pperiod(P periodGMT) Convert a period value from GMT to local.<D extends Date,P extends AbstractPeriod<D>>
PperiodGMT(P period) Convert a period value from local to GMT.static String[]voidsetAlternateLocale(Locale locale) voidsetAlternateLocaleCountry(String alternateLocaleCountry) voidsetAlternateLocaleLanguage(String alternateLocaleLanguage) voidsetApprovalsEnabled(boolean approvalsEnabled) voidsetCurrency(String currency) Sets the currency.voidSets the entity of this System Entity.voidSets the entity of this System Entity.voidsetEntity(BigDecimal idValue) Sets the entity of this System Entity.voidsetLogoName(String logoName) voidsetStartOfFinancialYear(Date startDate) Set the start of financial yearvoidsetStatus(int status) voidsetTimeZone(String timeZone) voidsetWorkingDate(Date workingDate) Set the working dateDisplay representation of the instance used for human-friendly display.toString()String representation of the instance.voidThe system will invoke this whenever the object is saved to the DB.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, 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, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
SystemEntity
-
SystemEntity
public SystemEntity()Constructor for internal use only
-
-
Method Details
-
columns
-
indices
-
getUniqueCondition
Description copied from class:StoredObjectGets the unique index condition of this object.- Overrides:
getUniqueConditionin classStoredObject- Returns:
- Unique index condition.
-
displayColumns
-
browseColumns
-
links
-
hints
public static int hints() -
protectedColumns
-
getApprovalsEnabled
-
setApprovalsEnabled
public void setApprovalsEnabled(boolean approvalsEnabled) -
getName
-
getLocation
Gets the location of the Entity.- Returns:
- The location. Each line of the location is delimited by a semicolon.
-
getCurrency
Gets the currency.- Returns:
- The currency
-
setCurrency
Sets the currency.- Parameters:
currency- The new currency.
-
getEntityId
-
setEntity
Sets the entity of this System Entity.- Parameters:
idValue- The new entity Id.
-
setEntity
Sets the entity of this System Entity.- Parameters:
entity- Entity.
-
setEntity
Sets the entity of this System Entity.- Parameters:
id- The new entity Id.
-
getEntity
Gets the entity of this System Entity- Returns:
- The entity of this System Entity
-
getStatus
-
setStatus
public void setStatus(int status) -
getTimeZone
-
setTimeZone
-
getZoneId
-
setWorkingDate
Set the working date- Parameters:
workingDate- Working date to be set
-
getWorkingDate
-
setStartOfFinancialYear
Set the start of financial year- Parameters:
startDate- Starting date of the financial year
-
getStartOfFinancialYear
Get the starting date of the financial year- Returns:
- Start date of the financial year
-
getStartOfFinancialYear
-
getEndOfFinancialYear
Get the ending date of the financial year- Returns:
- End date of the financial year
-
getEndOfFinancialYear
-
setLogoName
-
getLogoName
-
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.
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-
toDisplay
Description copied from class:StoredObjectDisplay representation of the instance used for human-friendly display.- Specified by:
toDisplayin interfaceDisplayable- Overrides:
toDisplayin classStoredObject- Returns:
- Display representation of the instance.
-
get
-
getAlternateLocaleLanguage
-
setAlternateLocaleLanguage
-
getAlternateLocaleCountry
-
setAlternateLocaleCountry
-
getAlternateLocale
-
setAlternateLocale
-
get
Get the default System Entity. If more than one entity are configured, "null" will be returned.- Returns:
- Default System Entity.
-
getDefaultCurrency
Get the default currency. If more than one entity is configured with different accounting currencies, "null" will be returned.- Returns:
- Default System Entity.
-
get
-
list
-
dateGMT
Convert a date/date-time value from local to GMT.- Type Parameters:
D- Date/date-time type.- Parameters:
date- Local value.- Returns:
- GMT value.
-
date
Convert a date/date-time value from GMT to local.- Type Parameters:
D- Date/date-time type.- Parameters:
dateGMT- GMT value.- Returns:
- Local value.
-
periodGMT
Convert a period value from local to GMT.- Type Parameters:
D- Date/date-time type.P- Period type.- Parameters:
period- Local value.- Returns:
- GMT value.
-
period
Convert a period value from GMT to local.- Type Parameters:
D- Date/date-time type.P- Period type.- Parameters:
periodGMT- Local value.- Returns:
- Local value.
-
getTimeDifference
public int getTimeDifference()Get the time difference in minutes.- Returns:
- Time difference.
-
getCached
-