|
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.AbstractPunchDB
com.antelmann.timeregister.FilePunchDB
public class FilePunchDB
The implementation is backed by a binary file but works largely in-memory.
| Field Summary |
|---|
| Fields inherited from class com.antelmann.timeregister.AbstractPunchDB |
|---|
listeners |
| Constructor Summary | |
|---|---|
FilePunchDB(File dataFile)
|
|
| Method Summary | |
|---|---|
void |
close()
empty implementation |
void |
delete(PunchData entry)
optional operation; may throw UnsupportedOperationException. |
PunchData |
getFirstPunch(User user)
if user is null, the first punch of all is returned. |
PunchData |
getLastPunch(User user)
if user is null, the last punch of all is returned. |
PunchDataAnalyzer |
getPunchData(User user,
Date after,
Date before,
String location,
String activity)
retrieves the relevant set of Punchdata objects |
Map<Object,TimeUser> |
getUsers()
returns an unmodifiable view of the users, mapping the id to a TimeUser |
boolean |
insertUser(User user)
|
void |
refresh()
|
void |
store(PunchData entry)
used by the final punch(PunchData) method to delegate the database storing. |
void |
updatePassword(User user)
updates the permanent storage with the password that is now present in the user |
| Methods inherited from class com.antelmann.timeregister.AbstractPunchDB |
|---|
addPunchListener, getPunchListeners, punch, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilePunchDB(File dataFile)
throws IOException,
FormatException
IOException
FormatException| Method Detail |
|---|
public void close()
public void refresh()
throws IOException,
FormatException
IOException
FormatException
public boolean insertUser(User user)
throws IOException
IOException
public void updatePassword(User user)
throws DatabaseException
PunchDB
DatabaseExceptionUserImpl.setPassword(char[]),
UserImpl.getPasswordHash()
public void store(PunchData entry)
throws DatabaseException
AbstractPunchDBpunch(PunchData) method to delegate the database storing.
(Note that a PunchAdminDB makes this method public)
store in class AbstractPunchDBDatabaseExceptionPunchDB.punch(PunchData)
public void delete(PunchData entry)
throws DatabaseException,
UnsupportedOperationException
DatabaseException
UnsupportedOperationException
public PunchDataAnalyzer getPunchData(User user,
Date after,
Date before,
String location,
String activity)
throws DatabaseException
after - limits retrieval by begin date; if null, this limit does not applybefore - limits retrieval by end date; if null, this limit does not applyuser - limits retrieval by employee; if null, this limit does not apply
DatabaseExceptionPunchDatapublic PunchData getFirstPunch(User user)
PunchDB
public PunchData getLastPunch(User user)
PunchDB
public Map<Object,TimeUser> getUsers()
PunchDB
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||