org.geebis.books.model.gj
Class GeneralJournalEntry

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

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

The GeneralJournalEntry class represents a manual general journal entry into the system.

See Also:
Serialized Form

Constructor Summary
GeneralJournalEntry()
           
 
Method Summary
 void addLine(GeneralJournalEntryLine line)
          Adds a line to this gj entry
 java.lang.Double calculateAmountRemaining()
          Returns the amount that this gj entry is out of balance
 java.util.Date getDate()
          Gets the date that this gj is for
 java.lang.String getDescription()
          Gets the description of this gj entry
 java.lang.Long getId()
           
 java.util.List<GeneralJournalEntryLine> getLines()
          Gets the lines of this gj entry
 java.lang.String getNumber()
          Sets the number of this gj entry.
 java.lang.Boolean getPosted()
          Gets whether this gj entry has been posted
 java.lang.Integer getVersion()
           
 boolean isBalanced()
          Returns true if this GJ entry is balanced, false if it is not
 void removeLine(GeneralJournalEntryLine line)
          Removes a line from this gj entry
 void setDate(java.util.Date date)
          Sets the date that this gj is for
 void setDescription(java.lang.String description)
          Sets the description of this gj entry
 void setId(java.lang.Long id)
           
 void setLines(java.util.List<GeneralJournalEntryLine> lines)
          Sets the lines of this gj entry
 void setNumber(java.lang.String number)
          Sets the number of this gj entry
 void setPosted(java.lang.Boolean posted)
          Sets whether this gj entry has been posted
 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

GeneralJournalEntry

public GeneralJournalEntry()
Method Detail

getNumber

public java.lang.String getNumber()
Sets the number of this gj entry. The gj entry number is unique and is used to look up gj entries

Returns:
the number of this gj entry

setNumber

public void setNumber(java.lang.String number)
Sets the number of this gj entry

Parameters:
number - the new number for this gj entry
See Also:
getEmployeeId()

getDescription

public java.lang.String getDescription()
Gets the description of this gj entry

Returns:
the description of this gj entry

setDescription

public void setDescription(java.lang.String description)
Sets the description of this gj entry

Parameters:
description - the new description of this gj entry

getDate

public java.util.Date getDate()
Gets the date that this gj is for

Returns:
the date that this gj is for

setDate

public void setDate(java.util.Date date)
Sets the date that this gj is for

Parameters:
date - the new date that this gj is for

getPosted

public java.lang.Boolean getPosted()
Gets whether this gj entry has been posted

Returns:
true if this gj entry has been posted

setPosted

public void setPosted(java.lang.Boolean posted)
Sets whether this gj entry has been posted

Parameters:
posted - the new value for whether this gj entry has been poasted

getLines

public java.util.List<GeneralJournalEntryLine> getLines()
Gets the lines of this gj entry

Returns:
the lines of this gj entry
See Also:
GeneralJournalEntryLine

setLines

public void setLines(java.util.List<GeneralJournalEntryLine> lines)
Sets the lines of this gj entry

Parameters:
lines - the new lines for this gj entry

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)

addLine

public void addLine(GeneralJournalEntryLine line)
Adds a line to this gj entry

Parameters:
line - the line to add to this gj entry
See Also:
GeneralJournalEntryLine

removeLine

public void removeLine(GeneralJournalEntryLine line)
Removes a line from this gj entry

Parameters:
line - the line to remove from this gj entry
See Also:
GeneralJournalEntryLine

isBalanced

public boolean isBalanced()
Returns true if this GJ entry is balanced, false if it is not

Returns:
true if this gj entry is balanced, false if otherwise

calculateAmountRemaining

public java.lang.Double calculateAmountRemaining()
Returns the amount that this gj entry is out of balance

Returns:
the amount that this gj entry is out of balance