//Simple (mandatory) columns
dtable.setRowNumberCol( new RowNumberCol52() );
dtable.setDescriptionCol( new DescriptionCol52() );
//BRL Column
BRLActionColumn brl1 = new BRLActionColumn();
//BRL Column definition
List<IAction> brl1Definition = new ArrayList<IAction>();
ActionInsertFact brl1DefinitionAction1 = new ActionInsertFact( "Baddie" );
ActionFieldValue brl1DefinitionAction1FieldValue1 = new ActionFieldValue( "name",
"Gargamel",
SuggestionCompletionEngine.TYPE_STRING );
brl1DefinitionAction1FieldValue1.setNature( BaseSingleFieldConstraint.TYPE_LITERAL );
brl1DefinitionAction1.addFieldValue( brl1DefinitionAction1FieldValue1 );
brl1Definition.add( brl1DefinitionAction1 );
ActionInsertFact brl1DefinitionAction2 = new ActionInsertFact( "Smurf" );
ActionFieldValue brl1DefinitionAction2FieldValue1 = new ActionFieldValue( "name",
"$name",
SuggestionCompletionEngine.TYPE_STRING );
brl1DefinitionAction2FieldValue1.setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );
brl1DefinitionAction2.addFieldValue( brl1DefinitionAction2FieldValue1 );
ActionFieldValue brl1DefinitionAction2FieldValue2 = new ActionFieldValue( "age",
"$age",
SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER );
brl1DefinitionAction2FieldValue2.setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );
brl1DefinitionAction2.addFieldValue( brl1DefinitionAction2FieldValue2 );
brl1Definition.add( brl1DefinitionAction2 );
brl1.setDefinition( brl1Definition );
//Setup BRL column bindings
BRLActionVariableColumn brl1Variable1 = new BRLActionVariableColumn( "$name",
SuggestionCompletionEngine.TYPE_STRING,
"Person",
"name" );
brl1.getChildColumns().add( brl1Variable1 );
BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age",
SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER,
"Person",
"age" );
brl1.getChildColumns().add( brl1Variable2 );
dtable.getActionCols().add( brl1 );
dtable.setData( upgrader.makeDataLists( data ) );
//Now to test conversion