Package ch.tatool.core.data

Examples of ch.tatool.core.data.IntegerProperty


        max += Points.getMaxPointsProperty().getValue(trial, this, ZERO_POINTS);
      }
     
      // update the session data with the current execution totals
      ModuleSession session = context.getExecutionData().getModuleSession();
      IntegerProperty totalMinPointsProperty = Points.getTotalMinPointsProperty();
      IntegerProperty totalPointsProperty = Points.getTotalPointsProperty();
      IntegerProperty totalMaxPointsProperty = Points.getTotalMaxPointsProperty();
     
      // fetch the session total - we are sure it is initialized as we used ensureValue in session start
      int minSession = totalMinPointsProperty.getValue(session, this);
    int currSession = totalPointsProperty.getValue(session, this);
    int maxSession = totalMaxPointsProperty.getValue(session, this);
      minSession += min;
      currSession += curr;
      maxSession += max;
      totalMinPointsProperty.setValue(session, this, minSession);
      totalPointsProperty.setValue(session, this, currSession);
      totalMaxPointsProperty.setValue(session, this, maxSession);
    }
View Full Code Here


        }
    }

    private void sessionFinish(ExecutionContext context) {
      // shortcut to property objects
      IntegerProperty totalMinPointsProperty = Points.getTotalMinPointsProperty();
      IntegerProperty totalPointsProperty = Points.getTotalPointsProperty();
      IntegerProperty totalMaxPointsProperty = Points.getTotalMaxPointsProperty();
     
      // Set the current level onto the session
      ModuleSession session = context.getExecutionData().getModuleSession();
      Level.getLevelProperty().setValue(session, this);
     
      // roll up the  the total points to zero
      Module module = context.getExecutionData().getModule();
     
      // load current module totals
      int minModule = totalMinPointsProperty.getValue(module, this, ZERO_POINTS);
    int currModule = totalPointsProperty.getValue(module, this, ZERO_POINTS);
    int maxModule = totalMaxPointsProperty.getValue(module, this, ZERO_POINTS);
     
      // add values from current session
      minModule += totalMinPointsProperty.getValue(session, this);
      currModule += totalPointsProperty.getValue(session, this);
    maxModule += totalMaxPointsProperty.getValue(session, this);
   
    // store it back into the module
    totalMinPointsProperty.setValue(module, this, minModule);
      totalPointsProperty.setValue(module, this, currModule);
      totalMaxPointsProperty.setValue(module, this, maxModule);
    }
View Full Code Here

TOP

Related Classes of ch.tatool.core.data.IntegerProperty

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.