@Test public void simpleAction() { final AtomicBoolean calledBack = new AtomicBoolean(false); final ActionInsertFactCol52 aif = new ActionInsertFactCol52(); aif.setFactType("Person"); aif.setFactField("name"); model.getActionCols().add(aif); when(dmo.getFieldType(eq("Person"), eq("name"))).thenReturn(DataType.TYPE_STRING); builder.generateDefinition(dtPresenter, aif, (String definition) -> { calledBack.set(true); assertEquals("Person fact0 = new Person();<br/>" + "fact0.setName( \"x\" );<br/>" + "insert( fact0 );", definition); }); assertTrue(calledBack.get()); }
@Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof ActionInsertFactCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); }
ActionInsertFactCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof ActionInsertFactCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } }
ActionInsertFactCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof ActionInsertFactCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  ActionInsertFactCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); }
ActionInsertFactCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof ActionInsertFactCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  ActionInsertFactCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); @Override Class getSupportedColumnType(); @Override void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter,
                                    final BaseColumn column,
                                    final Callback<String> afterGenerationCallback ); }
ActionInsertFactCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof ActionInsertFactCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  ActionInsertFactCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); @Override Class getSupportedColumnType(); @Override void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter,
                                    final BaseColumn column,
                                    final Callback<String> afterGenerationCallback );  }