|
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.PunchData
public class PunchData
encapsulates the check-in or a check-out data for an employee's time-punch. Note that for compatibility reasons with several databases, the milliseconds are not stored, i.e. the time is floored to the second. In consequense, the following assertion may fail:
java.util.Date time = new Date(); PunchData pd = new PunchData(user, time, true, "location"); assert time.equals(pd.getTime()) : "the time was rounded"
PunchDB,
PunchDataAnalyzer,
Serialized Form| Constructor Summary | |
|---|---|
PunchData(User user,
Date time,
boolean checkIn,
String location)
|
|
PunchData(User user,
Date time,
boolean checkIn,
String location,
String activity,
String comment)
the activity is ignored on checkout |
|
| Method Summary | |
|---|---|
int |
compareTo(PunchData pd)
compares first the user and then the time |
boolean |
equals(Object obj)
|
String |
getActivity()
The activity is only relevant for a check-in; for a check-out, null is always returned |
String |
getComment()
|
String |
getLocation()
|
Date |
getTime()
|
User |
getUser()
|
int |
hashCode()
|
boolean |
isCheckIn()
|
boolean |
isCheckOut()
|
void |
setComment(String comment)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PunchData(User user,
Date time,
boolean checkIn,
String location)
throws IllegalArgumentException
IllegalArgumentException
public PunchData(User user,
Date time,
boolean checkIn,
String location,
String activity,
String comment)
throws IllegalArgumentException
IllegalArgumentException| Method Detail |
|---|
public Date getTime()
public User getUser()
public String getLocation()
public String getActivity()
public boolean isCheckIn()
public boolean isCheckOut()
public String getComment()
public void setComment(String comment)
public int compareTo(PunchData pd)
compareTo in interface Comparable<PunchData>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||