com.beasys.commerce.ebusiness.tax
Class TaxParametersImpl

java.lang.Object
  extended by com.beasys.commerce.foundation.BelongingImpl
      extended by com.beasys.commerce.ebusiness.tax.TaxParametersImpl
All Implemented Interfaces
TaxParameters, Belonging, BusinessSmartComponent, RelationalReference, Serializable, Cloneable, Comparable

public class TaxParametersImpl
extends BelongingImpl
implements TaxParameters, Cloneable

Currently defined locations include: ShipTo ShipFrom OrderAcceptance OrderOrigin Currently defined order-based attributes include: (listed with "name" (type) (default) explanation. None are required.) freight (com.beasys.commerce.axiom.units.Price)(0) commit (Boolean) (True) store the tax in the audit file or not credit (Boolean) (False) for credit transactions titlePassage(Char) (D)-O for point of Origin, D for point of Delivery date (java.sql.Date) (current system Date) date of tax taxType (Character) (S) S for sales tax U for use tax companyID (String) (PlaceHolder) The name of the source company for the transaction overrideTax (Double) (0) The override tax rate as a fraction, 0.0 means no override

See Also
TaxParameters, TaxParametersHome, Serialized Form

Field Summary
 Map location
           Containment: By Value Multiplicity: 0:N Interface: java.util.Map
 TreeMap orderAttribs
           
 
Fields inherited from class com.beasys.commerce.foundation.BelongingImpl
__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty
 
Fields inherited from interface com.beasys.commerce.ebusiness.tax.TaxParameters
BUSINESSLOCATIONCODE, BUYERREGISTRATIONNUMBER, COMMIT, COMPANYID, COUNTRYOFORIGIN, CREDIT, CURRENCY, DATE, DELIVERYTERMS, DISTANCESALEINDICATOR, DOCUMENTNUMBER, FREIGHT, MODEOFTRANSPORT, NETMASS, NOTC, ORDERACCEPTANCE, ORDERORIGIN, REGIONOFORIGINORDESTINATION, SELLERREGISTRATIONNUMBER, SHIPFROM, SHIPTO, STATISTICALPROCEDURECODE, TAXDEBUG, TAXSELPARM, TAXTYPE, TITLEPASSAGE, TRANSACTIONTYPE, WTCODE
 
Constructor Summary
TaxParametersImpl()
           
 
Method Summary
 void addAttrib(String name, Object obj)
          adds an attribute to the attributes in TaxParameter.
 void clearLocationMap()
          Removes all mappings from this map (optional operation).
 int compareTo(Object o)
          Compare this belonging to another
 boolean equalsLocationMap(Object object)
          Compares the specified object with this map for equality.
 Object getAttrib(String name)
          returns an object that has the given string as attirbute.
 com.beasys.commerce.axiom.contact.Address getLocation(Object key)
          Returns the value to which this map maps the specified key.
 Map getLocationMap()
          Returns a deep copy of the entire collection
 TreeMap getOrderAttribs()
          For ease of use, in case the same parameters need to be reused.
 String interfaceName()
          interfaceName() returns the unqualified name of the interface from the UML model
 boolean isLocationMapEmpty()
          Returns true if this map contains no key-value mappings.
 boolean locationMapContainsKey(Object key)
          Returns true if this map contains a mapping for the specified key.
 boolean locationMapContainsValue(com.beasys.commerce.axiom.contact.Address element)
          Returns true if this map maps one or more keys to the specified value.
 Set locationMapEntrySet()
          Returns a (deep copy) set view of the mappings contained in this map.
 int locationMapHashCode()
          Returns the hash code value for this map.
 Iterator locationMapIterator()
          Returns a (shallow) iterator for this map
 Set locationMapKeySet()
          Returns a (deep copy) set view of the keys contained in this map.
 int locationMapSize()
          Returns the number of key-value mappings in this map.
 Collection locationMapValues()
          Returns a (deep copy) collection view of the values contained in this map.
 com.beasys.commerce.axiom.contact.Address putLocation(Object key, com.beasys.commerce.axiom.contact.Address element)
          Associates the specified value with the specified key in this map (optional operation).
 void putLocationMap(Map map)
          Copies all of the mappings from the specified map to this map (optional operation).
 com.beasys.commerce.axiom.contact.Address removeLocation(Object key)
          Removes the mapping for this key from this map if present (optional operation).
 void setByValue(Belonging value)
          It is possible to call set-by-value with a superclass.
 void setLocationMap(Map map)
          Sets the entire collection
 void setOrderAttribs(TreeMap orderAttribs)
          For ease of use, if desired, the entire set of attributes may be set.
 Belonging value()
          value() is a more typesafe implementation of clone()
 
Methods inherited from class com.beasys.commerce.foundation.BelongingImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.beasys.commerce.foundation.Belonging
clone, equals
 

Field Detail

orderAttribs

public TreeMap orderAttribs

location

public Map location

Constructor Detail

TaxParametersImpl

public TaxParametersImpl()
Method Detail

getLocationMap

public Map getLocationMap()
Returns a deep copy of the entire collection

Specified by:
getLocationMap in interface TaxParameters

setLocationMap

public void setLocationMap(Map map)
Sets the entire collection

Specified by:
setLocationMap in interface TaxParameters

locationMapIterator

public Iterator locationMapIterator()
Returns a (shallow) iterator for this map

Specified by:
locationMapIterator in interface TaxParameters

clearLocationMap

public void clearLocationMap()
Removes all mappings from this map (optional operation).

Specified by:
clearLocationMap in interface TaxParameters

locationMapContainsKey

public boolean locationMapContainsKey(Object key)
Returns true if this map contains a mapping for the specified key.

Specified by:
locationMapContainsKey in interface TaxParameters

locationMapContainsValue

public boolean locationMapContainsValue(com.beasys.commerce.axiom.contact.Address element)
Returns true if this map maps one or more keys to the specified value.

Specified by:
locationMapContainsValue in interface TaxParameters

locationMapEntrySet

public Set locationMapEntrySet()
Returns a (deep copy) set view of the mappings contained in this map.

Specified by:
locationMapEntrySet in interface TaxParameters

equalsLocationMap

public boolean equalsLocationMap(Object object)
Compares the specified object with this map for equality.

Specified by:
equalsLocationMap in interface TaxParameters

getLocation

public com.beasys.commerce.axiom.contact.Address getLocation(Object key)
Returns the value to which this map maps the specified key.

Specified by:
getLocation in interface TaxParameters

locationMapHashCode

public int locationMapHashCode()
Returns the hash code value for this map.

Specified by:
locationMapHashCode in interface TaxParameters

isLocationMapEmpty

public boolean isLocationMapEmpty()
Returns true if this map contains no key-value mappings.

Specified by:
isLocationMapEmpty in interface TaxParameters

locationMapKeySet

public Set locationMapKeySet()
Returns a (deep copy) set view of the keys contained in this map.

Specified by:
locationMapKeySet in interface TaxParameters

putLocation

public com.beasys.commerce.axiom.contact.Address putLocation(Object key,
                                                             com.beasys.commerce.axiom.contact.Address element)
Associates the specified value with the specified key in this map (optional operation).

Specified by:
putLocation in interface TaxParameters

putLocationMap

public void putLocationMap(Map map)
Copies all of the mappings from the specified map to this map (optional operation).

Specified by:
putLocationMap in interface TaxParameters

removeLocation

public com.beasys.commerce.axiom.contact.Address removeLocation(Object key)
Removes the mapping for this key from this map if present (optional operation).

Specified by:
removeLocation in interface TaxParameters

locationMapSize

public int locationMapSize()
Returns the number of key-value mappings in this map.

Specified by:
locationMapSize in interface TaxParameters

locationMapValues

public Collection locationMapValues()
Returns a (deep copy) collection view of the values contained in this map.

Specified by:
locationMapValues in interface TaxParameters

value

public Belonging value()
value() is a more typesafe implementation of clone()

Specified by:
value in interface Belonging
Returns
a clone of this instance

interfaceName

public String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model

Specified by:
interfaceName in interface Belonging
Returns
the unqualified name of the belonging interface from the UML model

setByValue

public void setByValue(Belonging value)
It is possible to call set-by-value with a superclass. If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values.

It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

Specified by:
setByValue in interface Belonging
Overrides:
setByValue in class BelongingImpl
Parameters
value - The Belonging to use for initialization.

compareTo

public int compareTo(Object o)
Compare this belonging to another

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in class BelongingImpl
Parameters
o - target object for comparision
Returns
0 objects are equal

addAttrib

public void addAttrib(String name,
                      Object obj)
adds an attribute to the attributes in TaxParameter. If a map does not exist, it will be created. Address attributes should be set via the accessors to the location collection.

Specified by:
addAttrib in interface TaxParameters

getAttrib

public Object getAttrib(String name)
returns an object that has the given string as attirbute. If the attribute does not exist, then it returns null.

Specified by:
getAttrib in interface TaxParameters

setOrderAttribs

public void setOrderAttribs(TreeMap orderAttribs)
For ease of use, if desired, the entire set of attributes may be set.

Specified by:
setOrderAttribs in interface TaxParameters

getOrderAttribs

public TreeMap getOrderAttribs()
For ease of use, in case the same parameters need to be reused. Note that the locations collection is not included in the treemap returned.

Specified by:
getOrderAttribs in interface TaxParameters


Copyright © 2006 BEA Systems, Inc. All Rights Reserved