public class ShippingGroupCommerceItemRelationship extends CommerceIdentifierImpl implements CommerceItemRelationship, ShippingGroupRelationship, ChangedProperties
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected static java.lang.String |
HIGH_BOUND_PROPERTY |
protected static java.lang.String |
HIGH_BOUND_WITH_FRACTION_PROPERTY |
protected static java.lang.String |
LOW_BOUND_PROPERTY |
protected static java.lang.String |
LOW_BOUND_WITH_FRACTION_PROPERTY |
Constructor and Description |
---|
ShippingGroupCommerceItemRelationship() |
Modifier and Type | Method and Description |
---|---|
void |
addChangedProperty(java.lang.String pPropertyName)
Adds a changedProperty
|
void |
clearChangedProperties()
Clears the changedProperties List
|
protected void |
createRange()
creates a Range object which is to be used with this Relationship.
|
double |
getAmount()
This method is not used for this relationship class and therefore should not be called.
|
double |
getAmountByAverage()
returns the property amountByAverage.
|
java.util.Set |
getChangedProperties()
Returns the changedProperties
|
CommerceItem |
getCommerceItem()
Returns the CommerceItem reference.
|
java.lang.String |
getCommerceItemExternalId()
A convenience method for return a commerce item's external ID.
|
java.lang.String |
getCommerceItemId()
A convenience method for return a commerce item ID.
|
double |
getPercentage()
This method is not used for this relationship class and therefore should not be called.
|
java.lang.Object |
getPropertyValue(java.lang.String pPropertyName)
Returns a property value
|
long |
getQuantity()
Returns the quantity that this Relationship represents.
|
double |
getQuantityDerivedAsFloatingPoint()
This method will return a derived quantity value which this Relationship object represents.
|
double |
getQuantityWithFraction()
Returns the quantity that this Relationship represents.
|
atg.core.util.Range |
getRange()
The specific commerce items that this relationship reflects.
|
double |
getRawtotalByAverage()
returns the property rawTotalByAverage.
|
java.lang.String |
getRelationshipClassType()
Returns the relationshipClassType
|
int |
getRelationshipType()
Returns the Relationship type.
|
java.lang.String |
getRelationshipTypeAsString()
Returns the Relationship type as a String.
|
MutableRepositoryItem |
getRepositoryItem()
Returns the repositoryItem
|
long |
getReturnedQuantity()
Returns the returnedQuantity
|
double |
getReturnedQuantityDerivedAsFloatingPoint()
This method will return a derived returned quantity value which this Relationship object represents.
|
double |
getReturnedQuantityWithFraction()
Returns the fractional returned quantity.
|
boolean |
getSaveAllProperties()
Returns the saveAllProperties
|
ShippingGroup |
getShippingGroup()
Returns the ShippingGroup reference.
|
java.lang.String |
getShippingGroupId()
A convenience method or return the shipping group ID.
|
int |
getState()
returns the ShippingGroupRelationship state.
|
java.lang.String |
getStateAsString()
returns the Relationship state as a String.
|
java.lang.String |
getStateAsUserResource()
returns the ShippingGroupCommerceItemRelationship state as a user resource
|
java.lang.String |
getStateDetail()
Returns the stateDetail
|
boolean |
isAmountByAverageAccurate()
Returns the property amountByAverageAccurate.
|
boolean |
isChanged()
Returns the isChanged flag
|
boolean |
isFractional()
This returns
true if fractional quantity is set (i.e. |
void |
setAmount(double pAmount)
This method is not used for this relationship class and therefore should not be called.
|
void |
setChanged(boolean pChanged)
Marks this object as changed
|
void |
setCommerceItem(CommerceItem pCommerceItem)
Sets the CommerceItem reference.
|
void |
setPercentage(double pPercentage)
This method is not used for this relationship class and therefore should not be called.
|
void |
setPropertyValue(java.lang.String pPropertyName,
java.lang.Object pPropertyValue)
Sets a property value
|
void |
setQuantity(long pQuantity)
Sets the quantity that this Relationship represents.
|
void |
setQuantityWithFraction(double pQuantityWithFraction)
Sets the quantityWithFraction that this Relationship represents.
|
void |
setRange(atg.core.util.Range pRange) |
void |
setRelationshipClassType(java.lang.String pRelationshipClassType)
Sets the relationshipClassType
|
void |
setRelationshipType(int pType)
Set the Relationship type.
|
void |
setRelationshipTypeAsString(java.lang.String pType)
Set the Relationship type as a string.
|
void |
setRepositoryItem(MutableRepositoryItem pRepositoryItem)
Sets the repositoryItem
|
void |
setReturnedQuantity(long pReturnedQuantity)
Sets the returnedQuantity
|
void |
setReturnedQuantityWithFraction(double pReturnedQuantityWithFraction)
Sets the fractional returned quantity.
|
void |
setSaveAllProperties(boolean pSaveAllProperties)
Sets the saveAllProperties
|
void |
setShippingGroup(ShippingGroup pGroup)
Sets the ShippingGroup reference.
|
void |
setState(int pState)
sets the ShippingGroupRelationship state.
|
void |
setStateAsString(java.lang.String pState)
Sets the state as a String.
|
void |
setStateDetail(java.lang.String pStateDetail)
Sets the stateDetail
|
void |
update(java.util.Observable o,
java.lang.Object arg)
This method is called whenever a property in a contained object changes
and the containing object needs to be notified.
|
getId, setId, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId
public static final java.lang.String CLASS_VERSION
protected static java.lang.String LOW_BOUND_PROPERTY
protected static java.lang.String HIGH_BOUND_PROPERTY
protected static java.lang.String LOW_BOUND_WITH_FRACTION_PROPERTY
protected static java.lang.String HIGH_BOUND_WITH_FRACTION_PROPERTY
public ShippingGroupCommerceItemRelationship()
public java.lang.String getRelationshipClassType()
getRelationshipClassType
in interface Relationship
public void setRelationshipClassType(java.lang.String pRelationshipClassType)
setRelationshipClassType
in interface Relationship
public int getRelationshipType()
getRelationshipType
in interface Relationship
public void setRelationshipType(int pType) throws InvalidTypeException
setRelationshipType
in interface Relationship
InvalidTypeException
public java.lang.String getRelationshipTypeAsString()
public void setRelationshipTypeAsString(java.lang.String pType) throws InvalidTypeException
InvalidTypeException
public int getState()
getState
in interface CommerceItemRelationship
public void setState(int pState)
setState
in interface CommerceItemRelationship
pState
- the state to setpublic java.lang.String getStateAsString()
public void setStateAsString(java.lang.String pState)
public java.lang.String getStateAsUserResource()
public java.lang.String getStateDetail()
getStateDetail
in interface CommerceItemRelationship
public void setStateDetail(java.lang.String pStateDetail)
setStateDetail
in interface CommerceItemRelationship
public ShippingGroup getShippingGroup()
getShippingGroup
in interface ShippingGroupRelationship
public void setShippingGroup(ShippingGroup pGroup)
setShippingGroup
in interface ShippingGroupRelationship
public java.lang.String getShippingGroupId()
public CommerceItem getCommerceItem()
getCommerceItem
in interface CommerceItemRelationship
public void setCommerceItem(CommerceItem pCommerceItem)
setCommerceItem
in interface CommerceItemRelationship
public java.lang.String getCommerceItemId()
public java.lang.String getCommerceItemExternalId()
public long getQuantity()
getQuantity
in interface CommerceItemRelationship
public void setQuantity(long pQuantity)
setQuantity
in interface CommerceItemRelationship
public double getQuantityWithFraction()
getQuantityWithFraction
in interface CommerceItemRelationship
public void setQuantityWithFraction(double pQuantityWithFraction)
setQuantityWithFraction
in interface CommerceItemRelationship
pQuantityWithFraction
- property to be set.public double getQuantityDerivedAsFloatingPoint()
It will decide upon the correct quantity value to return, returning the first non null
value from the properties, quantityWithFraction
, quantity
, in that order.
The method should be used where there is a need to know the quantity of an item
but it is unknown to the caller as to which property (quantityWithFraction
or
quantity
holds the value.
getQuantityDerivedAsFloatingPoint
in interface CommerceItemRelationship
public boolean isFractional()
true
if fractional quantity is set (i.e. it has the
fractional value which is greater than zero) for the item for which this relationship
represents, otherwise false
is returned.isFractional
in interface CommerceItemRelationship
boolean
value.public long getReturnedQuantity()
getReturnedQuantity
in interface CommerceItemRelationship
public void setReturnedQuantity(long pReturnedQuantity)
setReturnedQuantity
in interface CommerceItemRelationship
public double getReturnedQuantityWithFraction()
getReturnedQuantityWithFraction
in interface CommerceItemRelationship
double
valuepublic void setReturnedQuantityWithFraction(double pReturnedQuantityWithFraction)
setReturnedQuantityWithFraction
in interface CommerceItemRelationship
pReturnedQuantityWithFraction
- the property to be set.public double getReturnedQuantityDerivedAsFloatingPoint()
It will decide upon the correct returned quantity value to return, returning the first non zero
value from the properties, returnedQuantityWithFraction
, returnedQuantity
, in that order.
The method should be used where there is a need to know the returned quantity of an item
but it is unknown to the caller as to which property (returnedQuantityWithFraction
or
returnedQuantity
holds the value.
getReturnedQuantityDerivedAsFloatingPoint
in interface CommerceItemRelationship
public double getPercentage()
public void setPercentage(double pPercentage)
public double getAmount()
getAmount
in interface CommerceItemRelationship
getAmount
in interface ShippingGroupRelationship
public void setAmount(double pAmount)
setAmount
in interface CommerceItemRelationship
setAmount
in interface ShippingGroupRelationship
public double getAmountByAverage()
public double getRawtotalByAverage()
public void setRange(atg.core.util.Range pRange)
public atg.core.util.Range getRange()
protected void createRange()
public boolean isAmountByAverageAccurate()
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- the object which changedarg
- the name of the property which changedpublic boolean getSaveAllProperties()
getSaveAllProperties
in interface ChangedProperties
public void setSaveAllProperties(boolean pSaveAllProperties)
setSaveAllProperties
in interface ChangedProperties
public boolean isChanged()
isChanged
in interface ChangedProperties
public void setChanged(boolean pChanged)
setChanged
in interface ChangedProperties
public java.util.Set getChangedProperties()
getChangedProperties
in interface ChangedProperties
public void addChangedProperty(java.lang.String pPropertyName)
addChangedProperty
in interface ChangedProperties
public void clearChangedProperties()
clearChangedProperties
in interface ChangedProperties
public MutableRepositoryItem getRepositoryItem()
getRepositoryItem
in interface ChangedProperties
public void setRepositoryItem(MutableRepositoryItem pRepositoryItem)
setRepositoryItem
in interface ChangedProperties
public java.lang.Object getPropertyValue(java.lang.String pPropertyName)
getPropertyValue
in interface ChangedProperties
public void setPropertyValue(java.lang.String pPropertyName, java.lang.Object pPropertyValue)
setPropertyValue
in interface ChangedProperties
pPropertyValue
- the value to set for the given property value