|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminTaxMgr
public class AdminTaxMgr
The AdminTaxMgr - for Managing Tax Objects for the Admin Application
Nested Class Summary | |
---|---|
protected class |
AdminTaxMgr.StaticData
Used to store the static data of this manager |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
the log |
protected static java.lang.String |
mutex
Mutex for this manager |
protected static java.util.Map<java.lang.String,AdminTaxMgr.StaticData> |
staticDataHM
Hash Map that contains the static data |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminTaxMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
protected void |
addCountryOrderBy(com.konakart.bl.KKCriteria c,
AdminCountrySearch search)
|
protected int |
addCountrySearchCriteria(com.konakart.bl.KKCriteria c,
AdminCountrySearch search)
|
protected void |
addGeoZoneOrderBy(com.konakart.bl.KKCriteria c,
AdminGeoZoneSearch search)
|
protected int |
addGeoZoneSearchCriteria(com.konakart.bl.KKCriteria c,
AdminGeoZoneSearch search)
|
protected void |
addSubZoneOrderBy(com.konakart.bl.KKCriteria c,
AdminSubZoneSearch search)
|
protected int |
addSubZoneSearchCriteria(com.konakart.bl.KKCriteria c,
AdminSubZoneSearch search)
|
protected void |
addTaxClassOrderBy(com.konakart.bl.KKCriteria c,
AdminTaxClassSearch search)
|
protected int |
addTaxClassSearchCriteria(com.konakart.bl.KKCriteria c,
AdminTaxClassSearch search)
|
protected void |
addTaxRateOrderBy(com.konakart.bl.KKCriteria c,
AdminTaxRateSearch search)
|
protected int |
addTaxRateSearchCriteria(com.konakart.bl.KKCriteria c,
AdminTaxRateSearch search)
|
protected void |
addZoneOrderBy(com.konakart.bl.KKCriteria c,
AdminZoneSearch search)
|
protected int |
addZoneSearchCriteria(com.konakart.bl.KKCriteria c,
AdminZoneSearch search)
|
int |
deleteCountry(int id)
Delete a Country |
int |
deleteGeoZone(int id)
Delete a Tax Area - and all it's mappings |
int |
deleteSubZone(int id)
Delete a Zone |
int |
deleteTaxClass(int id)
Delete a TaxClass |
int |
deleteTaxRate(int id)
Delete a TaxRate |
int |
deleteZone(int id)
Delete a Zone |
boolean |
doesCountryExist(int id)
Checks to see whether a country already exists with this id |
boolean |
doesGeoZoneExist(int id)
Return true if the zone exists. |
boolean |
doesSubZoneExist(int id)
Return true if the zone exists. |
boolean |
doesTaxClassExist(int taxClassId)
Return true if the tax class exists. |
boolean |
doesTaxRateExist(int id)
Return true if the zone exists. |
boolean |
doesZoneExist(int id)
Return true if the zone exists. |
AdminCountry[] |
getAllCountriesFull()
Returns an array of fully populated countries. |
AdminGeoZone[] |
getAllGeoZones()
Get an array of AdminGeoZones from the DB. |
AdminTaxClass[] |
getAllTaxClassesFull()
Returns an array of all tax class objects. |
AdminTaxRateSearchResult |
getAllTaxRates()
This returns an AdminTaxRateSearchResult object. |
int |
getAllTaxRatesCount()
Returns a count of the number of TaxRates |
AdminCountrySearchResult |
getCountries(AdminCountrySearch search,
int offset,
int size)
This returns an AdminCountrySearchResult object. |
int |
getCountriesCount(AdminCountrySearch search)
Returns a count of the number of Countries |
AdminCountry |
getCountryById(int countryId)
Returns the country object for the country id, or Null if the country doesn't exist in the DB. |
AdminCountry |
getCountryByName(java.lang.String countryName)
Returns the country object for the country name, or Null if the country doesn't exist in the DB. |
AdminGeoZoneSearchResult |
getGeoZones(AdminGeoZoneSearch search,
int offset,
int size)
This returns an AdminGeoZoneSearchResult object. |
int |
getGeoZonesCount(AdminGeoZoneSearch search)
Returns a count of the number of Zones with the specified search criteria |
AdminSubZoneSearchResult |
getSubZones(AdminSubZoneSearch search,
int offset,
int size)
This returns an AdminSubZoneSearchResult object. |
int |
getSubZonesCount(AdminSubZoneSearch search)
Returns a count of the number of Zones with the specified search criteria |
AdminTaxClassSearchResult |
getTaxClasses(AdminTaxClassSearch search)
This returns an AdminTaxClassSearchResult object. |
int |
getTaxQuantityRule()
Returns the rule used to calculate tax for products with multiple quantities. |
AdminTaxRateSearchResult |
getTaxRates(AdminTaxRateSearch search,
int offset,
int size)
This returns an AdminTaxRateSearchResult object. |
int |
getTaxRatesCount(AdminTaxRateSearch search)
Returns a count of the number of TaxRates with the specified search criteria |
int |
getTaxScale()
Returns the precision use for calculating tax that matches the ADMIN_CURRENCY_DECIMAL_PLACES configuration variable. |
AdminZone |
getZonePerCountryAndCode(int countryId,
java.lang.String zoneDesc)
The zone name and zone code is compared with the zoneDesc parameter in order to determine whether a zone exists in the DB matching zoneDesc for the country defined by countryId. |
AdminZone |
getZonePerId(int zoneId)
Returns the zone if it exists, otherwise null |
AdminZoneSearchResult |
getZones(AdminZoneSearch search,
int offset,
int size)
This returns an AdminZoneSearchResult object. |
AdminZone[] |
getZonesById(int countryId)
Returns an array of AdminZones in the specified country - fully-populated |
int |
getZonesCount(AdminZoneSearch search)
Returns a count of the number of Zones with the specified search criteria |
int |
insertCountry(AdminCountry country)
Insert an AdminCountry object |
int |
insertGeoZone(AdminGeoZone insertObj)
Insert an AdminGeoZone object |
int |
insertSubZone(AdminSubZone insertObj)
Insert an AdminSubZone object |
int |
insertTaxClass(AdminTaxClass taxClass)
Insert an AdminTaxClass object |
int |
insertTaxRate(AdminTaxRate insertObj)
Insert an AdminTaxRate object |
int |
insertZone(AdminZone insertObj)
Insert an AdminZone object |
void |
refreshConfigs()
Refresh the configuration of the Admin Currency Manager |
protected void |
setZoneCriteriaWithStandardAttributes(org.apache.torque.util.Criteria c)
Sets the criteria with the standard attributes so as not to have to repeat this code many times. |
int |
updateCountry(AdminCountry country)
Update an AdminCountry object |
int |
updateGeoZone(AdminGeoZone updateObj)
Update an AdminGeoZone object |
int |
updateSubZone(AdminSubZone updateObj)
Update an AdminSubZone object |
int |
updateTaxClass(AdminTaxClass taxClass)
Update an AdminTaxClass object |
int |
updateTaxRate(AdminTaxRate updateObj)
Update an AdminTaxRate object |
int |
updateZone(AdminZone updateObj)
Update an AdminZone object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminTaxMgr.StaticData> staticDataHM
Constructor Detail |
---|
public AdminTaxMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the Admin Engine
java.lang.Exception
Method Detail |
---|
public AdminCountry[] getAllCountriesFull() throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
AdminTaxMgrIf
getAllCountriesFull
in interface AdminTaxMgrIf
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
public AdminCountry getCountryByName(java.lang.String countryName) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCountryByName
in interface AdminTaxMgrIf
countryName
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCountry getCountryById(int countryId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCountryById
in interface AdminTaxMgrIf
countryId
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminTaxClass[] getAllTaxClassesFull() throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
AdminTaxMgrIf
getAllTaxClassesFull
in interface AdminTaxMgrIf
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
public AdminTaxClassSearchResult getTaxClasses(AdminTaxClassSearch search) throws KKAdminException
getTaxClasses
in interface AdminTaxMgrIf
search
-
KKAdminException
public int deleteTaxClass(int id) throws KKAdminException
deleteTaxClass
in interface AdminTaxMgrIf
id
- A TaxClass id
KKAdminException
public int insertTaxClass(AdminTaxClass taxClass) throws KKAdminException
insertTaxClass
in interface AdminTaxMgrIf
taxClass
- An AdminTaxClass object
KKAdminException
public int updateTaxClass(AdminTaxClass taxClass) throws KKAdminException
updateTaxClass
in interface AdminTaxMgrIf
taxClass
- An AdminTaxClass object
KKAdminException
protected void addTaxClassOrderBy(com.konakart.bl.KKCriteria c, AdminTaxClassSearch search)
protected int addTaxClassSearchCriteria(com.konakart.bl.KKCriteria c, AdminTaxClassSearch search)
public boolean doesTaxClassExist(int taxClassId) throws org.apache.torque.TorqueException, KKAdminException
doesTaxClassExist
in interface AdminTaxMgrIf
taxClassId
-
org.apache.torque.TorqueException
KKAdminException
public AdminZone[] getZonesById(int countryId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
AdminTaxMgrIf
getZonesById
in interface AdminTaxMgrIf
countryId
-
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException
public AdminZone getZonePerCountryAndCode(int countryId, java.lang.String zoneDesc) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getZonePerCountryAndCode
in interface AdminTaxMgrIf
countryId
- zoneDesc
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminZone getZonePerId(int zoneId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminTaxMgrIf
getZonePerId
in interface AdminTaxMgrIf
zoneId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminZoneSearchResult getZones(AdminZoneSearch search, int offset, int size) throws KKAdminException
getZones
in interface AdminTaxMgrIf
search
- the definition of the search - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offset
KKAdminException
public int deleteZone(int id) throws KKAdminException
deleteZone
in interface AdminTaxMgrIf
id
- A Zone id
KKAdminException
public int insertZone(AdminZone insertObj) throws KKAdminException
insertZone
in interface AdminTaxMgrIf
insertObj
- An AdminZone object
KKAdminException
public int updateZone(AdminZone updateObj) throws KKAdminException
updateZone
in interface AdminTaxMgrIf
updateObj
- An AdminZone object
KKAdminException
public boolean doesZoneExist(int id) throws org.apache.torque.TorqueException, KKAdminException
doesZoneExist
in interface AdminTaxMgrIf
id
- zone id
org.apache.torque.TorqueException
KKAdminException
public int getZonesCount(AdminZoneSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getZonesCount
in interface AdminTaxMgrIf
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected void addZoneOrderBy(com.konakart.bl.KKCriteria c, AdminZoneSearch search)
protected int addZoneSearchCriteria(com.konakart.bl.KKCriteria c, AdminZoneSearch search)
public AdminGeoZone[] getAllGeoZones() throws java.lang.Exception
getAllGeoZones
in interface AdminTaxMgrIf
java.lang.Exception
public AdminGeoZoneSearchResult getGeoZones(AdminGeoZoneSearch search, int offset, int size) throws KKAdminException
getGeoZones
in interface AdminTaxMgrIf
search
- the definition of the search - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offset
KKAdminException
public int deleteGeoZone(int id) throws KKAdminException
deleteGeoZone
in interface AdminTaxMgrIf
id
- A Tax Area id
KKAdminException
public int insertGeoZone(AdminGeoZone insertObj) throws KKAdminException
insertGeoZone
in interface AdminTaxMgrIf
insertObj
- An AdminGeoZone object
KKAdminException
public int updateGeoZone(AdminGeoZone updateObj) throws KKAdminException
updateGeoZone
in interface AdminTaxMgrIf
updateObj
- An AdminGeoZone object
KKAdminException
public boolean doesGeoZoneExist(int id) throws org.apache.torque.TorqueException, KKAdminException
doesGeoZoneExist
in interface AdminTaxMgrIf
id
- zone id
org.apache.torque.TorqueException
KKAdminException
public int getGeoZonesCount(AdminGeoZoneSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getGeoZonesCount
in interface AdminTaxMgrIf
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected void addGeoZoneOrderBy(com.konakart.bl.KKCriteria c, AdminGeoZoneSearch search)
protected int addGeoZoneSearchCriteria(com.konakart.bl.KKCriteria c, AdminGeoZoneSearch search)
public AdminSubZoneSearchResult getSubZones(AdminSubZoneSearch search, int offset, int size) throws KKAdminException
getSubZones
in interface AdminTaxMgrIf
search
- the definition of the search - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offset
KKAdminException
public int deleteSubZone(int id) throws KKAdminException
deleteSubZone
in interface AdminTaxMgrIf
id
- A Zone id
KKAdminException
public int insertSubZone(AdminSubZone insertObj) throws KKAdminException
insertSubZone
in interface AdminTaxMgrIf
insertObj
- An AdminSubZone object
KKAdminException
public int updateSubZone(AdminSubZone updateObj) throws KKAdminException
updateSubZone
in interface AdminTaxMgrIf
updateObj
- An AdminSubZone object
KKAdminException
public boolean doesSubZoneExist(int id) throws org.apache.torque.TorqueException, KKAdminException
doesSubZoneExist
in interface AdminTaxMgrIf
id
- zone id
org.apache.torque.TorqueException
KKAdminException
public int getSubZonesCount(AdminSubZoneSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getSubZonesCount
in interface AdminTaxMgrIf
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected void addSubZoneOrderBy(com.konakart.bl.KKCriteria c, AdminSubZoneSearch search)
protected int addSubZoneSearchCriteria(com.konakart.bl.KKCriteria c, AdminSubZoneSearch search)
public int getCountriesCount(AdminCountrySearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getCountriesCount
in interface AdminTaxMgrIf
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminCountrySearchResult getCountries(AdminCountrySearch search, int offset, int size) throws KKAdminException
getCountries
in interface AdminTaxMgrIf
search
- offset
- the offset in the dbsize
- the number of records from the specified offset
KKAdminException
public int deleteCountry(int id) throws KKAdminException
deleteCountry
in interface AdminTaxMgrIf
id
- A Country id
KKAdminException
public int insertCountry(AdminCountry country) throws KKAdminException
insertCountry
in interface AdminTaxMgrIf
country
- An AdminCountry object
KKAdminException
public int updateCountry(AdminCountry country) throws KKAdminException
updateCountry
in interface AdminTaxMgrIf
country
- An AdminCountry object
KKAdminException
protected void addCountryOrderBy(com.konakart.bl.KKCriteria c, AdminCountrySearch search)
protected int addCountrySearchCriteria(com.konakart.bl.KKCriteria c, AdminCountrySearch search)
public boolean doesCountryExist(int id) throws org.apache.torque.TorqueException, KKAdminException
doesCountryExist
in interface AdminTaxMgrIf
id
- the country Id
org.apache.torque.TorqueException
KKAdminException
public AdminTaxRateSearchResult getAllTaxRates() throws KKAdminException
getAllTaxRates
in interface AdminTaxMgrIf
KKAdminException
public AdminTaxRateSearchResult getTaxRates(AdminTaxRateSearch search, int offset, int size) throws KKAdminException
getTaxRates
in interface AdminTaxMgrIf
search
- the definition of the search - can be nulloffset
- the offset in the dbsize
- the number of records from the specified offset
KKAdminException
public int deleteTaxRate(int id) throws KKAdminException
deleteTaxRate
in interface AdminTaxMgrIf
id
- A TaxRate id
KKAdminException
public int insertTaxRate(AdminTaxRate insertObj) throws KKAdminException
insertTaxRate
in interface AdminTaxMgrIf
insertObj
- An AdminTaxRate object
KKAdminException
public int updateTaxRate(AdminTaxRate updateObj) throws KKAdminException
updateTaxRate
in interface AdminTaxMgrIf
updateObj
- An AdminTaxRate object
KKAdminException
public boolean doesTaxRateExist(int id) throws org.apache.torque.TorqueException, KKAdminException
doesTaxRateExist
in interface AdminTaxMgrIf
id
- zone id
org.apache.torque.TorqueException
KKAdminException
public int getTaxRatesCount(AdminTaxRateSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getTaxRatesCount
in interface AdminTaxMgrIf
search
- Search criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public int getAllTaxRatesCount() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getAllTaxRatesCount
in interface AdminTaxMgrIf
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected void addTaxRateOrderBy(com.konakart.bl.KKCriteria c, AdminTaxRateSearch search)
protected int addTaxRateSearchCriteria(com.konakart.bl.KKCriteria c, AdminTaxRateSearch search)
public void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminTaxMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
public int getTaxQuantityRule() throws KKAdminException
getTaxQuantityRule
in interface AdminTaxMgrIf
KKAdminException
public int getTaxScale() throws KKAdminException
getTaxScale
in interface AdminTaxMgrIf
KKAdminException
protected void setZoneCriteriaWithStandardAttributes(org.apache.torque.util.Criteria c)
c
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |