Package com.storedobject.core
Class TaxCode
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.core.TaxCode
- All Implemented Interfaces:
Displayable,StringFiller,HasId
Tax code and region of the
SystemEntity. For other entities, tax codes and regions must be specified in
the respective AccountEntity class.- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidConfigures the specified Columns object by adding predefined column names and types.static TaxCodegetFor(SystemEntity systemEntity) Retrieves theTaxCodeassociated with the specifiedSystemEntity.Retrieves theSystemEntityinstance associated with the organization.Retrieves the unique identifier of the organization.Retrieves the tax code associated with this entity.Retrieves the TaxRegion associated with the current instance.Retrieves the tax region identifier.static inthints()Provides hints for the associated object, combining predefined constants to denote object characteristics such as "small" or "small list".static voidConfigures the specified Indices object by adding a predefined index for "Organization".voidsaved()This method is invoked whenever an instance is saved/deleted/resurrected.voidsetOrganization(Id organizationId) Sets the organization for this TaxCode.voidsetOrganization(SystemEntity organization) Sets the organization associated with this TaxCode using aSystemEntity.voidsetOrganization(BigDecimal idValue) Sets the organization associated with this instance using the provided BigDecimal identifier.voidsetTaxCode(String taxCode) Sets the tax code for the entity.voidsetTaxRegion(Id taxRegionId) Sets the tax region associated with this object.voidsetTaxRegion(TaxRegion taxRegion) Sets the tax region by assigning the corresponding region ID.voidsetTaxRegion(BigDecimal idValue) Sets the tax region using the provided identifier value.voidValidates the data consistency and integrity for the current instance.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, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, toString, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
TaxCode
public TaxCode()Default constructor for the TaxCode class. Initializes a new instance of the TaxCode object with no parameters.
-
-
Method Details
-
columns
Configures the specified Columns object by adding predefined column names and types.- Parameters:
columns- the Columns object to configure by adding column definitions
-
indices
Configures the specified Indices object by adding a predefined index for "Organization". The index is marked as unique.- Parameters:
indices- the Indices object to configure by adding the "Organization" index
-
hints
public static int hints()Provides hints for the associated object, combining predefined constants to denote object characteristics such as "small" or "small list".- Returns:
- A bitwise combination of object hints, specifically `ObjectHint.SMALL` and `ObjectHint.SMALL_LIST`.
-
setOrganization
Sets the organization for this TaxCode. This method validates the input and throws an exception if the operation is not allowed when the object is not in a loading state and the specified organization ID differs from the current one.- Parameters:
organizationId- the ID of the organization to be associated with this TaxCode- Throws:
Set_Not_Allowed- if the object is not in a loading state, and an attempt is made to change the organization
-
setOrganization
Sets the organization associated with this instance using the provided BigDecimal identifier. This method internally converts the BigDecimal value into anIdobject and delegates tosetOrganization(Id).- Parameters:
idValue- the identifier of the organization as aBigDecimalvalue to assign to this instance
-
setOrganization
Sets the organization associated with this TaxCode using aSystemEntity. If the providedSystemEntityis null, the organization will be cleared.- Parameters:
organization- theSystemEntityrepresenting the organization to set, or null to clear the organization.
-
getOrganizationId
Retrieves the unique identifier of the organization.- Returns:
- the unique identifier of the organization as an
Id.
-
getOrganization
Retrieves theSystemEntityinstance associated with the organization.- Returns:
- the related organization as a
SystemEntityinstance, or null if no organization is associated.
-
setTaxCode
Sets the tax code for the entity.- Parameters:
taxCode- the tax code to be assigned to the entity
-
getTaxCode
-
setTaxRegion
Sets the tax region associated with this object.- Parameters:
taxRegionId- the identifier of the tax region to be set
-
setTaxRegion
Sets the tax region using the provided identifier value.- Parameters:
idValue- the identifier value for the tax region
-
setTaxRegion
Sets the tax region by assigning the corresponding region ID. If the provided TaxRegion object is null, the region ID is set to null.- Parameters:
taxRegion- the TaxRegion object representing the tax region to be set
-
getTaxRegionId
-
getTaxRegion
Retrieves the TaxRegion associated with the current instance.- Returns:
- the TaxRegion object corresponding to the provided taxRegionId.
-
validateData
Validates the data consistency and integrity for the current instance. This method ensures that the organizationId and taxRegionId are properly typed and associated with their respective system entities.- Overrides:
validateDatain classStoredObject- Parameters:
tm- the transaction manager used to validate and check entity types- Throws:
Exception- if validation fails or any errors occur during the process
-
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.
-
getFor
Retrieves theTaxCodeassociated with the specifiedSystemEntity.- Parameters:
systemEntity- theSystemEntityfor which the correspondingTaxCodeis to be retrieved- Returns:
- the
TaxCodeassociated with the providedSystemEntity
-