/** * Delete the given column * @param modelColumn */ public void deleteColumn( BRLActionColumn modelColumn ) { if ( modelColumn == null ) { throw new IllegalArgumentException( "modelColumn cannot be null." ); } BRLActionVariableColumn firstColumn = modelColumn.getChildColumns().get( 0 ); int firstColumnIndex = model.getExpandedColumns().indexOf( firstColumn ); int numberOfColumns = modelColumn.getChildColumns().size(); deleteColumns( firstColumnIndex, numberOfColumns, true ); model.getActionCols().remove( modelColumn ); //Log deletion of column model.getAuditLog().add( new DeleteColumnAuditLogEntry( identity.getName(), modelColumn ) ); }
/** * Add a column to the table. * @param modelColumn The Decision Table column to insert */ public void addColumn( BRLActionColumn modelColumn ) { if ( modelColumn == null ) { throw new IllegalArgumentException( "modelColumn cannot be null." ); } model.getActionCols().add( modelColumn ); addBRLActionVariableColumns( modelColumn.getChildColumns(), true ); //Log addition of column model.getAuditLog().add( new InsertColumnAuditLogEntry( identity.getName(), modelColumn ) ); }
BRLActionVariableColumn variable = brlColumn.getChildColumns().get( 0 ); sourceColumnIndex = model.getExpandedColumns().indexOf( variable ); numberOfColumns = brlColumn.getChildColumns().size(); } else { sourceColumnIndex = model.getExpandedColumns().indexOf( action ); BRLActionVariableColumn variable = brlColumn.getChildColumns().get( brlColumn.getChildColumns().size() - 1 ); targetColumnIndex = model.getExpandedColumns().indexOf( variable ); } else { BRLActionVariableColumn variable = brlColumn.getChildColumns().get( 0 ); sourceColumnIndex = model.getExpandedColumns().indexOf( variable ); numberOfColumns = brlColumn.getChildColumns().size(); } else { sourceColumnIndex = model.getExpandedColumns().indexOf( action ); BRLActionVariableColumn variable = brlColumn.getChildColumns().get( 0 ); targetColumnIndex = model.getExpandedColumns().indexOf( variable ); } else {
for ( BRLActionVariableColumn variable : origColumn.getChildColumns() ) { int iCol = model.getExpandedColumns().indexOf( variable ); List<DTCellValue52> columnData = new ArrayList<DTCellValue52>(); final int index = model.getExpandedColumns().indexOf( editColumn.getChildColumns().get( 0 ) ); final List<BaseColumn> columns = new ArrayList<BaseColumn>(); final List<List<DTCellValue52>> columnsData = new ArrayList<List<DTCellValue52>>(); columns.addAll( editColumn.getChildColumns() ); for ( BaseColumn column : columns ) { final BRLActionVariableColumn variable = (BRLActionVariableColumn) column; BRLActionVariableColumn firstColumn = origColumn.getChildColumns().get( 0 ); int firstColumnIndex = model.getExpandedColumns().indexOf( firstColumn ); int numberOfColumns = origColumn.getChildColumns().size(); deleteColumns( firstColumnIndex, numberOfColumns,
switch ( valueHolder.getType() ) { case TEMPLATE_KEY: final BRLActionVariableColumn vc = getActionVariableColumnIndex( brl.getChildColumns(), valueHolder.getValue() ); final int iCol = model.getExpandedColumns().indexOf( vc );
baseBRLActionColumn.getFactField(), valueHolder.getFieldName() ) ) { final BRLActionVariableColumn vc = getActionVariableColumnIndex( brl.getChildColumns(), valueHolder.getValue() ); final int iCol = model.getExpandedColumns().indexOf( vc );
brl1.getChildColumns().add( brl1Variable1 );
"Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", DataType.TYPE_NUMERIC_INTEGER, "Person", "age" ); brl1.getChildColumns().add( brl1Variable2 );
"Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", DataType.TYPE_NUMERIC_INTEGER, "Person", "age" ); brl1.getChildColumns().add( brl1Variable2 );
for ( BRLActionVariableColumn variable : brl.getChildColumns() ) { DynamicColumn<BaseColumn> column = new DynamicColumn<BaseColumn>( variable, cellFactory.getCell( variable ),
"Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", DataType.TYPE_NUMERIC_INTEGER, "Person", "age" ); brl1.getChildColumns().add( brl1Variable2 );