public interface Select extends Cloneable, Serializable
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.Session.executeQuery(Select),
Session.createSelect(String)| Modifier and Type | Method and Description |
|---|---|
void |
add(Order order)
Appends the given order criteria to the list of defined
orders of this select. |
void |
add(Parameter parameter)
Adds the given parameter to this select.
|
Select |
applyLanguage(String languageAbbreviation)
Make a clone of this select and replace all place holders
%lang% contained in
constaints with the given languageAbbreviation |
void |
clearOrdering()
Clears the defined
order criterias of this select. |
boolean |
containsParameter(String identifier)
Indicates whether a parameter specified by the given identifier exists or not.
|
Constraint |
getConstraint()
Return the constraint defined by this select.
|
String |
getEntityTypeName()
Return the name of the entity type which entities in the result set belong to.
|
List<de.espirit.or.query.FetchMode> |
getFetchModes()
Returns all fetch modes defined by this select.
|
int |
getFetchSize()
Return the fetch size which will applied to the JDBC ResultSet to retrieve data from the database.
|
int |
getMaxResultCount()
The maximum number of entities this select will return.
|
List<Order> |
getOrders()
Returns an unmodifiable list of defined
orders of this select. |
Parameter |
getParameter(String identifier)
Return the parameter with the given
identifier. |
Collection<Parameter> |
getParameters()
Return all parameters defined by this select.
|
Object |
getParameterValue(String identifier)
Returns the value of the parameter specified by given identifier or
null if no parameter
exists with the given identifier. |
String |
getXML()
Returns the xml representation of this select model.
|
boolean |
isDeprecated()
Return true if this select is constructed from a 3.1 query document.
|
boolean |
isOrdered(String attributeName)
Return true if an order of the attribute
attributeName is already defined in this select. |
void |
setConstraint(Constraint constraint)
Set the select constraint to
constraint. |
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 result
EntityListreturned by executeQuery(Select). |
void |
setMaxResultCount(int maxResultCount)
Set the maximum number of entities this select will return.
|
void |
setParameter(String identifier,
Object value)
Sets the value for the
parameter specified by the given
identifier. |
boolean isDeprecated()
void setDeprecated(boolean flag)
String getEntityTypeName()
void setConstraint(Constraint constraint) throws de.espirit.or.ORException
constraint.de.espirit.or.ORException@Nullable Constraint getConstraint()
Parameter getParameter(@NotNull String identifier) throws de.espirit.or.ORException
identifier.de.espirit.or.ORExceptionCollection<Parameter> getParameters()
add(Parameter)void add(@NotNull Parameter parameter)
getParameters()List<de.espirit.or.query.FetchMode> getFetchModes()
#add(FetchMode)Object getParameterValue(@NotNull String identifier)
null if no parameter
exists with the given identifier.setParameter(String,Object),
add(Parameter)void setParameter(@NotNull String identifier, Object value) throws de.espirit.or.ORException
parameter specified by the given
identifier. The given value must match the value class of the parameter.
The parameter needs to be registered with add(Parameter) first.IllegalArgumentException - if no parameter exists with the given identifierde.espirit.or.ORExceptionadd(Parameter)@NotNull List<Order> getOrders()
orders of this select. The sequence of the list defines the priority of the ordering.add(Order),
clearOrdering()boolean isOrdered(@NotNull String attributeName)
attributeName is already defined in this select.void add(@NotNull Order order)
orders of this select.getOrders(),
clearOrdering()void setFetchSize(int size)
EntityListreturned by executeQuery(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.getFetchSize()int getFetchSize()
setFetchSize(int)String getXML()
void clearOrdering()
order criterias of this select.add(Order),
getOrders()boolean containsParameter(@NotNull String identifier)
true if a parameter specified by the given identifier exists, false otherwiseint getMaxResultCount()
0 means no restriction (default).setMaxResultCount(int)void setMaxResultCount(int maxResultCount)
0 means no restriction
(default).getMaxResultCount()Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500