Class DefaultRelationalQuery
java.lang.Object
io.ebeaninternal.server.querydefn.AbstractQuery
io.ebeaninternal.server.querydefn.DefaultRelationalQuery
- All Implemented Interfaces:
io.ebean.CancelableQuery, io.ebean.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
io.ebean.SqlQuery.TypeQuery<T> -
Field Summary
Fields inherited from class AbstractQuery
useMaster -
Constructor Summary
ConstructorsConstructorDescriptionDefaultRelationalQuery(SpiEbeanServer server, String query) Additional supply a query detail object. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfindEachRow(io.ebean.RowConsumer consumer) voidfindEachWhile(Predicate<io.ebean.SqlRow> consumer) List<io.ebean.SqlRow> findList()io.ebean.SqlRowfindOne()Optional<io.ebean.SqlRow> 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> io.ebean.SqlQuery.TypeQuery<T> mapTo(io.ebean.RowMapper<T> mapper) <T> io.ebean.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) io.ebean.SqlQuerysetNullParameter(int position, int jdbcType) io.ebean.SqlQuerysetNullParameter(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.io.ebean.SqlQueryusingConnection(Connection connection) io.ebean.SqlQueryusingMaster(boolean useMaster) io.ebean.SqlQueryusingTransaction(io.ebean.Transaction transaction) Methods inherited from class AbstractQuery
cancel, checkCancelled, setCancelableQueryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.ebean.CancelableQuery
cancelMethods inherited from interface SpiCancelableQuery
checkCancelled, setCancelableQueryMethods inherited from interface io.ebean.SqlQuery
usingMaster
-
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
public io.ebean.SqlQuery usingTransaction(io.ebean.Transaction transaction) - Specified by:
usingTransactionin interfaceio.ebean.SqlQuery
-
usingConnection
- Specified by:
usingConnectionin interfaceio.ebean.SqlQuery
-
usingMaster
public io.ebean.SqlQuery usingMaster(boolean useMaster) - Specified by:
usingMasterin interfaceio.ebean.SqlQuery
-
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
- Specified by:
findEachin interfaceio.ebean.SqlQuery
-
findEachWhile
- Specified by:
findEachWhilein interfaceio.ebean.SqlQuery
-
findList
- Specified by:
findListin interfaceio.ebean.SqlQuery
-
findEachRow
public void findEachRow(io.ebean.RowConsumer consumer) - Specified by:
findEachRowin interfaceio.ebean.SqlQuery
-
findOne
public io.ebean.SqlRow findOne()- Specified by:
findOnein interfaceio.ebean.SqlQuery
-
findOneOrEmpty
- Specified by:
findOneOrEmptyin interfaceio.ebean.SqlQuery
-
setParameters
- Specified by:
setParametersin interfaceio.ebean.SqlQuery
-
setParameter
- Specified by:
setParameterin interfaceio.ebean.SqlQuery
-
setNullParameter
public io.ebean.SqlQuery setNullParameter(int position, int jdbcType) - Specified by:
setNullParameterin interfaceio.ebean.SqlQuery
-
setNullParameter
- Specified by:
setNullParameterin interfaceio.ebean.SqlQuery
-
setParameter
- Specified by:
setParameterin interfaceio.ebean.SqlQuery
-
setArrayParameter
- Specified by:
setArrayParameterin interfaceio.ebean.SqlQuery
-
setParameter
- Specified by:
setParameterin interfaceio.ebean.SqlQuery
-
setArrayParameter
- Specified by:
setArrayParameterin interfaceio.ebean.SqlQuery
-
toString
-
getFirstRow
public int getFirstRow()Description copied from interface:SpiSqlBindingReturn the first row to fetch.- Specified by:
getFirstRowin interfaceSpiSqlBinding
-
setFirstRow
- Specified by:
setFirstRowin interfaceio.ebean.SqlQuery
-
getMaxRows
public int getMaxRows()Description copied from interface:SpiSqlBindingReturn the maximum number of rows to fetch.- Specified by:
getMaxRowsin interfaceSpiSqlBinding
-
setMaxRows
- Specified by:
setMaxRowsin interfaceio.ebean.SqlQuery
-
getTimeout
public int getTimeout()Description copied from interface:SpiSqlBindingReturn the query timeout.- Specified by:
getTimeoutin interfaceSpiSqlBinding
-
setTimeout
- Specified by:
setTimeoutin interfaceio.ebean.SqlQuery
-
getLabel
Description copied from interface:SpiSqlBindingReturn the label (to collect metrics on when set).- Specified by:
getLabelin interfaceSpiSqlBinding
-
setLabel
- Specified by:
setLabelin interfaceio.ebean.SqlQuery
-
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 interfaceio.ebean.SqlQuery
-
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 interfaceio.ebean.SqlQuery
-
mapTo
public <T> io.ebean.SqlQuery.TypeQuery<T> mapTo(io.ebean.RowMapper<T> mapper) - Specified by:
mapToin interfaceio.ebean.SqlQuery
-