class KiePMMLRegressionModelFactory {

    static void setConstructor(final String generatedClassName,
                               final String nestedTable,
                               final ConstructorDeclaration constructorDeclaration,
                               final String targetField,
                               final MINING_FUNCTION miningFunction,
                               final String modelName) {
        ObjectCreationExpr objectCreationExpr = new ObjectCreationExpr();
        objectCreationExpr.setType(nestedTable);
        setConstructorSuperNameInvocation(generatedClassName, constructorDeclaration, modelName);
        final BlockStmt body = constructorDeclaration.getBody();
        CommonCodegenUtils.setAssignExpressionValue(body, "regressionTable", objectCreationExpr);
        CommonCodegenUtils.setAssignExpressionValue(body, "targetField", new StringLiteralExpr(targetField));
        CommonCodegenUtils.setAssignExpressionValue(body, "miningFunction", new NameExpr(miningFunction.getClass().getName() + "." + miningFunction.name()));
        CommonCodegenUtils.setAssignExpressionValue(body, "pmmlMODEL", new NameExpr(PMML_MODEL.REGRESSION_MODEL.getClass().getName() + "." + PMML_MODEL.REGRESSION_MODEL.name()));
    }

    private  KiePMMLRegressionModelFactory();

}