コード例 #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;
 }
コード例 #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;
 }
コード例 #3
0
 public void removeCompensationDetail(CompensationDetail arg) {
   arg.setCompensationRule(null);
   compensationDetails.remove(arg);
 }
コード例 #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);
 }
コード例 #5
0
 public void addCompensationDetail(CompensationDetail arg) {
   arg.setCompensationRule(this);
   compensationDetails.add(arg);
 }