*/
public class Identities extends AbsData {
public final static Data NO_DATA = new Data();
-
- public Identities(File users) {
+
+ public Identities(File users) throws IOException {
super(users,'|',512,0);
}
public final String email;
public final String status;
public final String responsibleTo;
-
+
private Data(Field f) {
f.reset();
id=f.next();
status=f.next();
responsibleTo =f.next();
}
-
+
private Data() {
id = name = fname = lname =
- phone = email = status = responsibleTo
+ phone = email = status = responsibleTo
= "";
}
status + '|' +
responsibleTo;
}
-
+
// Here, make up your own Methods which help you easily determine your Organization's structure
// in your Organization Object
- public boolean hasStatus(String possible) {
- return possible.contains(status);
- }
+ public boolean hasStatus(String possible) {
+ return possible.contains(status);
+ }
+
+ public boolean isEmployee() {
+ return "e".equals(status);
+ }
- public boolean isEmployee() {
- return "e".equals(status);
- }
-
- public boolean isContractor() {
- return "c".equals(status);
- }
-
- public boolean isApplication() {
- return "a".equals(status);
- }
+ public boolean isContractor() {
+ return "c".equals(status);
+ }
+
+ public boolean isApplication() {
+ return "a".equals(status);
+ }
}
-
- public Data find(Object key,Reuse r) throws IOException {
- r.reset();
- // These are new, to allow for Thread Safety
- int rec = ti.find(key,r,0);
- if(rec<0) {
- return null;
- }
- r.pos(rec);
+
+ public Data find(Object key,Reuse r) throws IOException {
+ r.reset();
+ // These are new, to allow for Thread Safety
+ int rec = ti.find(key,r,0);
+ if(rec<0) {
+ return null;
+ }
+ r.pos(rec);
return new Data(r.getFieldData());
- }
+ }
}