java.lang.Object
org.seasar.doma.jdbc.query.AbstractQuery
org.seasar.doma.jdbc.query.AbstractSelectQuery
org.seasar.doma.jdbc.query.SqlSelectQuery
- All Implemented Interfaces:
Query,SelectQuery
A query that executes a SQL SELECT statement.
This class extends AbstractSelectQuery to provide functionality for executing SELECT
statements. It handles SQL node transformation, expression evaluation, and SQL statement
preparation.
-
Field Summary
FieldsFields inherited from class org.seasar.doma.jdbc.query.AbstractSelectQuery
aggregateStrategyType, entityType, fetchSize, fetchType, maxRows, options, parameters, resultEnsured, resultMappingEnsured, resultStream, sql, sqlLogTypeFields inherited from class org.seasar.doma.jdbc.query.AbstractQuery
callerClassName, callerMethodName, config, message, method, queryTimeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Completes this query after execution.voidprepare()Prepares this query for execution.protected voidPrepares the SQL statement.voidsetSqlNode(SqlNode sqlNode) Sets the SQL node for this query.Methods inherited from class org.seasar.doma.jdbc.query.AbstractSelectQuery
addParameter, addParameters, buildSql, clearParameters, createExpressionEvaluator, executeCount, expandAggregateColumns, expandColumns, getFetchSize, getFetchType, getMaxRows, getOptions, getSql, getSqlLogType, isResultEnsured, isResultMappingEnsured, isResultStream, populateValues, prepareOptions, setAggregateStrategyType, setEntityType, setFetchSize, setFetchType, setMaxRows, setOptions, setResultEnsured, setResultMappingEnsured, setResultStream, setSqlLogType, toStringMethods inherited from class org.seasar.doma.jdbc.query.AbstractQuery
comment, getClassName, getConfig, getMethod, getMethodName, getQueryTimeout, setCallerClassName, setCallerMethodName, setConfig, setMessage, setMethod, setQueryTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.query.Query
comment, getClassName, getConfig, getMethod, getMethodName, getQueryTimeout
-
Field Details
-
sqlNode
The SQL node representing the query.
-
-
Constructor Details
-
SqlSelectQuery
public SqlSelectQuery()
-
-
Method Details
-
prepare
public void prepare()Prepares this query for execution. This method must be called before the query is executed.This implementation prepares options and SQL.
This implementation validates that the SQL node is not null.
- Specified by:
preparein interfaceQuery- Overrides:
preparein classAbstractSelectQuery
-
prepareSql
protected void prepareSql()Prepares the SQL statement.This method transforms the SQL node using the dialect, evaluates expressions, and builds the prepared SQL statement.
- Specified by:
prepareSqlin classAbstractSelectQuery
-
complete
public void complete()Completes this query after execution. This method must be called after the query is executed.This implementation executes a count query if the select options indicate a count operation.
-
setSqlNode
Sets the SQL node for this query.- Parameters:
sqlNode- the SQL node
-