private final Set<Group> groups = new HashSet<>();
+ public static final int MINIMUM_AGE = 16;
+
+ public static final int POJAM_AGE = 14;
+
+ public static final int ADULT_AGE = 18;
+
+ public static final boolean POJAM_ENABLED = false;
+
protected User(GigiResultSet rs) {
super(rs.getInt("id"));
updateName(rs);
}
public boolean canAssure() {
- if ( !CalendarUtil.isOfAge(dob, 14)) { // PoJAM
- return false;
+ if (POJAM_ENABLED) {
+ if ( !CalendarUtil.isOfAge(dob, POJAM_AGE)) { // PoJAM
+ return false;
+ }
+ } else {
+ if ( !CalendarUtil.isOfAge(dob, ADULT_AGE)) {
+ return false;
+ }
}
if (getAssurancePoints() < 100) {
return false;
* @return the maximal points @
*/
public int getMaxAssurePoints() {
- if ( !CalendarUtil.isOfAge(dob, 18)) {
+ if ( !CalendarUtil.isOfAge(dob, ADULT_AGE) && POJAM_ENABLED) {
return 10; // PoJAM
}