Class SqlSelectionImpl
- java.lang.Object
-
- org.hibernate.sql.results.internal.SqlSelectionImpl
-
- All Implemented Interfaces:
SqlExpressionAccess
,SqlSelection
,SqlAstNode
- Direct Known Subclasses:
ResolvedSqlSelection
public class SqlSelectionImpl extends Object implements SqlSelection, SqlExpressionAccess
-
-
Constructor Summary
Constructors Modifier Constructor Description SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, Expression sqlExpression, boolean virtual)
protected
SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, Expression sqlExpression, JavaType<?> jdbcJavaType, boolean virtual, ValueExtractor valueExtractor)
SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, JavaType<?> jdbcJavaType, Expression sqlExpression, boolean virtual)
SqlSelectionImpl(int valuesArrayPosition, Expression sqlExpression)
SqlSelectionImpl(Expression sqlExpression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SqlAstWalker interpreter)
boolean
equals(Object o)
Expression
getExpression()
The underlying expression.JdbcMappingContainer
getExpressionType()
Get the type of the expressionint
getJdbcResultSetIndex()
Get the JDBC position (1-based)ValueExtractor
getJdbcValueExtractor()
Get the extractor that can be used to extract JDBC values for this selectionExpression
getSqlExpression()
int
getValuesArrayPosition()
Get the position within the "JDBC values" array (0-based).int
hashCode()
boolean
isVirtual()
Whether this is a virtual or a real selection item.boolean
needsResolve()
SqlSelection
resolve(JdbcValuesMetadata jdbcResultsMetadata, SessionFactoryImplementor sessionFactory)
-
-
-
Constructor Detail
-
SqlSelectionImpl
public SqlSelectionImpl(Expression sqlExpression)
-
SqlSelectionImpl
public SqlSelectionImpl(int valuesArrayPosition, Expression sqlExpression)
-
SqlSelectionImpl
public SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, Expression sqlExpression, boolean virtual)
-
SqlSelectionImpl
public SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, JavaType<?> jdbcJavaType, Expression sqlExpression, boolean virtual)
-
SqlSelectionImpl
protected SqlSelectionImpl(int jdbcPosition, int valuesArrayPosition, Expression sqlExpression, JavaType<?> jdbcJavaType, boolean virtual, ValueExtractor valueExtractor)
-
-
Method Detail
-
getExpression
public Expression getExpression()
Description copied from interface:SqlSelection
The underlying expression.- Specified by:
getExpression
in interfaceSqlSelection
-
getJdbcValueExtractor
public ValueExtractor getJdbcValueExtractor()
Description copied from interface:SqlSelection
Get the extractor that can be used to extract JDBC values for this selection- Specified by:
getJdbcValueExtractor
in interfaceSqlSelection
-
getJdbcResultSetIndex
public int getJdbcResultSetIndex()
Description copied from interface:SqlSelection
Get the JDBC position (1-based)- Specified by:
getJdbcResultSetIndex
in interfaceSqlSelection
-
getValuesArrayPosition
public int getValuesArrayPosition()
Description copied from interface:SqlSelection
Get the position within the "JDBC values" array (0-based). Negative indicates this is not a "real" selection- Specified by:
getValuesArrayPosition
in interfaceSqlSelection
-
getExpressionType
public JdbcMappingContainer getExpressionType()
Description copied from interface:SqlSelection
Get the type of the expression- Specified by:
getExpressionType
in interfaceSqlSelection
-
isVirtual
public boolean isVirtual()
Description copied from interface:SqlSelection
Whether this is a virtual or a real selection item. Virtual selection items are not rendered into the SQL select clause.- Specified by:
isVirtual
in interfaceSqlSelection
-
getSqlExpression
public Expression getSqlExpression()
- Specified by:
getSqlExpression
in interfaceSqlExpressionAccess
-
accept
public void accept(SqlAstWalker interpreter)
- Specified by:
accept
in interfaceSqlAstNode
- Specified by:
accept
in interfaceSqlSelection
-
needsResolve
public boolean needsResolve()
-
resolve
public SqlSelection resolve(JdbcValuesMetadata jdbcResultsMetadata, SessionFactoryImplementor sessionFactory)
- Specified by:
resolve
in interfaceSqlSelection
-
-