|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.timeregister.WorkUnitAnalyzer
public class WorkUnitAnalyzer
maintains and analyzes set of WorkUnit objects.
| Constructor Summary | |
|---|---|
WorkUnitAnalyzer()
|
|
WorkUnitAnalyzer(Collection<WorkUnit> col)
|
|
| Method Summary | ||
|---|---|---|
boolean |
add(WorkUnit unit)
|
|
void |
filter(Filter<WorkUnit> filter)
|
|
Set<String> |
getActivities()
returns a set of activity Strings that are contained in this analyzer (null not included) |
|
DefaultTableModel |
getActivityTableModel()
the returned table model contains two columns, the first (a String) denotes the activity and the second (a Long) denotes the time |
|
HashMap<String,Long> |
getActivityTimes()
all units mapped to no activity are mapped through the key null in the map. |
|
long |
getBreakTime()
|
|
Set<WorkUnit> |
getCorrespondingToPunchData(PunchDB db,
boolean returnThoseThatCorrespond)
returns those WorkUnits that do or do not directly correspond to a punch pair in the given database. |
|
Date |
getFirstDate()
|
|
Date |
getLastDate()
|
|
long |
getNetTime()
|
|
long |
getNetTime(WorkUnit.Type type)
|
|
|
getNetTimes(PatternExtractor<WorkUnit,T> pattern)
|
|
Set<WorkUnit> |
getOverlappingUnits()
returns a set of WorkUnit objects that cause conflicts in this analyzer |
|
long |
getSickTime()
time including pauses |
|
long |
getSpecialAssignmentTime()
time including pauses |
|
long |
getTime()
time including pauses |
|
long |
getTime(WorkUnit.Type type)
time including pauses |
|
|
getTimes(PatternExtractor<WorkUnit,T> pattern)
|
|
Set<User> |
getUsers()
returns a set of all users currently in this analyzer |
|
long |
getVacationTime()
time including pauses |
|
long |
getWorkingTime()
time including pauses |
|
List<WorkUnit> |
getWorkUnits(TimeUser user,
Date beginFrom,
Date beginUntil,
String location)
selects both dates inclusive |
|
List<WorkUnit> |
getWorkUnitsFor(User user,
Date date)
returns those WorkUnits that enclose the given date; user constrain may be null |
|
static Filter<WorkUnit> |
makeFilter(User user,
Date beginFrom,
Date beginUntil,
String activity,
String comment)
selects both dates inclusive |
|
WorkUnit |
overlappingUnit(WorkUnit unit)
checks whether a unit exists that overlaps with the given one and returns it. |
|
void |
refresh(Collection<WorkUnit> col,
Filter<WorkUnit> filter)
updates this analyzer with the given data; the filter may be null; duplicates are left out |
|
int |
size()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkUnitAnalyzer()
public WorkUnitAnalyzer(Collection<WorkUnit> col)
| Method Detail |
|---|
public void refresh(Collection<WorkUnit> col,
Filter<WorkUnit> filter)
public int size()
public boolean add(WorkUnit unit)
public List<WorkUnit> getWorkUnitsFor(User user,
Date date)
public Set<User> getUsers()
public Set<WorkUnit> getOverlappingUnits()
public WorkUnit overlappingUnit(WorkUnit unit)
public void filter(Filter<WorkUnit> filter)
public long getBreakTime()
public long getNetTime(WorkUnit.Type type)
public long getNetTime()
public long getWorkingTime()
public long getSickTime()
public long getSpecialAssignmentTime()
public long getVacationTime()
public long getTime(WorkUnit.Type type)
public long getTime()
public Set<String> getActivities()
public HashMap<String,Long> getActivityTimes()
public Date getFirstDate()
public Date getLastDate()
public DefaultTableModel getActivityTableModel()
public Set<WorkUnit> getCorrespondingToPunchData(PunchDB db,
boolean returnThoseThatCorrespond)
throws DatabaseException
DatabaseExceptionpublic <T> HashMap<T,Long> getTimes(PatternExtractor<WorkUnit,T> pattern)
public <T> HashMap<T,Long> getNetTimes(PatternExtractor<WorkUnit,T> pattern)
public List<WorkUnit> getWorkUnits(TimeUser user,
Date beginFrom,
Date beginUntil,
String location)
public static Filter<WorkUnit> makeFilter(User user,
Date beginFrom,
Date beginUntil,
String activity,
String comment)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||