org.eobjects.metamodel.query
Class DefaultCompiledQuery

java.lang.Object
  extended by org.eobjects.metamodel.query.DefaultCompiledQuery
All Implemented Interfaces:
Closeable, CompiledQuery

public class DefaultCompiledQuery
extends Object
implements CompiledQuery

Represents a default implementation of the CompiledQuery interface. This implementation does not actually do anything to prepare the query, but allows creating a clone of the originating query with the parameters replaced by values.


Constructor Summary
DefaultCompiledQuery(Query query)
           
 
Method Summary
 Query cloneWithParameterValues(Object[] values)
          Clones the query while replacing query parameters with corresponding values.
 void close()
          Closes any resources related to the compiled query.
 List<QueryParameter> getParameters()
          Gets the QueryParameters associated with the compiled query.
 String toSql()
          A representation of the query as SQL.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultCompiledQuery

public DefaultCompiledQuery(Query query)
Method Detail

cloneWithParameterValues

public Query cloneWithParameterValues(Object[] values)
Clones the query while replacing query parameters with corresponding values.

Parameters:
values -
Returns:

getParameters

public List<QueryParameter> getParameters()
Description copied from interface: CompiledQuery
Gets the QueryParameters associated with the compiled query. Values for these parameters are expected when the query is executed.

Specified by:
getParameters in interface CompiledQuery
Returns:
a list of query parameters

toSql

public String toSql()
Description copied from interface: CompiledQuery
A representation of the query as SQL.

Specified by:
toSql in interface CompiledQuery
Returns:
a SQL string.

toString

public String toString()
Overrides:
toString in class Object

close

public void close()
Description copied from interface: CompiledQuery
Closes any resources related to the compiled query.

Specified by:
close in interface Closeable
Specified by:
close in interface CompiledQuery


Copyright © 2007-2013. All Rights Reserved.