AbstractProcedureImpl extends RelationalObjectImpl implements AbstractProcedure { @Override public Parameter[] getParameters( final UnitOfWork transaction, final String... namePatterns ) throws KException { ArgCheck.isNotNull( transaction, "transaction" ); ArgCheck.isTrue( ( transaction.getState() == State.NOT_STARTED ), "transaction state is not NOT_STARTED" ); final KomodoObject[] parameters = super.getChildrenOfType( transaction, CreateProcedure.PARAMETER, namePatterns ); Parameter[] result = null; if ( parameters.length == 0 ) { result = Parameter.NO_PARAMETERS; } result = new ParameterImpl[ parameters.length ]; int i = 0; for ( final KomodoObject param : parameters ) { result[i] = new ParameterImpl( transaction, getRepository(), param.getAbsolutePath() ); ++i; } return result; } protected  AbstractProcedureImpl( final UnitOfWork uow,
                                     final Repository repository,
                                     final String workspacePath ); @Override Parameter addParameter( final UnitOfWork transaction,
                                   final String parameterName ); @Override KomodoObject[] getChildren( final UnitOfWork transaction,
                                       final String... namePatterns ); @Override KomodoType[] getChildTypes(); @Override StatementOption[] getCustomOptions( final UnitOfWork transaction ); @Override String getDescription( final UnitOfWork transaction ); @Override String getNameInSource( final UnitOfWork transaction ); @Override Parameter[] getParameters( final UnitOfWork transaction,
                                      final String... namePatterns ); @Override Model getParent( final UnitOfWork transaction ); @Override Descriptor getPrimaryType( final UnitOfWork transaction ); @Override Property getProperty( final UnitOfWork transaction,
                                 final String name ); @Override PropertyDescriptor getPropertyDescriptor( final UnitOfWork transaction,
                                                     final String propName ); @Override String[] getPropertyNames( final UnitOfWork transaction ); @Override SchemaElementType getSchemaElementType( final UnitOfWork uow ); @Override Map< String, String > getStandardOptions(); @Override String[] getStatementOptionNames( final UnitOfWork transaction ); @Override StatementOption[] getStatementOptions( final UnitOfWork transaction ); @Override int getUpdateCount( final UnitOfWork transaction ); @Override String getUuid( final UnitOfWork transaction ); @Override boolean hasProperties( final UnitOfWork transaction ); @Override boolean hasProperty( final UnitOfWork transaction,
                                final String name ); @Override boolean isCustomOption( final UnitOfWork transaction,
                                   final String name ); @Override boolean isStandardOption( final String name ); @Override void removeParameter( final UnitOfWork transaction,
                                 final String parameterName ); @Override void removeStatementOption( final UnitOfWork transaction,
                                       final String optionToRemove ); @Override void setDescription( final UnitOfWork transaction,
                                final String newDescription ); @Override void setNameInSource( final UnitOfWork transaction,
                                 final String newNameInSource ); @Override void setProperty( final UnitOfWork transaction,
                             final String propertyName,
                             final Object... values ); @Override void setSchemaElementType( final UnitOfWork uow,
                                      final SchemaElementType newSchemaElementType ); @Override StatementOption setStatementOption( final UnitOfWork transaction,
                                               final String optionName,
                                               final String optionValue ); @Override void setUpdateCount( final UnitOfWork transaction,
                                final long newUpdateCount ); @Override void setUuid( final UnitOfWork transaction,
                         final String newUuid );  }
@Test public void shouldNotHaveParametersAfterConstruction() throws Exception { assertThat( this.procedure.getParameters( getTransaction() ).length, is( 0 ) ); }