Package com.projity.pm.assignment.contour

Examples of com.projity.pm.assignment.contour.ContourBucketIntervalGenerator


   * Fills in a SelectFrom clause with "select work from contour"
   * @param clause to fill in
   * @return work field functor
   */
  AssignmentFieldFunctor work(SelectFrom clause) {
    ContourBucketIntervalGenerator contour = contourGeneratorInstance(WORK);
    WorkFunctor workF = WorkFunctor.getInstance(this, contour.getWorkCalendar(), contour, detail.calcOvertimeUnits());
    clause.select(workF).from(contour);
    return workF;
  }
View Full Code Here


//    clause.select(workF);
//    return workF;
//  }

  private AssignmentFieldFunctor percentAlloc(SelectFrom clause, boolean threshold) {
    ContourBucketIntervalGenerator contour = contourGeneratorInstance(WORK);
    PercentAllocFunctor functor = PercentAllocFunctor.getInstance(this, contour.getWorkCalendar(), contour,threshold);
    clause.select(functor).from(contour);
    return functor;
  }
View Full Code Here

    clause.select(functor).from(contour);
    return functor;
  }

  private AssignmentFieldFunctor fixedCost(SelectFrom clause) {
    ContourBucketIntervalGenerator contour = contourGeneratorInstance(COST);
    FixedCostFunctor functor = FixedCostFunctor.getInstance(this);
    clause.select(functor).from(contour);
    return functor;
  }
View Full Code Here

   * @param clause: SelectFrom clause to populate
   * @return The functor to use to calculate cost
   */
  private AssignmentFieldFunctor cost(SelectFrom clause, boolean all) {
    if (detail.getCostContour().isPersonal()) { // in the case where a cost contour has already been saved, use it
      ContourBucketIntervalGenerator costContour = contourGeneratorInstance(COST);
      WorkFunctor workF = WorkFunctor.getInstance(this, getEffectiveWorkCalendar(), costContour, detail.calcOvertimeUnits()); // note that is is a work contour
      clause.select(workF).from(costContour);
      return workF;
    } else {
      boolean prorated = isProratedCost();
      // if prorated, or if calculating a total, then treat as prorated
      if (all || prorated) {
        ContourBucketIntervalGenerator workContour = contourGeneratorInstance(WORK);
        CollectionIntervalGenerator costRate = CollectionIntervalGenerator.getInstance(detail.getResource().getCostRateTable(detail.getCostRateIndex()).getList());
        clause.from(costRate).from(workContour);
        // Note that the getStart() parameter implies cost per use is applied at start
        CostFunctor costF = CostFunctor.getInstance(this, getEffectiveWorkCalendar(), workContour, detail.calcOvertimeUnits(), costRate, getStart(),prorated);
        clause.select(costF);
View Full Code Here

  public void makeContourPersonal() {
//    if (getWorkContour().isPersonal())
//      return;
    Object type = WORK;
    ContourBucketIntervalGenerator contourGenerator = contourGeneratorInstance(type); //contour
    PersonalContourMaker contourBuilder = PersonalContourMaker.getInstance(this, contourGenerator);
    Query.getInstance()
      .selectFrom(SelectFrom.getInstance()
            .select(contourBuilder)
            .from(contourGenerator)
View Full Code Here

TOP

Related Classes of com.projity.pm.assignment.contour.ContourBucketIntervalGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.