Package org.evolizer.metrics.famix.model

Examples of org.evolizer.metrics.famix.model.FamixMeasurement


       
        String query = "from FamixMeasurement as fm " +
            "where fm.identifier='" + this.getIdentifier() + "' " +
            "and fm.entity.id = '" + fCurrentEntity.getId() + "'";
        // look in DB if there is already a value stored for that calculation
        FamixMeasurement measurement = session.uniqueResult(query, FamixMeasurement.class);
        if (measurement == null) {
            // no value in DB stored, so calculate the value and store it in DB
            measurement = new FamixMeasurement(fCurrentEntity, this.getIdentifier());
            measurement.setValue(calculate());
            fCurrentSession.startTransaction();
            fCurrentSession.saveObject(measurement);
            fCurrentSession.endTransaction();
        }
       
        return measurement.getValue();
    }
View Full Code Here


      AbstractFamixEntity fEntity = (AbstractFamixEntity) entity;
    String query = "from FamixMeasurement as fm where fm.identifier='McCabe' and fm.entity.id = '"
        + fEntity.getId() + "'";
    measurement = session.uniqueResult(query, FamixMeasurement.class);
    if (measurement == null) {
      FamixMeasurement fMeasurement = new FamixMeasurement(fEntity, "McCabe");
      fMeasurement.setValue(calculateValue(fEntity));
      measurement = fMeasurement;
      session.startTransaction();
      session.saveObject(fMeasurement);
      session.endTransaction();
    }
View Full Code Here

TOP

Related Classes of org.evolizer.metrics.famix.model.FamixMeasurement

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.