expression.appendPart( new ExpressionField( expressionPart,
factType,
DataType.TYPE_THIS ) );
} else if ( isBoundParam ) {
ModelField currentFact = findFact( dmo.getProjectModelFields(),
factType );
expression.appendPart( new ExpressionVariable( expressionPart,
currentFact.getClassName(),
currentFact.getType() ) );
isBoundParam = false;
} else {
//An ExpressionPart can be a Field or a Method
String currentClassName = null;
ModelField currentField = findField( typeFields,
expressionPart );
if ( currentField != null ) {
currentClassName = currentField.getClassName();
}
MethodInfo currentMethodInfo = findMethodInfo( methodInfos,
expressionPart );
if ( currentMethodInfo != null ) {
currentClassName = currentMethodInfo.getReturnClassType();
}
processExpressionPart( m,
factType,
currentField,
currentMethodInfo,
expression,
expressionPart );
//Refresh field and method information based on current expression part
typeFields = findFields( m,
dmo,
currentClassName );
methodInfos = getMethodInfosForType( m,
dmo,
currentClassName );
}
}
//Handle last expression part
String expressionPart = splits[ splits.length - 1 ];
ModelField currentField = findField( typeFields,
expressionPart );
MethodInfo currentMethodInfo = findMethodInfo( methodInfos,
expressionPart );
processExpressionPart( m,