public ActionSetFieldColumnDetails(final ActionSetFieldCol52 column) { super( column ); this.boundName = column.getBoundName(); this.factField = column.getFactField(); }
public ActionSetFieldColumnDetails(final ActionSetFieldCol52 column) { super( column ); this.boundName = column.getBoundName(); this.factField = column.getFactField(); }
private String getType(Pattern52 pattern, ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
private String getType(Pattern52 pattern, ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = pattern.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
private String getType(ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = getBoundFactType( col.getBoundName() ); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
private String getType(ActionSetFieldCol52 col, SuggestionCompletionEngine sce) { // Columns with "Value Lists" etc are always Text (for now) if ( hasValueList( col ) ) { return SuggestionCompletionEngine.TYPE_STRING; } //Otherwise lookup from SuggestionCompletionEngine final String factType = getBoundFactType( col.getBoundName() ); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
private void doAction(List<LabelledAction> actions, ActionSetFieldCol52 sf, String cell) { LabelledAction a = findByLabelledAction( actions, sf.getBoundName() ); if ( a == null ) { a = new LabelledAction(); a.boundName = sf.getBoundName(); if ( !sf.isUpdate() ) { a.action = new ActionSetField( sf.getBoundName() ); } else { a.action = new ActionUpdateField( sf.getBoundName() ); } actions.add( a ); } else if ( sf.isUpdate() && !(a.action instanceof ActionUpdateField) ) { // lets swap it out for an update as the user has asked for it. ActionSetField old = (ActionSetField) a.action; ActionUpdateField update = new ActionUpdateField( sf.getBoundName() ); update.fieldValues = old.fieldValues; a.action = update; } ActionSetField asf = (ActionSetField) a.action; ActionFieldValue val = new ActionFieldValue( sf.getFactField(), cell, sf.getType() ); asf.addFieldValue( val ); }
private void doAction(List<LabelledAction> actions, ActionSetFieldCol52 sf, String cell) { LabelledAction a = findByLabelledAction( actions, sf.getBoundName() ); if ( a == null ) { a = new LabelledAction(); a.boundName = sf.getBoundName(); if ( !sf.isUpdate() ) { a.action = new ActionSetField( sf.getBoundName() ); } else { a.action = new ActionUpdateField( sf.getBoundName() ); } actions.add( a ); } else if ( sf.isUpdate() && !(a.action instanceof ActionUpdateField) ) { // lets swap it out for an update as the user has asked for it. ActionSetField old = (ActionSetField) a.action; ActionUpdateField update = new ActionUpdateField( sf.getBoundName() ); update.fieldValues = old.fieldValues; a.action = update; } ActionSetField asf = (ActionSetField) a.action; ActionFieldValue val = new ActionFieldValue( sf.getFactField(), cell, sf.getType() ); asf.addFieldValue( val ); }
@Test public void testBackwardsCompatability() throws Exception { String xml = BRLPersistenceTest.loadResource( "ExistingDecisionTable.xml" ); GuidedDecisionTable52 dt_ = GuidedDTXMLPersistence.getInstance().unmarshal( xml ); assertNotNull( dt_ ); assertEquals( "blah", dt_.getTableName() ); assertEquals( 1, dt_.getMetadataCols().size() ); assertEquals( 1, dt_.getAttributeCols().size() ); assertEquals( 2, dt_.getActionCols().size() ); assertEquals( 1, dt_.getConditions().size() ); assertEquals( 1, dt_.getConditions().get( 0 ).getChildColumns().size() ); assertTrue( dt_.getActionCols().get( 1 ) instanceof ActionSetFieldCol52 ); ActionSetFieldCol52 asf = (ActionSetFieldCol52) dt_.getActionCols().get( 1 ); assertEquals( "foo", asf.getFactField() ); assertEquals( false, asf.isUpdate() ); }
a3.getBoundName() ); assertEquals( "goo1", a3.getFactField() ); assertEquals( SuggestionCompletionEngine.TYPE_STRING, a3.getType() ); a4.getBoundName() ); assertEquals( "goo2", a4.getFactField() ); assertEquals( "whee", a4.getDefaultValue().getStringValue() );
a3.getBoundName() ); assertEquals( "goo1", a3.getFactField() ); assertEquals( SuggestionCompletionEngine.TYPE_STRING, a3.getType() ); a4.getBoundName() ); assertEquals( "goo2", a4.getFactField() ); assertEquals( "whee", a4.getDefaultValue().getStringValue() );
asf.getFactField() ) ); assertFalse( dt.hasValueList( asf ) ); r = sce.getEnums( p1.getFactType(), asf.getFactField(), currentValueMap ).fixedList; assertEquals( 2, asf__.getFactField() ) ); assertTrue( dt.hasValueList( asf__ ) ); r = dt.getValueList( asf__ );