}
private Statement createStartSummarizeFor(
SimpleName parameterName,
ModelProperty property) {
Source source = property.getFrom();
Expression to = f.newFieldAccessExpression(
f.newThis(),
common.getFieldNameOf(property.getName(), property.getType()));
switch (source.getAggregator()) {
case IDENT:
case MAX:
case MIN:
case SUM:
return new ExpressionBuilder(f, to)
.method(Constants.NAME_OPTION_MODIFIER,
new ExpressionBuilder(f, parameterName)
.method(common.getGetterNameOf(source.getName(), source.getType()))
.toExpression())
.toStatement();
case COUNT:
return new ExpressionBuilder(f, to)
.method(Constants.NAME_OPTION_MODIFIER, Models.toLiteral(f, 1))