@Test public void shouldNotHaveResultSetAfterConstruction() throws Exception { assertThat( this.procedure.getResultSet( getTransaction() ), is( nullValue() ) ); }
@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 { LOGGER.error( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @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 { LOGGER.error( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; } }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @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 { LOGGER.error( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; } StoredProcedureImpl( final UnitOfWork uow,
                                final Repository repository,
                                final String workspacePath ); }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @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 { LOGGER.error( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; } StoredProcedureImpl( final UnitOfWork uow,
                                final Repository repository,
                                final String workspacePath ); @Override KomodoType[] getChildTypes(); @Override String getNativeQuery( final UnitOfWork transaction ); @Override ProcedureResultSet getResultSet( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override KomodoType getTypeIdentifier( final UnitOfWork transaction ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isNonPrepared( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void removeResultSet( final UnitOfWork transaction ); @Override void setNativeQuery( final UnitOfWork transaction,
                                final String newNativeQuery ); @Override void setNonPrepared( final UnitOfWork transaction,
                                final boolean newNonPrepared ); @SuppressWarnings( "unchecked" ) @Override T setResultSet( final UnitOfWork transaction,
                                                            final Class< T > resultSetType ); }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @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 { LOGGER.error( Messages.getString( Relational.UNEXPECTED_RESULT_SET_TYPE, kobject.getAbsolutePath() ) ); } } return result; } StoredProcedureImpl( final UnitOfWork uow,
                                final Repository repository,
                                final String workspacePath ); @Override KomodoType[] getChildTypes(); @Override String getNativeQuery( final UnitOfWork transaction ); @Override ProcedureResultSet getResultSet( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override KomodoType getTypeIdentifier( final UnitOfWork transaction ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isNonPrepared( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void removeResultSet( final UnitOfWork transaction ); @Override void setNativeQuery( final UnitOfWork transaction,
                                final String newNativeQuery ); @Override void setNonPrepared( final UnitOfWork transaction,
                                final boolean newNonPrepared ); @SuppressWarnings( "unchecked" ) @Override T setResultSet( final UnitOfWork transaction,
                                                            final Class< T > resultSetType );  }