Used to control query execution. Based closely on javax.persistence.TypedQuery, but automatically manages conversions between Ceylon types and corresponding Java types, without the need for JPA AttributeConverters.

Constructors
TypedQuerySource Codeshared TypedQuery(JTypedQuery<Result> query)
withResultClassSource Codeshared withResultClass(Class<Result,Nothing> resultClass, JQuery query)
withoutResultClassSource Codeshared withoutResultClass(JQuery query)
Attributes
firstResultSource Codeshared Integer firstResult

The position of the first result to retrieve.

flushModeSource Codeshared FlushModeType flushMode

The flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager.

hintsSource Codeshared Properties hints

Get the properties and hints and associated values that are in effect for the query instance.

lockModeSource Codeshared LockModeType lockMode

The lock mode type to be used for the query execution.

maxResultsSource Codeshared Integer maxResults

The maximum number of results to retrieve.

parametersSource Codeshared Set<Parameter<out Object>> parameters

Get the parameter objects corresponding to the declared parameters of the query. Returns an empty set if the query has no parameters. This method is not required to be supported for native queries.

querySource Codeshared JQuery query
Inherited Attributes
Attributes inherited from: Object
Methods
executeSource Codeshared QueryResults execute()

Execute a stored procedure or SQL DML query, returning the outcome as a QueryResults.

executeUpdateSource Codeshared Integer executeUpdate()

Execute an update or delete statement. Returns the number of affected rows.

getParameterSource Codeshared Parameter<out Object> getParameter(Integer|String parameter)

Get the parameter object corresponding to the declared positional or named parameter with the given position or name. This method is not required to be supported for native queries.

getParameterArgumentSource Codeshared Object? getParameterArgument(Integer|String parameter)

Return the argument bound to the given positional or named parameter.

getResultListSource Codeshared JList<out Result> getResultList()

Execute a query and return the query results as a Java List (JList).

getResultsSource Codeshared List<Result> getResults()

Execute a query and return the query results as a List.

getSingleResultSource Codeshared Result? getSingleResult()

Execute a query that returns a single result, returning the result, or null if there are no results.

getTypedParameterSource Codeshared Parameter<Argument> getTypedParameter<Argument>(Integer|String parameter, Class<Argument,Nothing> type)
given Argument satisfies Object

Get the parameter object corresponding to the declared parameter of the given name and type. This method is required to be supported for criteria queries only.

getTypedParameterArgumentSource Codeshared Argument? getTypedParameterArgument<Argument>(Parameter<Argument> parameter)
given Argument satisfies Object

Return the argument bound to the given parameter.

Parameters:
  • parameter
    • is Argument argument = toCeylon(query.getParameterValue(parameter))
isBoundSource Codeshared Boolean isBound(Parameter<out Object> parameter)

Determine whether an argument has been bound to the given parameter.

registerParameterSource Codeshared TypedQuery<Result> registerParameter(Integer|String parameter, Class<Object,Nothing> type, ParameterMode mode)

Register a named or positional parameter for a stored procedure call.

setFirstResultSource Codeshared TypedQuery<Result> setFirstResult(Integer startPosition)

Set the position of the first result to retrieve.

setFlushModeSource Codeshared TypedQuery<Result> setFlushMode(FlushModeType flushMode)

Set the flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager.

setHintSource Codeshared TypedQuery<Result> setHint(String hintName, Object? hintValue)

Set a query property or hint.

setLockModeSource Codeshared TypedQuery<Result> setLockMode(LockModeType lockMode)

Set the lock mode type to be used for the query execution.

setMaxResultsSource Codeshared TypedQuery<Result> setMaxResults(Integer maxResults)

Set the maximum number of results to retrieve.

setNamedArgumentsSource Codeshared TypedQuery<Result> setNamedArguments(String->Object* arguments)

Bind arguments to all named parameters.

setParameterSource Codeshared TypedQuery<Result> setParameter(String|Integer parameter, Object? argument)

Bind an argument to the given positional or named parameter.

setPositionalArgumentsSource Codeshared TypedQuery<Result> setPositionalArguments(Object* arguments)

Bind arguments to all positional parameters.

setTemporalParameterSource Codeshared TypedQuery<Result> setTemporalParameter(Integer|String parameter, Date|Calendar argument, TemporalType temporalType)

Bind an argument to the given positional or named parameter of temporal type.

setTemporalTypedParameterSource Codeshared TypedQuery<Result> setTemporalTypedParameter<Type>(Parameter<Type> parameter, Type argument, TemporalType temporalType)
given Type of Calendar | Date

Bind an argument to the given parameter of temporal type.

setTypedParameterSource Codeshared TypedQuery<Result> setTypedParameter<Argument>(Parameter<Argument> parameter, Argument? argument)
given Argument satisfies Object

Bind an argument to the given parameter.

Inherited Methods
Methods inherited from: Object