org.paneris.jammyjoes.model
Class Product

java.lang.Object
  extended by org.melati.poem.transaction.Transactioned
      extended by org.melati.poem.JdbcPersistent
          extended by org.paneris.jammyjoes.model.generated.ProductBase
              extended by org.paneris.jammyjoes.model.Product
All Implemented Interfaces:
java.lang.Cloneable, org.melati.poem.Persistable, org.melati.poem.Persistent, org.melati.poem.Treeable

public class Product
extends ProductBase


Nested Class Summary
 class Product.StockValues
           
 
Field Summary
 
Fields inherited from class org.paneris.jammyjoes.model.generated.ProductBase
award, catalogue, costprice, deleted, deliverycost, depth, description, height, id, leadtime, manufacturer, margin, marginpercent, markuppercent, maxage, minage, minimumorder, name, onorderquantity, picture, picture2, pieces, reorderlevel, reorderquantity, retailprice, retailpriceincvat, saleprice, sex, status, stocklevel, supplier, suppliercode, type, type2, vatexempt, weight, width
 
Fields inherited from class org.melati.poem.transaction.Transactioned
valid
 
Constructor Summary
Product()
           
 
Method Summary
 void calculateMargin(java.lang.Double retailprice, java.lang.Double costprice)
           
 void clearQuantities()
           
 org.melati.poem.Persistent duplicated()
          when duplicating, the new Persistent needs a zero stock level
 java.lang.Double getCostpriceIncVat()
           
 boolean getDiscontinued()
           
 boolean getDoWeSellIt()
           
 boolean getHasStock()
           
 java.lang.Boolean getNew()
           
 java.lang.Double getPreSaleprice()
           
 int getQuantityAjustmentRequired()
           
 double getQuantityCorrectLevel()
           
 double getQuantityInternetSale()
           
 double getQuantityPurchased()
           
 double getQuantityShopSale()
           
 double getQuantitySold()
           
 java.lang.Double getQuantitySoldFromDate(java.sql.Date date)
           
 java.lang.Double getQuantitySoldToDate(java.sql.Date date)
           
 double getQuantityStockCheckDecrease()
           
 double getQuantityStockCheckIncrease()
           
 double getQuantityTelephoneSale()
           
 double getRequiredOrderValue()
           
 java.lang.Double getStockLevel(java.sql.Date date)
           
 Product.StockValues getStockLevels(java.sql.Date date)
           
 boolean hasStatus(ProductStatus status)
           
 StockTransaction newStockTransaction(java.sql.Date date, StockTransactionType type, java.lang.Integer quantity)
           
 void setCostprice(java.lang.Double cooked)
          Sets the Costprice value, with checking, for this Product Persistent.
 void setRetailprice(java.lang.Double cooked)
          Sets the Retailprice value, with checking, for this Product Persistent.
 void setRetailpriceincvat(java.lang.Double cooked)
          Sets the Retailpriceincvat value, with checking, for this Product Persistent.
 void setVatexempt(java.lang.Boolean cooked)
          Sets the Vatexempt value, with checking, for this Product Persistent.
 
Methods inherited from class org.paneris.jammyjoes.model.generated.ProductBase
getAward_unsafe, getAward, getAwardField, getAwardTroid, getCatalogue_unsafe, getCatalogue, getCatalogueField, getCostprice_unsafe, getCostprice, getCostpriceField, getDeleted_unsafe, getDeleted, getDeletedField, getDeliverycost_unsafe, getDeliverycost, getDeliverycostField, getDepth_unsafe, getDepth, getDepthField, getDescription_unsafe, getDescription, getDescriptionField, getHeight_unsafe, getHeight, getHeightField, getId_unsafe, getId, getIdField, getJammyjoesDatabaseTables, getLeadtime_unsafe, getLeadtime, getLeadtimeField, getManufacturer_unsafe, getManufacturer, getManufacturerField, getManufacturerTroid, getMargin_unsafe, getMargin, getMarginField, getMarginpercent_unsafe, getMarginpercent, getMarginpercentField, getMarkuppercent_unsafe, getMarkuppercent, getMarkuppercentField, getMaxage_unsafe, getMaxage, getMaxageField, getMinage_unsafe, getMinage, getMinageField, getMinimumorder_unsafe, getMinimumorder, getMinimumorderField, getName_unsafe, getName, getNameField, getOnorderquantity_unsafe, getOnorderquantity, getOnorderquantityField, getPicture_unsafe, getPicture, getPicture2_unsafe, getPicture2, getPicture2Field, getPictureField, getPieces_unsafe, getPieces, getPiecesField, getProductTable, getReorderlevel_unsafe, getReorderlevel, getReorderlevelField, getReorderquantity_unsafe, getReorderquantity, getReorderquantityField, getRetailprice_unsafe, getRetailprice, getRetailpriceField, getRetailpriceincvat_unsafe, getRetailpriceincvat, getRetailpriceincvatField, getSaleprice_unsafe, getSaleprice, getSalepriceField, getSex_unsafe, getSex, getSexField, getSexTroid, getStatus_unsafe, getStatus, getStatusField, getStatusTroid, getStocklevel_unsafe, getStocklevel, getStocklevelField, getSupplier_unsafe, getSupplier, getSuppliercode_unsafe, getSuppliercode, getSuppliercodeField, getSupplierField, getSupplierTroid, getType_unsafe, getType, getType2_unsafe, getType2, getType2Field, getType2Troid, getTypeField, getTypeTroid, getVatexempt_unsafe, getVatexempt, getVatexemptField, getWeight_unsafe, getWeight, getWeightField, getWidth_unsafe, getWidth, getWidthField, setAward_unsafe, setAward, setAwardTroid, setCatalogue_unsafe, setCatalogue, setCatalogue, setCostprice_unsafe, setCostprice, setDeleted_unsafe, setDeleted, setDeleted, setDeliverycost_unsafe, setDeliverycost, setDeliverycost, setDepth_unsafe, setDepth, setDepth, setDescription_unsafe, setDescription, setHeight_unsafe, setHeight, setHeight, setId_unsafe, setId, setId, setLeadtime_unsafe, setLeadtime, setLeadtime, setManufacturer_unsafe, setManufacturer, setManufacturerTroid, setMargin_unsafe, setMargin, setMargin, setMarginpercent_unsafe, setMarginpercent, setMarginpercent, setMarkuppercent_unsafe, setMarkuppercent, setMarkuppercent, setMaxage_unsafe, setMaxage, setMaxage, setMinage_unsafe, setMinage, setMinage, setMinimumorder_unsafe, setMinimumorder, setMinimumorder, setName_unsafe, setName, setOnorderquantity_unsafe, setOnorderquantity, setOnorderquantity, setPicture_unsafe, setPicture, setPicture2_unsafe, setPicture2, setPieces_unsafe, setPieces, setPieces, setReorderlevel_unsafe, setReorderlevel, setReorderlevel, setReorderquantity_unsafe, setReorderquantity, setReorderquantity, setRetailprice_unsafe, setRetailprice, setRetailpriceincvat_unsafe, setRetailpriceincvat, setSaleprice_unsafe, setSaleprice, setSaleprice, setSex_unsafe, setSex, setSexTroid, setStatus_unsafe, setStatus, setStatusTroid, setStocklevel_unsafe, setStocklevel, setStocklevel, setSupplier_unsafe, setSupplier, setSuppliercode_unsafe, setSuppliercode, setSupplierTroid, setType_unsafe, setType, setType2_unsafe, setType2, setType2Troid, setTypeTroid, setVatexempt_unsafe, setVatexempt, setWeight_unsafe, setWeight, setWeight, setWidth_unsafe, setWidth, setWidth
 
Methods inherited from class org.melati.poem.JdbcPersistent
assertCanCreate, assertCanCreate, assertCanDelete, assertCanDelete, assertCanRead, assertCanRead, assertCanWrite, assertCanWrite, clone, commit, countMatchSQL, delete_unsafe, delete, delete, deleteAndCommit, deleteAndCommit, deleteLock, displayString, displayString, displayString, dump, dump, duplicatedFloating, equals, existenceLock, existenceLock, fieldsOfColumns, fromClause, getCanDelete, getCanRead, getCanSelect, getCanWrite, getChildren, getCooked, getCookedString, getDatabase, getDetailDisplayFields, getField, getFields, getPrimaryDisplayField, getRaw, getRawString, getReadable, getRecordDisplayFields, getSearchCriterionFields, getSummaryDisplayFields, getTable, getTroid, hashCode, invalidate, isDirty, load, makePersistent, postEdit, postInsert, postModify, postWrite, preEdit, readLock, readLock, readLock, rollback, setCooked, setDirty, setRaw, setRawString, statusExistent, statusNonexistent, toString, troid, upToDate, writeDown, writeLock, writeLock, writeLock
 
Methods inherited from class org.melati.poem.transaction.Transactioned
markValid, reset, setTransactionPool, transactionPool, unSee
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Product

public Product()
Method Detail

setVatexempt

public void setVatexempt(java.lang.Boolean cooked)
                  throws org.melati.poem.AccessPoemException,
                         org.melati.poem.ValidationPoemException
Description copied from class: ProductBase
Sets the Vatexempt value, with checking, for this Product Persistent.

Overrides:
setVatexempt in class ProductBase
Parameters:
cooked - a validated int
Throws:
org.melati.poem.AccessPoemException - if the current AccessToken does not confer write access rights
org.melati.poem.ValidationPoemException - if the value is not valid

hasStatus

public boolean hasStatus(ProductStatus status)

getHasStock

public boolean getHasStock()

getDoWeSellIt

public boolean getDoWeSellIt()

getDiscontinued

public boolean getDiscontinued()

getPreSaleprice

public java.lang.Double getPreSaleprice()

getCostpriceIncVat

public java.lang.Double getCostpriceIncVat()

setRetailpriceincvat

public void setRetailpriceincvat(java.lang.Double cooked)
                          throws org.melati.poem.AccessPoemException,
                                 org.melati.poem.ValidationPoemException
Description copied from class: ProductBase
Sets the Retailpriceincvat value, with checking, for this Product Persistent.

Overrides:
setRetailpriceincvat in class ProductBase
Parameters:
cooked - a validated int
Throws:
org.melati.poem.AccessPoemException - if the current AccessToken does not confer write access rights
org.melati.poem.ValidationPoemException - if the value is not valid

setRetailprice

public void setRetailprice(java.lang.Double cooked)
                    throws org.melati.poem.AccessPoemException,
                           org.melati.poem.ValidationPoemException
Description copied from class: ProductBase
Sets the Retailprice value, with checking, for this Product Persistent.

Overrides:
setRetailprice in class ProductBase
Parameters:
cooked - a validated int
Throws:
org.melati.poem.AccessPoemException - if the current AccessToken does not confer write access rights
org.melati.poem.ValidationPoemException - if the value is not valid

setCostprice

public void setCostprice(java.lang.Double cooked)
                  throws org.melati.poem.AccessPoemException,
                         org.melati.poem.ValidationPoemException
Description copied from class: ProductBase
Sets the Costprice value, with checking, for this Product Persistent.

Overrides:
setCostprice in class ProductBase
Parameters:
cooked - a validated int
Throws:
org.melati.poem.AccessPoemException - if the current AccessToken does not confer write access rights
org.melati.poem.ValidationPoemException - if the value is not valid

calculateMargin

public void calculateMargin(java.lang.Double retailprice,
                            java.lang.Double costprice)

clearQuantities

public void clearQuantities()

getQuantityPurchased

public double getQuantityPurchased()

getQuantityShopSale

public double getQuantityShopSale()

getQuantityInternetSale

public double getQuantityInternetSale()

getQuantityTelephoneSale

public double getQuantityTelephoneSale()

getQuantityStockCheckIncrease

public double getQuantityStockCheckIncrease()

getQuantityStockCheckDecrease

public double getQuantityStockCheckDecrease()

getQuantitySold

public double getQuantitySold()

getQuantityCorrectLevel

public double getQuantityCorrectLevel()

getQuantityAjustmentRequired

public int getQuantityAjustmentRequired()

getRequiredOrderValue

public double getRequiredOrderValue()

duplicated

public org.melati.poem.Persistent duplicated()
                                      throws org.melati.poem.AccessPoemException
when duplicating, the new Persistent needs a zero stock level

Specified by:
duplicated in interface org.melati.poem.Persistent
Overrides:
duplicated in class org.melati.poem.JdbcPersistent
Throws:
org.melati.poem.AccessPoemException

getStockLevel

public java.lang.Double getStockLevel(java.sql.Date date)

getQuantitySoldToDate

public java.lang.Double getQuantitySoldToDate(java.sql.Date date)

getQuantitySoldFromDate

public java.lang.Double getQuantitySoldFromDate(java.sql.Date date)

getStockLevels

public Product.StockValues getStockLevels(java.sql.Date date)

getNew

public java.lang.Boolean getNew()

newStockTransaction

public StockTransaction newStockTransaction(java.sql.Date date,
                                            StockTransactionType type,
                                            java.lang.Integer quantity)


Copyright © 2001-2008 PanEris. All Rights Reserved.