private FieldConstraint asExpressionBuilderConstraint( FactPattern factPattern,
String fieldName,
String operator,
String value ) {
SingleFieldConstraintEBLeftSide con = new SingleFieldConstraintEBLeftSide();
fieldName = setFieldBindingOnContraint( fieldName, con );
con.getExpressionLeftSide().appendPart( new ExpressionUnboundFact( factPattern ) );
String type = setOperatorAndValueOnConstraint( operator, value, con );
String[] splits = fieldName.split( "\\." );
for ( int i = 0; i < splits.length - 1; i++ ) {
con.getExpressionLeftSide().appendPart( new ExpressionField( splits[ i ].trim(), "", DataType.TYPE_OBJECT ) );
}
con.getExpressionLeftSide().appendPart( new ExpressionField( splits[ splits.length - 1 ].trim(), "", type ) );
return con;
}