Package com.storedobject.accounts
Class AccountConfiguration
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.accounts.AccountConfiguration
- All Implemented Interfaces:
Displayable,StringFiller,HasId,OfEntity
This class is used to configure accounts for posting transactions such as purchase and sales invoices.
- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds columns to the given Columns object.Retrieves the Account related to the current AccountConfiguration.Returns the account Id.intgetAllow()static String[]static StringgetAllowValue(int value) intReturns the category of the item.Returns the category value.static StringgetCategoryValue(int value) Returns the category value corresponding to the given input value.static String[]Retrieves the list of category values.Class<? extends EntityAccount> Retrieves the entity account class name.static AccountConfigurationRetrieves the AccountConfiguration for a given SystemEntity, category, and type.getName()Retrieves the name of the AccountConfiguration.Retrieves the system entity associated with this AccountConfiguration.Retrieves the system entity ID.intgetType()Returns the type of the object.Retrieves the unique condition used for querying the system.static inthints()Provides hints about objects.static voidAdds indices to the given Indices object.voidsaved()This method is invoked whenever an instance is saved/deleted/resurrected.voidsetAccount(Account account) Sets the account for this AccountConfiguration.voidsetAccount(Id accountId) Sets the account ID for the current object.voidsetAccount(BigDecimal idValue) Sets the account for this object using the specified id value.voidsetAllow(int allow) voidsetCategory(int category) Sets the category for the object.voidsetEntityAccountClassName(String entityAccountClassName) Sets the entity account class name.voidSets the name for this object.voidsetSystemEntity(Id systemEntityId) Sets the system entity Id for this object.voidsetSystemEntity(SystemEntity systemEntity) Sets the system entity for this AccountConfiguration.voidsetSystemEntity(BigDecimal idValue) Sets the system entity using the provided id value.voidsetType(int type) Sets the type of the object.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, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, 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.OfEntity
check, findSystemEntityId
-
Constructor Details
-
AccountConfiguration
public AccountConfiguration()This class represents an Account Configuration. It provides a constructor to create an instance of AccountConfiguration.
-
-
Method Details
-
columns
Adds columns to the given Columns object.- Parameters:
columns- The Columns object to add the columns to.
-
indices
Adds indices to the given Indices object.- Parameters:
indices- the Indices object to add indices to
-
getUniqueCondition
Retrieves the unique condition used for querying the system. The condition is formed by concatenating the system entity ID, category, and type.- Overrides:
getUniqueConditionin classStoredObject- Returns:
- The unique condition.
-
hints
public static int hints()Provides hints about objects.This method returns a combination of hints representing certain characteristics of objects. The possible hints are defined in the
ObjectHintclass.- Returns:
- An integer value that represents a combination of hints. The hints can be extracted using binary AND operations.
- See Also:
-
setSystemEntity
Sets the system entity Id for this object.- Specified by:
setSystemEntityin interfaceOfEntity- Parameters:
systemEntityId- the Id of the system entity to set- Throws:
Set_Not_Allowed- if the method is called when the object is not in a loading state or if the provided system entity Id is different from the current one
-
setSystemEntity
Sets the system entity using the provided id value.- Parameters:
idValue- the id value of the system entity
-
setSystemEntity
Sets the system entity for this AccountConfiguration.- Parameters:
systemEntity- The system entity to set. If null, the system entity will be set to null.
-
getSystemEntityId
Retrieves the system entity ID.- Specified by:
getSystemEntityIdin interfaceOfEntity- Returns:
- the system entity ID
-
getSystemEntity
Retrieves the system entity associated with this AccountConfiguration.- Specified by:
getSystemEntityin interfaceOfEntity- Returns:
- The SystemEntity object associated with this AccountConfiguration.
-
setName
-
getName
-
setCategory
public void setCategory(int category) Sets the category for the object.- Parameters:
category- the new category to be set- Throws:
Set_Not_Allowed- if setting the category is not allowed
-
getCategory
Returns the category of the item.- Returns:
- the category of the item as an integer.
-
getCategoryValues
Retrieves the list of category values.- Returns:
- an array of strings representing the category values.
-
getCategoryValue
Returns the category value corresponding to the given input value.- Parameters:
value- the input value for which the category value is required- Returns:
- the category value corresponding to the given input value
-
getCategoryValue
Returns the category value.- Returns:
- the category value as a string.
-
setType
public void setType(int type) Sets the type of the object.- Parameters:
type- the new type to be set- Throws:
Set_Not_Allowed- if loading() is false, indicating that setting the type is not allowed
-
getType
Returns the type of the object.- Returns:
- the type of the object.
-
setAccount
Sets the account ID for the current object.- Parameters:
accountId- the unique identifier of the account
-
setAccount
Sets the account for this object using the specified id value.- Parameters:
idValue- the value for the account id
-
setAccount
Sets the account for this AccountConfiguration.- Parameters:
account- The account to set. If null, the account ID will be set to null.
-
getAccountId
-
getAccount
Retrieves the Account related to the current AccountConfiguration.- Returns:
- The related Account object.
-
setEntityAccountClassName
Sets the entity account class name.- Parameters:
entityAccountClassName- the fully qualified class name
-
getEntityAccountClassName
-
setAllow
public void setAllow(int allow) -
getAllow
-
getAllowBitValues
-
getAllowValue
-
getAllowValue
-
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.
-
saved
Description copied from class:StoredObjectThis method is invoked whenever an instance is saved/deleted/resurrected. It can be overridden to take care of any additional actions required by the application.- Overrides:
savedin classStoredObject- Throws:
Exception- When error occurs or invalidate state exists so that transaction will be abandoned.
-
getEntityAccountClass
-
getFor
Retrieves the AccountConfiguration for a given SystemEntity, category, and type.- Parameters:
systemEntityId- The Id of the System Entity.category- The category of the AccountConfiguration.type- The type of the AccountConfiguration.- Returns:
- The AccountConfiguration object corresponding to the provided SystemEntity, category, and type.
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-