org.geebis.books.model.po
Class PurchaseOrder

java.lang.Object
  extended by org.geebis.books.model.po.PurchaseOrder
All Implemented Interfaces:
java.io.Serializable

@Name(value="purchaseOrder")
public class PurchaseOrder
extends java.lang.Object
implements java.io.Serializable

The PurchaseOrder class represents a purchase order in the GeebisBooks system

See Also:
Serialized Form

Constructor Summary
PurchaseOrder()
           
PurchaseOrder(java.lang.String number)
           
 
Method Summary
 void addLine(PurchaseOrderLine line)
          Adds a po line to this purchase order
 java.lang.Double calculateAmount()
          Calculates the amount of this PO
 java.util.Date getDate()
          Gets the date of the PO
 java.lang.String getDescription()
          Gets the description of the PO
 java.lang.Long getId()
           
 java.util.List<PurchaseOrderLine> getLines()
          Gets the lines of the PO
 java.lang.String getNotes()
          Gets the notes of the PO
 java.lang.String getNumber()
          Gets the number of the PO
 Partner getPartner()
          Gets the partner to whom you want to ship the goods on the PO to
 MailingAddress getShipTo()
          Gets the MailingAddress to which you want to ship the goods on this PO to
 PurchaseOrderStatus getStatus()
          Gets the status of the PO
 java.lang.Boolean getTaxable()
          Gets whether the PO is taxable
 Terms getTerms()
          Gets the terms of the PO
 Vendor getVendor()
          Gets the vendor of the PO
 java.lang.Integer getVersion()
           
 void removeLine(PurchaseOrderLine line)
          Removes a po line from this purchase order
 void setDate(java.util.Date date)
          Sets the date of the PO
 void setDescription(java.lang.String description)
          Sets the description of the PO
 void setId(java.lang.Long id)
           
 void setLines(java.util.List<PurchaseOrderLine> lines)
          Sets the lines of the PO
 void setNotes(java.lang.String notes)
          Sets the notes of the PO
 void setNumber(java.lang.String number)
          Sets the number of the PO
 void setPartner(Partner partner)
          Sets the partner to whom you want to ship the goods on the PO to
 void setShipTo(MailingAddress shipTo)
          Sets the MailingAddress to which you want to ship the goods on this PO to
 void setStatus(PurchaseOrderStatus status)
          Sets the status of the PO
 void setTaxable(java.lang.Boolean taxable)
          Sets whether the PO is taxable
 void setTerms(Terms terms)
          Sets the terms of the PO
 void setVendor(Vendor vendor)
          Sets the vendor of the PO
 void setVersion(java.lang.Integer version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurchaseOrder

public PurchaseOrder()

PurchaseOrder

public PurchaseOrder(java.lang.String number)
Method Detail

getNumber

public java.lang.String getNumber()
Gets the number of the PO

Returns:
the number of the PO

setNumber

public void setNumber(java.lang.String number)
Sets the number of the PO

Parameters:
number - the new number for the PO

getDescription

public java.lang.String getDescription()
Gets the description of the PO

Returns:
the description of the PO

setDescription

public void setDescription(java.lang.String description)
Sets the description of the PO

Parameters:
description - the new description of the PO

getTaxable

public java.lang.Boolean getTaxable()
Gets whether the PO is taxable

Returns:
true if the PO is taxable, false if otherwise

setTaxable

public void setTaxable(java.lang.Boolean taxable)
Sets whether the PO is taxable

Parameters:
taxable - the new taxability of the PO

getNotes

public java.lang.String getNotes()
Gets the notes of the PO

Returns:
the notes of the PO

setNotes

public void setNotes(java.lang.String notes)
Sets the notes of the PO

Parameters:
notes - the new notes of the PO

getDate

public java.util.Date getDate()
Gets the date of the PO

Returns:
the date of the PO

setDate

public void setDate(java.util.Date date)
Sets the date of the PO

Parameters:
date - new date of the PO

getStatus

public PurchaseOrderStatus getStatus()
Gets the status of the PO

Returns:
the status of the po
See Also:
PurchaseOrderStatus

setStatus

public void setStatus(PurchaseOrderStatus status)
Sets the status of the PO

Parameters:
status - the new status of the PO

getLines

public java.util.List<PurchaseOrderLine> getLines()
Gets the lines of the PO

Returns:
the lines of the PO
See Also:
PurchaseOrderLine

setLines

public void setLines(java.util.List<PurchaseOrderLine> lines)
Sets the lines of the PO

Parameters:
lines - the new lines of the PO

getTerms

public Terms getTerms()
Gets the terms of the PO

Returns:
the terms of the PO

setTerms

public void setTerms(Terms terms)
Sets the terms of the PO

Parameters:
terms - the new terms of the PO
See Also:
Terms

getShipTo

public MailingAddress getShipTo()
Gets the MailingAddress to which you want to ship the goods on this PO to

Returns:
the MailingAddress to which you want to ship goods

setShipTo

public void setShipTo(MailingAddress shipTo)
Sets the MailingAddress to which you want to ship the goods on this PO to

Parameters:
shipTo - the new MailingAddress to which you want to ship the goods on this PO to

getVendor

public Vendor getVendor()
Gets the vendor of the PO

Returns:
the vendor of the PO
See Also:
Vendor

setVendor

public void setVendor(Vendor vendor)
Sets the vendor of the PO

Parameters:
vendor - the new vendor of the PO

getPartner

public Partner getPartner()
Gets the partner to whom you want to ship the goods on the PO to

Returns:
the partner to whom you want to ship the goods on the PO to

setPartner

public void setPartner(Partner partner)
Sets the partner to whom you want to ship the goods on the PO to

Parameters:
partner - the new partner to ship the goods on the PO to

getVersion

public java.lang.Integer getVersion()

setVersion

public void setVersion(java.lang.Integer version)

getId

public java.lang.Long getId()

setId

public void setId(java.lang.Long id)

calculateAmount

public java.lang.Double calculateAmount()
Calculates the amount of this PO

Returns:
the amount of this PO

addLine

public void addLine(PurchaseOrderLine line)
Adds a po line to this purchase order

Parameters:
line - the line to add

removeLine

public void removeLine(PurchaseOrderLine line)
Removes a po line from this purchase order

Parameters:
line - the line to remove