Ejemplo n.º 1
0
 public float getHourlyRate(DateTime effectiveDate) {
   CompensationDetail cd = getCompensationDetail(effectiveDate);
   LaborCostMultiplier lcm = getMultiplier(effectiveDate);
   float rawCostRate = (cd == null) ? 0 : cd.getHourlyCostRate();
   float multiplier = (lcm == null) ? 1 : lcm.getMultiplier();
   return rawCostRate * multiplier;
 }
Ejemplo n.º 2
0
 CompensationDetail getCompensationDetail(DateTime effectiveDate) {
   Iterator<CompensationDetail> iter = compensationDetails.iterator();
   while (iter.hasNext()) {
     CompensationDetail each = iter.next();
     if (each.isEffective(effectiveDate)) {
       return each;
     }
   }
   return null;
 }
Ejemplo n.º 3
0
 public void removeCompensationDetail(CompensationDetail arg) {
   arg.setCompensationRule(null);
   compensationDetails.remove(arg);
 }
Ejemplo n.º 4
0
 @Override
 public int compare(CompensationDetail o1, CompensationDetail o2) {
   DateTime d1 = o1.getStartDate();
   DateTime d2 = o2.getStartDate();
   return d1.isBefore(d2) ? -1 : (d1.isEqual(d2) ? 0 : 1);
 }
Ejemplo n.º 5
0
 public void addCompensationDetail(CompensationDetail arg) {
   arg.setCompensationRule(this);
   compensationDetails.add(arg);
 }