|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.odmg.Article
Simple Article class is not derived from any base class nor does it implement any Interface, but still it can be made persistent by the PersistenceBroker. Has a lot of private members to be mapped to rdbms columns, but only few business methods
Field Summary |
Fields inherited from interface org.apache.ojb.odmg.TransactionAware |
serialVersionUID |
Constructor Summary | |
Article()
|
|
Article(int pArticleId,
java.lang.String pArticleName,
int pSupplierId,
int pProcuctGroupId,
java.lang.String pUnit,
double pPrice,
int pStock,
int pOrderedUnits,
int pMinimumStock,
boolean pIsSelloutArticle)
|
Method Summary | |
void |
addToStock(int diff)
increase the amount of articles in stock by diff mark the object as modified only if value changes (i.e. |
void |
afterAbort()
afterAbort will be called after a transaction has been aborted. |
void |
afterCommit()
afterCommit is called only after a successful commit has taken place. |
void |
beforeAbort()
beforeAbort is called before a transaction is aborted. |
void |
beforeCommit()
beforeCommit will give an object a chance to kill a transaction before it is committed. |
boolean |
equals(java.lang.Object obj)
|
int |
getArticleId()
return an articles unique id. |
java.lang.String |
getArticleName()
return an articles name. |
boolean |
getIsSelloutArticle()
Gets the isSelloutArticle. |
int |
getMinimumStock()
Gets the minimumStock. |
int |
getOrderedUnits()
Gets the orderedUnits. |
double |
getPrice()
Gets the price. |
ProductGroup |
getProductGroup()
return an articles ProductGroup |
int |
getProductGroupId()
Gets the productGroupId. |
int |
getStock()
return stock of Article. |
double |
getStockValue()
compute the total value of an articles stock |
int |
getSupplierId()
Gets the supplierId. |
java.lang.String |
getUnit()
Gets the unit. |
void |
setArticleId(int articleId)
Sets the articleId. |
void |
setArticleName(java.lang.String articleName)
Sets the articleName. |
void |
setIsSelloutArticle(boolean isSelloutArticle)
Sets the isSelloutArticle. |
void |
setMinimumStock(int minimumStock)
Sets the minimumStock. |
void |
setOrderedUnits(int orderedUnits)
Sets the orderedUnits. |
void |
setPrice(double price)
Sets the price. |
void |
setProductGroup(ProductGroup productGroup)
Sets the productGroup. |
void |
setProductGroupId(int productGroupId)
Sets the productGroupId. |
void |
setStock(int stock)
Sets the stock. |
void |
setSupplierId(int supplierId)
Sets the supplierId. |
void |
setUnit(java.lang.String unit)
Sets the unit. |
java.lang.String |
toString()
return a string representaion of an article |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Article(int pArticleId, java.lang.String pArticleName, int pSupplierId, int pProcuctGroupId, java.lang.String pUnit, double pPrice, int pStock, int pOrderedUnits, int pMinimumStock, boolean pIsSelloutArticle)
public Article()
Method Detail |
public java.lang.String toString()
public void addToStock(int diff)
public int getArticleId()
public java.lang.String getArticleName()
public ProductGroup getProductGroup()
public int getStock()
public double getStockValue()
public void setArticleId(int articleId)
articleId
- The articleId to setpublic void setArticleName(java.lang.String articleName)
articleName
- The articleName to setpublic void setStock(int stock)
stock
- The stock to setpublic void afterAbort()
afterAbort
in interface TransactionAware
public void afterCommit()
afterCommit
in interface TransactionAware
public void beforeAbort()
beforeAbort
in interface TransactionAware
public void beforeCommit() throws TransactionAbortedException
beforeCommit
in interface TransactionAware
TransactionAbortedException
public boolean equals(java.lang.Object obj)
public boolean getIsSelloutArticle()
public void setIsSelloutArticle(boolean isSelloutArticle)
isSelloutArticle
- The isSelloutArticle to setpublic int getMinimumStock()
public void setMinimumStock(int minimumStock)
minimumStock
- The minimumStock to setpublic int getOrderedUnits()
public void setOrderedUnits(int orderedUnits)
orderedUnits
- The orderedUnits to setpublic double getPrice()
public void setPrice(double price)
price
- The price to setpublic void setProductGroup(ProductGroup productGroup)
productGroup
- The productGroup to setpublic int getProductGroupId()
public void setProductGroupId(int productGroupId)
productGroupId
- The productGroupId to setpublic int getSupplierId()
public void setSupplierId(int supplierId)
supplierId
- The supplierId to setpublic java.lang.String getUnit()
public void setUnit(java.lang.String unit)
unit
- The unit to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |