Package de.espirit.or.query
Interface Select
- All Superinterfaces:
Cloneable
,Serializable
Model representing a Select statement to
query
entites from an
or session. A Select is related to one entityType
and can be created
via Session.createSelect(entityTypeName)
with the name
of the entity type.- Since:
- 4.0.17
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the given order criteria to the list of definedorders
of this select.void
Adds the given parameter to this select.applyLanguage
(@NotNull String languageAbbreviation) Make a clone of this select and replace all place holders%lang%
contained in constaints with the givenlanguageAbbreviation
void
Clears the definedorder criterias
of this select.boolean
containsParameter
(@NotNull String identifier) Indicates whether a parameter specified by the given identifier exists or not.@Nullable Constraint
Return the constraint defined by this select.Return the name of the entity type which entities in the result set belong to.List<de.espirit.or.query.FetchMode>
Returns all fetch modes defined by this select.int
Return the fetch size which will applied to the JDBC ResultSet to retrieve data from the database.int
The maximum number of entities this select will return.Returns an unmodifiable list of definedorders
of this select.getParameter
(@NotNull String identifier) Return the parameter with the givenidentifier
.Return all parameters defined by this select.getParameterValue
(@NotNull String identifier) Returns the value of the parameter specified by given identifier ornull
if no parameter exists with the given identifier.getXML()
Returns the xml representation of this select model.boolean
Return true if this select is constructed from a 3.1 query document.boolean
Return true if an order of the attributeattributeName
is already defined in this select.void
setConstraint
(Constraint constraint) Set the select constraint toconstraint
.void
setDeprecated
(boolean flag) Set this select to deprecated or not.void
setFetchSize
(int size) Sets the fetch size for this select which will be applied to the resultEntityList
returned byexecuteQuery(Select)
.void
setMaxResultCount
(int maxResultCount) Set the maximum number of entities this select will return.void
setParameter
(@NotNull String identifier, Object value) Sets the value for theparameter
specified by the given identifier.
-
Method Details
-
isDeprecated
boolean isDeprecated()Return true if this select is constructed from a 3.1 query document.- Since:
- 4.0.17
-
setDeprecated
void setDeprecated(boolean flag) Set this select to deprecated or not. A deprcated select is the one was constructed from a 3.1 query.- Since:
- 4.0.17
-
getEntityTypeName
String getEntityTypeName()Return the name of the entity type which entities in the result set belong to. Each select produces results from one entity type (table) even more than one entity types can be involved in the constraint of the select.- Since:
- 4.0.17
-
setConstraint
Set the select constraint toconstraint
.- Throws:
ORException
- Since:
- 4.0.17
-
getConstraint
Return the constraint defined by this select.- Since:
- 4.0.17
-
getParameter
Return the parameter with the givenidentifier
.- Throws:
ORException
- Since:
- 4.0.17
-
getParameters
Collection<Parameter> getParameters()Return all parameters defined by this select.- Since:
- 4.0.17
- See Also:
-
add
Adds the given parameter to this select.- Since:
- 4.0.17
- See Also:
-
getFetchModes
List<de.espirit.or.query.FetchMode> getFetchModes()Returns all fetch modes defined by this select.- Since:
- 4.0.17
-
getParameterValue
Returns the value of the parameter specified by given identifier ornull
if no parameter exists with the given identifier.- Since:
- 4.0.17
- See Also:
-
setParameter
Sets the value for theparameter
specified by the given identifier. The given value must match thevalue class
of the parameter. The parameter needs to be registered withadd(Parameter)
first.- Throws:
IllegalArgumentException
- if noparameter
exists with the given identifierORException
- Since:
- 4.0.17
- See Also:
-
getOrders
Returns an unmodifiable list of definedorders
of this select. The sequence of the list defines the priority of the ordering.- Since:
- 4.0.17
- See Also:
-
isOrdered
Return true if an order of the attributeattributeName
is already defined in this select.- Since:
- 4.0.30
-
add
Appends the given order criteria to the list of definedorders
of this select.- Since:
- 4.0.17
- See Also:
-
setFetchSize
void setFetchSize(int size) Sets the fetch size for this select which will be applied to the resultEntityList
returned byexecuteQuery(Select)
. The given fetchsize defines the block size of the EntityList which is a lazy list and queries its data in blocks of a specific size. The given fetch size defines the block size of the entity list. If fetch size is not specified the default block size (40 items) will be used for the query result, which is suited for the most use cases.- Since:
- 4.0.17
- See Also:
-
getFetchSize
int getFetchSize()Return the fetch size which will applied to the JDBC ResultSet to retrieve data from the database.- Since:
- 4.0.17
- See Also:
-
getXML
String getXML()Returns the xml representation of this select model.- Since:
- 4.0.17
-
clearOrdering
void clearOrdering()Clears the definedorder criterias
of this select.- Since:
- 4.0.17
- See Also:
-
containsParameter
Indicates whether a parameter specified by the given identifier exists or not.- Returns:
true
if a parameter specified by the given identifier exists,false
otherwise- Since:
- 4.0.17
-
getMaxResultCount
int getMaxResultCount()The maximum number of entities this select will return. A value of0
means no restriction (default).- Since:
- 4.0.19
- See Also:
-
setMaxResultCount
void setMaxResultCount(int maxResultCount) Set the maximum number of entities this select will return. A value of0
means no restriction (default).- Since:
- 4.0.19
- See Also:
-
applyLanguage
Make a clone of this select and replace all place holders%lang%
contained in constaints with the givenlanguageAbbreviation
- Returns:
- the clone of this select for the language
languageAbbreviation
- Since:
- 4.0.26
-