@Test public void shouldObtainStatementOptionNames() throws Exception { final String custom = "blah"; this.procedure.setStatementOption( getTransaction(), custom, "sledge" ); final String standard = this.procedure.getStandardOptions().keySet().iterator().next(); this.procedure.setStatementOption( getTransaction(), standard, "hammer" ); assertThat( this.procedure.getStatementOptionNames( getTransaction() ).length, is( 2 ) ); assertThat( Arrays.asList( this.procedure.getStatementOptionNames( getTransaction() ) ), hasItems( custom, standard ) ); }
@Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } StoredProcedureImpl( final UnitOfWork uow,
                                final Repository repository,
                                final String workspacePath ); }
StoredProcedureImpl extends AbstractProcedureImpl implements StoredProcedure { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } 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 Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } 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 );  }