PushdownFunctionImpl extends FunctionImpl implements PushdownFunction { @Override public ProcedureResultSet getResultSet( final UnitOfWork transaction ) throws KException { ArgCheck.isNotNull( transaction, "transaction" ); ArgCheck.isTrue( ( transaction.getState() == State.NOT_STARTED ), "transaction state is not NOT_STARTED" ); ProcedureResultSet result = null; if ( hasChild( transaction, CreateProcedure.RESULT_SET ) ) { final KomodoObject kobject = getChild( transaction, CreateProcedure.RESULT_SET ); if ( DataTypeResultSet.RESOLVER.resolvable( transaction, kobject ) ) { result = DataTypeResultSet.RESOLVER.resolve( transaction, kobject ); } else if ( TabularResultSet.RESOLVER.resolvable( transaction, kobject ) ) { result = TabularResultSet.RESOLVER.resolve( transaction, kobject ); } else { throw new UnsupportedOperationException( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; } PushdownFunctionImpl( final UnitOfWork uow,
                                 final Repository repository,
                                 final String workspacePath ); @Override KomodoType[] getChildTypes(); @Override ProcedureResultSet getResultSet( final UnitOfWork transaction ); @Override int getTypeId(); @Override KomodoType getTypeIdentifier( final UnitOfWork uow ); @Override Model getParent( final UnitOfWork transaction ); @Override void removeResultSet( final UnitOfWork transaction ); @SuppressWarnings( "unchecked" ) @Override T setResultSet( final UnitOfWork transaction,
                                                            final Class< T > resultSetType );  }
@Test public void shouldNotHaveResultSetAfterConstruction() throws Exception { assertThat( this.function.getResultSet( getTransaction() ), is( nullValue() ) ); }