All Packages Class Hierarchy This Package Previous Next Index
Class shimmer.Record
java.lang.Object
|
+----shimmer.Record
- public class Record
- extends Object
- implements Serializable
Class Record,a collection of RecordEntry, is a Record database
of an assignment that stores submission record of each user
using loginname as a key. Only latest submission will
be maintained in the Record database. Record usually saved
in .record file.
- Version:
- 1.1 -- 9 Dec 1998
- Author:
- Kulawat Wongsaroj
-
recordTable
- Hashtable that stores RecordEntry using loginname as a key
-
serialVersionUID
- To maintain class versioning
-
Record()
- Constructor of Record
-
addEntry(String, String, RecordEntry)
- Add a RecordEntry object in the Record database with loginname as a key
-
getEntry(String)
- Get RecordEntry of a user
-
getResubmissionQuota(String)
- Get resubmission quota of a user.
-
getTable()
- Get Record database
-
load(String)
- Load Record database file and return Record object
-
put(String, RecordEntry)
- Put a RecordEntry object in the Record database with loginname as a key
-
save(String)
- Save the Record database to specific filename (.record).
serialVersionUID
static final long serialVersionUID
- To maintain class versioning
recordTable
private Hashtable recordTable
- Hashtable that stores RecordEntry using loginname as a key
Record
public Record()
- Constructor of Record
put
private void put(String loginname,
RecordEntry entry)
- Put a RecordEntry object in the Record database with loginname as a key
- Parameters:
- loginname - loginname, key of RecordEntry
- entry - RecordEntry of this user
addEntry
public static void addEntry(String recordFilename,
String loginname,
RecordEntry entry)
- Add a RecordEntry object in the Record database with loginname as a key
- Parameters:
- recordFilename - Record database file
- loginname - loginname of user, key of RecordEntry
- entry - RecordEntry of this user
getEntry
public RecordEntry getEntry(String loginname)
- Get RecordEntry of a user
- Parameters:
- loginname - loginname of user
- Returns:
- RecordEntry of this user
getResubmissionQuota
public int getResubmissionQuota(String loginname)
- Get resubmission quota of a user. base on assumption that
all loginame that entered is valid, if loginname is not found
in the Record database, this user maybe just added to loginname list (passwd.dat)
and has no record in the Record database yet. Therefore, return a special value
for this case which is -2.
- Parameters:
- loginname - loginname of user
- Returns:
- resubmission quota (-2 if no entry found)
getTable
public Hashtable getTable()
- Get Record database
- Returns:
- Hashtable of Record database
save
private void save(String filename)
- Save the Record database to specific filename (.record).
- Parameters:
- filename - .record filename
load
public static Record load(String filename)
- Load Record database file and return Record object
- Parameters:
- filename - Record database filename
- Returns:
- Record object
All Packages Class Hierarchy This Package Previous Next Index