org.kuali.kfs.module.ld.util
Class LaborLedgerUnitOfWork

java.lang.Object
  extended by org.kuali.kfs.module.ld.util.LaborLedgerUnitOfWork

public class LaborLedgerUnitOfWork
extends Object

This class is a working unit of labor origin entry. It is formed by a group of slimilar labor origin entries. If any two entries have the same values for the given fields, then they are similar and can be grouped.


Constructor Summary
LaborLedgerUnitOfWork()
          Constructs a LaborLedgerUnitOfWork.java.
LaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry)
          Constructs a LaborLedgerUnitOfWork.java.
 
Method Summary
 boolean addEntryIntoUnit(LaborOriginEntry laborOriginEntry)
          add the given origin entry as a member of the working unit
 boolean canContain(LaborOriginEntry laborOriginEntry)
          Determine if the given origin entry belongs to the current unit of work
protected  List<String> getDefaultKeyFields()
          Get the default key fields as a list
 List<String> getKeyFields()
          Gets the keyFields attribute.
 int getNumOfMember()
          Gets the numOfMember attribute.
 LaborOriginEntry getWorkingEntry()
          Gets the workingEntry attribute.
 boolean hasSameKey(LaborOriginEntry laborOriginEntry)
          Determine if the given origin entry has the same key as the current unit of work
 void resetLaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry)
          Intialize the default key fields of the labor ledger unit of work with the given origin entry
 void resetLaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry, List<String> keyFields)
          Intialize the specified key fields of the labor ledger unit of work with the given origin entry
 void setKeyFields(List<String> keyFields)
          Sets the keyFields attribute value.
 void setNumOfMember(int numOfMember)
          Sets the numOfMember attribute value.
 void setWorkingEntry(LaborOriginEntry workingEntry)
          Sets the workingEntry attribute value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LaborLedgerUnitOfWork

public LaborLedgerUnitOfWork()
Constructs a LaborLedgerUnitOfWork.java.


LaborLedgerUnitOfWork

public LaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry)
Constructs a LaborLedgerUnitOfWork.java.

Parameters:
laborOriginEntry - the given origin entry
Method Detail

resetLaborLedgerUnitOfWork

public void resetLaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry)
Intialize the default key fields of the labor ledger unit of work with the given origin entry

Parameters:
laborOriginEntry - the given origin entry

resetLaborLedgerUnitOfWork

public void resetLaborLedgerUnitOfWork(LaborOriginEntry laborOriginEntry,
                                       List<String> keyFields)
Intialize the specified key fields of the labor ledger unit of work with the given origin entry

Parameters:
laborOriginEntry - the given origin entry
keyFields - the keys to which values will be assigned

addEntryIntoUnit

public boolean addEntryIntoUnit(LaborOriginEntry laborOriginEntry)
add the given origin entry as a member of the working unit

Parameters:
laborOriginEntry - the given origin entry
Returns:
true if the given origin entry is successfully added into the current unit of work; otherwise, false

canContain

public boolean canContain(LaborOriginEntry laborOriginEntry)
Determine if the given origin entry belongs to the current unit of work

Parameters:
laborOriginEntry - the given origin entry
Returns:
true if the given origin entry belongs to the current unit of work; otherwise, false

hasSameKey

public boolean hasSameKey(LaborOriginEntry laborOriginEntry)
Determine if the given origin entry has the same key as the current unit of work

Parameters:
laborOriginEntry - the given origin entry
Returns:
true if the given origin entry has the same key as the current unit of work; otherwise, false

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getWorkingEntry

public LaborOriginEntry getWorkingEntry()
Gets the workingEntry attribute.

Returns:
Returns the workingEntry.

setWorkingEntry

public void setWorkingEntry(LaborOriginEntry workingEntry)
Sets the workingEntry attribute value.

Parameters:
workingEntry - The workingEntry to set.

getKeyFields

public List<String> getKeyFields()
Gets the keyFields attribute.

Returns:
Returns the keyFields.

setKeyFields

public void setKeyFields(List<String> keyFields)
Sets the keyFields attribute value.

Parameters:
keyFields - The keyFields to set.

getNumOfMember

public int getNumOfMember()
Gets the numOfMember attribute.

Returns:
Returns the numOfMember.

setNumOfMember

public void setNumOfMember(int numOfMember)
Sets the numOfMember attribute value.

Parameters:
numOfMember - The numOfMember to set.

getDefaultKeyFields

protected List<String> getDefaultKeyFields()
Get the default key fields as a list



Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.