return lb;
}
private void onCollectionChange( String value ) {
if ( "size".contains( value ) ) {
expression.appendPart( new ExpressionMethod( "size",
"int",
DataType.TYPE_NUMERIC_INTEGER ) );
} else if ( "isEmpty".equals( value ) ) {
expression.appendPart( new ExpressionMethod( "isEmpty",
"boolean",
DataType.TYPE_BOOLEAN ) );
} else {
ExpressionCollectionIndex collectionIndex;
String factName = getDataModelOracle().getFactNameFromType( getCurrentParametricType() );
if ( getCurrentParametricType() != null && factName != null ) {
collectionIndex = new ExpressionCollectionIndex( "get",
getCurrentParametricType(),
factName );
} else {
collectionIndex = new ExpressionCollectionIndex( "get",
"java.lang.Object",
DataType.TYPE_OBJECT );
}
if ( "first".equals( value ) ) {
collectionIndex.putParam( "index",
new ExpressionFormLine( new ExpressionText( "0" ) ) );
expression.appendPart( collectionIndex );
} else if ( "last".equals( value ) ) {
ExpressionFormLine index = new ExpressionFormLine( expression );
index.appendPart( new ExpressionMethod( "size",
"int",
DataType.TYPE_NUMERIC_INTEGER ) );
index.appendPart( new ExpressionText( "-1" ) );
collectionIndex.putParam( "index",