@Test public void testFlushDriverUsingQuery() throws Exception { presenter._setDataSetDef( dataSetDef ); presenter.editor = sqlDataSetDefAttributesEditor; when( sqlDataSetDefAttributesEditor.isUsingQuery() ).thenReturn( true ); presenter.afterFlush(); verify( dataSetDef, times( 1 ) ).setDbTable( null ); verify( dataSetDef, times( 0 ) ).setDbSQL( null ); }
@Override protected void afterFlush() { super.afterFlush(); if ( editor.isUsingQuery() ) { dataSetDef.setDbTable( null ); } else { dataSetDef.setDbSQL( null ); } }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( editor.isUsingQuery() ) { dataSetDef.setDbTable( null ); } else { dataSetDef.setDbSQL( null ); } } }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( editor.isUsingQuery() ) { dataSetDef.setDbTable( null ); } else { dataSetDef.setDbSQL( null ); } } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view ); }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( editor.isUsingQuery() ) { dataSetDef.setDbTable( null ); } else { dataSetDef.setDbSQL( null ); } } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view );  }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( editor.isUsingQuery() ) { dataSetDef.setDbTable( null ); } else { dataSetDef.setDbSQL( null ); } } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view );   }