//Simple (mandatory) columns
dtable.setRowNumberCol( new RowNumberCol52() );
dtable.setDescriptionCol( new DescriptionCol52() );
//BRL Column
BRLConditionColumn brl1 = new BRLConditionColumn();
//BRL Column definition
List<IPattern> brl1Definition = new ArrayList<IPattern>();
FactPattern brl1DefinitionFactPattern1 = new FactPattern( "Baddie" );
SingleFieldConstraint brl1DefinitionFactPattern1Constraint1 = new SingleFieldConstraint();
brl1DefinitionFactPattern1Constraint1.setFieldType( DataType.TYPE_STRING );
brl1DefinitionFactPattern1Constraint1.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
brl1DefinitionFactPattern1Constraint1.setFieldName( "name" );
brl1DefinitionFactPattern1Constraint1.setOperator( "==" );
brl1DefinitionFactPattern1Constraint1.setValue( "Gargamel" );
brl1DefinitionFactPattern1.addConstraint( brl1DefinitionFactPattern1Constraint1 );
brl1Definition.add( brl1DefinitionFactPattern1 );
FactPattern brl1DefinitionFactPattern2 = new FactPattern( "Smurf" );
SingleFieldConstraint brl1DefinitionFactPattern2Constraint1 = new SingleFieldConstraint();
brl1DefinitionFactPattern2Constraint1.setFieldType( DataType.TYPE_STRING );
brl1DefinitionFactPattern2Constraint1.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
brl1DefinitionFactPattern2Constraint1.setFieldName( "name" );
brl1DefinitionFactPattern2Constraint1.setOperator( "==" );
brl1DefinitionFactPattern2Constraint1.setValue( "$name" );
brl1DefinitionFactPattern2.addConstraint( brl1DefinitionFactPattern2Constraint1 );
SingleFieldConstraint brl1DefinitionFactPattern2Constraint2 = new SingleFieldConstraint();
brl1DefinitionFactPattern2Constraint2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
brl1DefinitionFactPattern2Constraint2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
brl1DefinitionFactPattern2Constraint2.setFieldName( "age" );
brl1DefinitionFactPattern2Constraint2.setOperator( "==" );
brl1DefinitionFactPattern2Constraint2.setValue( "$age" );
brl1DefinitionFactPattern2.addConstraint( brl1DefinitionFactPattern2Constraint2 );
brl1Definition.add( brl1DefinitionFactPattern2 );
brl1.setDefinition( brl1Definition );
//Setup BRL column bindings
BRLConditionVariableColumn brl1Variable1 = new BRLConditionVariableColumn( "$name",
DataType.TYPE_STRING,
"Person",
"name" );
brl1.getChildColumns().add( brl1Variable1 );
BRLConditionVariableColumn brl1Variable2 = new BRLConditionVariableColumn( "$age",
DataType.TYPE_NUMERIC_INTEGER,
"Person",
"age" );
brl1.getChildColumns().add( brl1Variable2 );
dtable.getConditions().add( brl1 );
dtable.setData( DataUtilities.makeDataLists( data ) );
//Now to test conversion