|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.AbstractNamedEntity
org.torweg.pulse.util.entity.AbstractNamableEntity
org.torweg.pulse.component.shop.model.TaxGroup
@Entity public class TaxGroup
represents a tax group in the shop's model.
The TaxGroup has the following uniqueness constraints:
ShopSettings:
@UniqueConstraint(columnNames = "shopSettings_id", "name")ShopSettings:
@UniqueConstraint(columnNames = "shopSettings_id", "percentage")
| Constructor Summary | |
|---|---|
protected |
TaxGroup()
Deprecated. |
|
TaxGroup(java.lang.String n,
long p)
creates a new TaxGroup with the given name and percentage. |
|
TaxGroup(java.lang.String n,
java.lang.String p)
creates a new TaxGroup with the given name and percentage. |
| Method Summary | |
|---|---|
org.jdom.Element |
deserializeToJDOM()
returns a JDOM representation of the Price. |
long |
getPercentage()
returns the percentage of the TaxGroup. |
java.lang.String |
getPercentageString()
returns the percentage of the TaxGroup as a string with the
fraction. |
ShopSettings |
getShopSettings()
returns the shop settings the tax group is associated with. |
void |
setPercentage(long p)
sets the percentage of the TaxGroup. |
void |
setPercentage(java.lang.String p)
sets the percentage of the TaxGroup from a given string. |
protected void |
setSettings(ShopSettings s)
is called by ShopSettings.setTaxGroups(java.util.Set) to keep
track of the bidirectional mapping, i.e. |
net.sf.json.JSONObject |
toJSON()
returns a JSONObject representing the TaxGroup. |
java.lang.String |
toString()
returns a string representation of the tax group. |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractNamableEntity |
|---|
setName |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractNamedEntity |
|---|
getName |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.torweg.pulse.util.INameable |
|---|
setName |
| Methods inherited from interface org.torweg.pulse.util.INamed |
|---|
getName |
| Constructor Detail |
|---|
@Deprecated protected TaxGroup()
public TaxGroup(java.lang.String n,
long p)
TaxGroup with the given name and percentage.
n - the namep - the percentage
public TaxGroup(java.lang.String n,
java.lang.String p)
TaxGroup with the given name and percentage.
n - the namep - the percentage as string| Method Detail |
|---|
public final ShopSettings getShopSettings()
protected final void setSettings(ShopSettings s)
ShopSettings.setTaxGroups(java.util.Set) to keep
track of the bidirectional mapping, i.e. the mapping is managed by
ShopSettings.
s - the shop settings the tax group is associated withpublic final long getPercentage()
TaxGroup.
TaxGrouppublic final java.lang.String getPercentageString()
TaxGroup as a string with the
fraction.
TaxGroup as a stringpublic final void setPercentage(java.lang.String p)
TaxGroup from a given string.
p - the percentage to set as stringpublic final void setPercentage(long p)
TaxGroup.
p - the percentage to setpublic java.lang.String toString()
toString in class java.lang.Objectpublic final org.jdom.Element deserializeToJDOM()
Price.
deserializeToJDOM in interface JDOMablePriceJDOMable.deserializeToJDOM()public final net.sf.json.JSONObject toJSON()
JSONObject representing the TaxGroup.
JSONObject representing the TaxGroup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||