Examples of AssignmentFieldFunctor


Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

        CostFunctor costF = CostFunctor.getInstance(this, getEffectiveWorkCalendar(), workContour, detail.calcOvertimeUnits(), costRate, getStart(),prorated);
        clause.select(costF);
        return costF;
      } else { // accrue start or end
        long triggerDate = (detail.getResource().getAccrueAt() == Accrual.START) ? getStart() : getFinish();// use start or end
        AssignmentFieldFunctor constantCost = ValueAtInstant.getInstance(triggerDate, calcAll(COST));
        clause.select(constantCost).from(InstantIntervalGenerator.getInstance(triggerDate)); // just one instant
        return constantCost;
      }
    }
  }
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

    } else if (type == ACWP) {
      clause.whereInRange(detail.effectiveBaselineStart(),getCompletedOrStatusDate());
      return cost(clause,all);
    } else if (type == BCWP) {
      clause.whereInRange(detail.getStart(),getStatusDate());
      AssignmentFieldFunctor costF = cost(clause,all);
      costF.setMultiplier(efficiency());
      return costF;
    } else if (type == BCWS) {
      clause.whereInRange(detail.effectiveBaselineStart(),getStatusDate());
      return baselineData(COST,clause);
    else if (type instanceof Field) { // treat all baselines
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

  }


  public void calcDataBetween(Object type, long start, long end) {
    SelectFrom clause = SelectFrom.getInstance().whereInRange(start,end); // automatically also adds a generator to limit range
    AssignmentFieldFunctor dataFunctor = getDataSelect(type,clause,false);

    RangeIntervalGenerator dailyInRange = RangeIntervalGenerator.getInstance(start, end, 1000*60*60*24);
    PrintValueFunctor print = PrintValueFunctor.getInstance(dataFunctor);
    Query.getInstance().selectFrom(clause)
    .groupBy(dailyInRange)
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

   * Calculate the total cost
   * @return
   */
  public double calcAll(Object type) {
    SelectFrom clause = SelectFrom.getInstance();
    AssignmentFieldFunctor dataFunctor = getDataSelect(type,clause,true);
    Query.getInstance().selectFrom(clause)
    .execute();
    return dataFunctor.getValue();
  }
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

   * @param value
   * @return
   */
  public long getDateAtValue(Object type, double value) {
    SelectFrom clause = SelectFrom.getInstance();
    AssignmentFieldFunctor dataFunctor = (type==COST) ? cost(clause, true) : work(clause);

    DateAtValueFunctor dateAtValue = DateAtValueFunctor.getInstance(value, AssignmentFieldClosureCollection.getInstance(dataFunctor));
    clause.select(dateAtValue); // override existing select

    Query.getInstance().selectFrom(clause)
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

  }


  private AssignmentFieldFunctor baselineData(Object type, SelectFrom baselineSelectFrom) {
    Assignment baselineAssignment = detail.getBaselineAssignment();
    AssignmentFieldFunctor baselineFunctor;
    if (baselineAssignment == null) {
      baselineFunctor = ZeroFunctor.getInstance();
      baselineSelectFrom.select(baselineFunctor).from(RangeIntervalGenerator.empty());
    } else {
      baselineFunctor = baselineAssignment.getDataSelect(type,baselineSelectFrom, false);
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

    return detail.getBaselineAssignment(baseline, createIfDoesntExist);
  }

  private AssignmentFieldFunctor baselineData(Object type, SelectFrom baselineSelectFrom, Object baseline) {
    Assignment baselineAssignment = detail.getBaselineAssignment(baseline, false);
    AssignmentFieldFunctor baselineFunctor;
    if (baselineAssignment == null) {
      baselineFunctor = ZeroFunctor.getInstance();
      baselineSelectFrom.select(baselineFunctor).from(RangeIntervalGenerator.empty());
    } else {
      baselineFunctor = baselineAssignment.getDataSelect(type,baselineSelectFrom, false);
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

    return query;
  }

  public void calcDataBetween(Object type, HasStartAndEnd generator, CalculatedValues values) {
    SelectFrom clause = SelectFrom.getInstance();
    AssignmentFieldFunctor dataFunctor = getDataSelect(type,clause,false);
    calcDataBetween(dataFunctor,clause,generator,values);
  }
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

    calcDataBetween(dataFunctor,clause,generator,values);
  }

  public static void calcResourceAvailabilityBetween(Resource resource, HasStartAndEnd generator, CalculatedValues values) {
    SelectFrom clause = SelectFrom.getInstance();
    AssignmentFieldFunctor dataFunctor = resourceAvailability(clause,resource);
    calcDataBetween(dataFunctor,clause,generator,values);
  }
View Full Code Here

Examples of com.projity.pm.assignment.functor.AssignmentFieldFunctor

    return instance;
  }

  private void doQuery(Assignment assignment, ObjectFactory factory, TimephasedConsumer consumer,Object fieldType, int type, long id) {
    SelectFrom clause = SelectFrom.getInstance();
    AssignmentFieldFunctor dataFunctor = assignment.getDataSelect(fieldType,clause,false);
    TimephasedGetter getter = TimephasedGetter.getInstance(factory,consumer,dataFunctor,type,id);
    long end = assignment.getEnd();
    long start = assignment.getStart();

    if (fieldType == HasTimeDistributedData.ACTUAL_WORK)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.