org.jooq
Interface Query

All Superinterfaces:
Adapter, Attachable, QueryPart, Serializable
All Known Subinterfaces:
Delete<R>, DeleteConditionStep<R>, DeleteFinalStep<R>, DeleteQuery<R>, DeleteWhereStep<R>, Insert<R>, InsertFinalStep<R>, InsertOnDuplicateSetMoreStep<R>, InsertOnDuplicateStep<R>, InsertQuery<R>, InsertResultStep<R>, InsertSetMoreStep<R>, InsertValuesStep<R>, Merge<R>, MergeFinalStep<R>, ResultQuery<R>, Select<R>, SelectConditionStep, SelectConnectByConditionStep, SelectConnectByStep, SelectFinalStep, SelectForUpdateOfStep, SelectForUpdateStep, SelectForUpdateWaitStep, SelectFromStep, SelectGroupByStep, SelectHavingConditionStep, SelectHavingStep, SelectJoinStep, SelectLimitStep, SelectOffsetStep, SelectOnConditionStep, SelectOrderByStep, SelectQuery, SelectSelectStep, SelectStartWithStep, SelectWhereStep, SimpleSelectConditionStep<R>, SimpleSelectFinalStep<R>, SimpleSelectForUpdateOfStep<R>, SimpleSelectForUpdateStep<R>, SimpleSelectForUpdateWaitStep<R>, SimpleSelectLimitStep<R>, SimpleSelectOffsetStep<R>, SimpleSelectOrderByStep<R>, SimpleSelectQuery<R>, SimpleSelectWhereStep<R>, StoreQuery<R>, Truncate<R>, Update<R>, UpdateConditionStep<R>, UpdateFinalStep<R>, UpdateQuery<R>, UpdateSetMoreStep<R>, UpdateWhereStep<R>

public interface Query
extends QueryPart

Any query

Author:
Lukas Eder

Method Summary
 int execute()
          Execute the query, if it has been created with a properly configured factory
 List<Object> getBindValues()
          Retrieve the bind values that will be bound by this Query
 String getSQL()
          Retrieve the SQL code rendered by this Query This method can be expected to work correctly for any SQL dialect, as a query is usually "attached" when created from a Factory.
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 

Method Detail

execute

int execute()
            throws DataAccessException
Execute the query, if it has been created with a properly configured factory

Returns:
A result value, depending on the concrete implementation of Query:
  • Delete : the number of deleted records
  • Insert : the number of inserted records
  • Merge : the result may have no meaning
  • Select : the number of resulting records
  • Truncate : the result may have no meaning
  • Update : the number of updated records
Throws:
DataAccessException - If anything goes wrong in the database

getSQL

String getSQL()
Retrieve the SQL code rendered by this Query

This method can be expected to work correctly for any SQL dialect, as a query is usually "attached" when created from a Factory.

Use this method, when you want to use jOOQ for object oriented query creation, but execute the query with some other technology, such as


getBindValues

List<Object> getBindValues()
Retrieve the bind values that will be bound by this Query



Copyright © 2011. All Rights Reserved.