com.bea.wlevs.ede.api
Interface PreparedStatement


public interface PreparedStatement
extends Statement

Statement that contains placeholders for values to be bound at runtime. In effect, this allows a PreparedStatement to be used multiple times with different bindings to create new executable Statements.


Method Summary
 BoundStatement bind(java.lang.Object[] values)
          Binds placeholder values in the PreparedStatement with the values provided in the array in the order in which they appear.
 BoundStatement bind(java.lang.Object[] values, java.lang.String bindingId)
          Binds placeholder values in the order in which they appear in the array parameter.
 BoundStatement getBoundStatement(java.lang.String bindingId)
          Returns BoundStatement identfied by bindingId
 java.util.Collection getBoundStatements()
          Returns read-only Collection of all BoundStatements being managed by this PreparedStatement.
 int getParameterCount()
          Returns the number of placeholder values which must be supplied to bind the statement (i.e. the required length of the values Object array provided to the bind method).
 
Methods inherited from interface com.bea.wlevs.ede.api.Statement
destroy, getId, getQuery, start, stop
 
Methods inherited from interface com.bea.wlevs.ede.api.EventSender
sendEvent
 

Method Detail

bind

public BoundStatement bind(java.lang.Object[] values)
                    throws StatementException
Binds placeholder values in the PreparedStatement with the values provided in the array in the order in which they appear.

Parameters:
values - values used to bind placeholders
Returns:
newly created BoundStatement
Throws:
StatementException - if exceptions occur during binding

bind

public BoundStatement bind(java.lang.Object[] values,
                           java.lang.String bindingId)
                    throws StatementException
Binds placeholder values in the order in which they appear in the array parameter.

Parameters:
values - values provided to bind placeholders
identifier - for the newly created binding (required to be unique within the prepared statement).
Returns:
newly created BoundStatement
Throws:
StatementException - if exceptions occur during binding

getBoundStatement

public BoundStatement getBoundStatement(java.lang.String bindingId)
Returns BoundStatement identfied by bindingId

Parameters:
bindingId - identifier previously supplied to the bind function.
Returns:
BoundStatement identified by bindingId

getBoundStatements

public java.util.Collection getBoundStatements()
Returns read-only Collection of all BoundStatements being managed by this PreparedStatement.

Returns:
Read-only collection of BoundStatements

getParameterCount

public int getParameterCount()
Returns the number of placeholder values which must be supplied to bind the statement (i.e. the required length of the values Object array provided to the bind method).

Returns:
the required number of placeholder values


Copyright © 2007 BEA Systems All Rights Reserved.