java.lang.Object
io.ebeaninternal.server.querydefn.AbstractQuery
io.ebeaninternal.server.querydefn.DefaultRelationalQuery
- All Implemented Interfaces:
CancelableQuery,SqlQuery,SpiCancelableQuery,SpiSqlBinding,SpiSqlQuery,Serializable
Default implementation of SQuery - SQL Query.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.ebean.SqlQuery
SqlQuery.TypeQuery<T> -
Field Summary
Fields inherited from class io.ebeaninternal.server.querydefn.AbstractQuery
useMaster -
Constructor Summary
ConstructorsConstructorDescriptionDefaultRelationalQuery(SpiEbeanServer server, String query) Additional supply a query detail object. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfindEachRow(RowConsumer consumer) voidfindEachWhile(Predicate<SqlRow> consumer) findList()findOne()Return the named or positioned parameters.intReturn the hint for Statement.setFetchSize().intReturn the first row to fetch.getLabel()Return the label (to collect metrics on when set).intReturn the maximum number of rows to fetch.getQuery()return the query.intReturn the query timeout.booleanReturn true if this query should not use the read only data source.<T> SqlQuery.TypeQuery<T> <T> SqlQuery.TypeQuery<T> mapToScalar(Class<T> attributeType) setArrayParameter(int position, Collection<?> value) setArrayParameter(String paramName, Collection<?> value) setBufferFetchSizeHint(int bufferFetchSizeHint) final voidsetDefaultFetchBuffer(int fetchSize) Set the JDBC fetchSize buffer hint if not explicitly set.setFirstRow(int firstRow) setMaxRows(int maxRows) setNullParameter(int position, int jdbcType) setNullParameter(String name, int jdbcType) setParameter(int position, Object value) setParameter(Object value) setParameter(String paramName, Object value) setParameters(Object... values) setTimeout(int secs) toString()Return the transaction explicitly associated to the query.usingConnection(Connection connection) usingTransaction(Transaction transaction) Methods inherited from class io.ebeaninternal.server.querydefn.AbstractQuery
cancel, checkCancelled, setCancelableQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.ebean.CancelableQuery
cancelMethods inherited from interface io.ebeaninternal.api.SpiCancelableQuery
checkCancelled, setCancelableQuery
-
Constructor Details
-
DefaultRelationalQuery
Additional supply a query detail object.
-
-
Method Details
-
transaction
Description copied from interface:SpiSqlBindingReturn the transaction explicitly associated to the query.- Specified by:
transactionin interfaceSpiSqlBinding
-
usingTransaction
- Specified by:
usingTransactionin interfaceSqlQuery
-
usingConnection
- Specified by:
usingConnectionin interfaceSqlQuery
-
usingMaster
- Specified by:
usingMasterin interfaceSqlQuery
-
isUseMaster
public boolean isUseMaster()Description copied from interface:SpiSqlBindingReturn true if this query should not use the read only data source.- Specified by:
isUseMasterin interfaceSpiSqlBinding
-
findEach
-
findEachWhile
- Specified by:
findEachWhilein interfaceSqlQuery
-
findList
-
findEachRow
- Specified by:
findEachRowin interfaceSqlQuery
-
findOne
-
findOneOrEmpty
- Specified by:
findOneOrEmptyin interfaceSqlQuery
-
setParameters
- Specified by:
setParametersin interfaceSqlQuery
-
setParameter
- Specified by:
setParameterin interfaceSqlQuery
-
setNullParameter
- Specified by:
setNullParameterin interfaceSqlQuery
-
setNullParameter
- Specified by:
setNullParameterin interfaceSqlQuery
-
setParameter
- Specified by:
setParameterin interfaceSqlQuery
-
setArrayParameter
- Specified by:
setArrayParameterin interfaceSqlQuery
-
setParameter
- Specified by:
setParameterin interfaceSqlQuery
-
setArrayParameter
- Specified by:
setArrayParameterin interfaceSqlQuery
-
toString
-
getFirstRow
public int getFirstRow()Description copied from interface:SpiSqlBindingReturn the first row to fetch.- Specified by:
getFirstRowin interfaceSpiSqlBinding
-
setFirstRow
- Specified by:
setFirstRowin interfaceSqlQuery
-
getMaxRows
public int getMaxRows()Description copied from interface:SpiSqlBindingReturn the maximum number of rows to fetch.- Specified by:
getMaxRowsin interfaceSpiSqlBinding
-
setMaxRows
- Specified by:
setMaxRowsin interfaceSqlQuery
-
getTimeout
public int getTimeout()Description copied from interface:SpiSqlBindingReturn the query timeout.- Specified by:
getTimeoutin interfaceSpiSqlBinding
-
setTimeout
- Specified by:
setTimeoutin interfaceSqlQuery
-
getLabel
Description copied from interface:SpiSqlBindingReturn the label (to collect metrics on when set).- Specified by:
getLabelin interfaceSpiSqlBinding
-
setLabel
-
getBindParams
Description copied from interface:SpiSqlBindingReturn the named or positioned parameters.- Specified by:
getBindParamsin interfaceSpiSqlBinding
-
setDefaultFetchBuffer
public final void setDefaultFetchBuffer(int fetchSize) Description copied from interface:SpiSqlBindingSet the JDBC fetchSize buffer hint if not explicitly set.- Specified by:
setDefaultFetchBufferin interfaceSpiSqlBinding
-
setBufferFetchSizeHint
- Specified by:
setBufferFetchSizeHintin interfaceSqlQuery
-
getBufferFetchSizeHint
public int getBufferFetchSizeHint()Description copied from interface:SpiSqlBindingReturn the hint for Statement.setFetchSize().- Specified by:
getBufferFetchSizeHintin interfaceSpiSqlBinding
-
getQuery
Description copied from interface:SpiSqlBindingreturn the query.- Specified by:
getQueryin interfaceSpiSqlBinding
-
mapToScalar
- Specified by:
mapToScalarin interfaceSqlQuery
-
mapTo
-