@Deprecated public class QueryOptions extends Object implements Transferable
The includes in this class correspond
directly to the includes in
Include
.
The include options will be set to TRUE if nothing
else is specified.
Modifier and Type | Field and Description |
---|---|
private boolean |
includeInProject
Deprecated.
Include items from the active project.
|
private boolean |
includeMine
Deprecated.
Include items that belongs to the logged in user.
|
private boolean |
includeNotRemoved
Deprecated.
|
private boolean |
includeOthers
Deprecated.
Include items that belong to other users.
|
private boolean |
includeShared
Deprecated.
Include items, shared to the logged in user.
|
private QueryParameter[] |
parameters
Deprecated.
|
private String |
prefix
Deprecated.
The prefix that represent a root alias in
a query.
|
private String |
restriction
Deprecated.
A restriction to set on
the query.
|
Constructor and Description |
---|
QueryOptions()
Deprecated.
An empty constructor.
|
QueryOptions(Boolean includeMine,
Boolean includeShared,
Boolean includeInProject,
Boolean includeOthers,
String restriction,
String prefix)
Deprecated.
Constructor where the parameters is set from start.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getIncludeInProject()
Deprecated.
Gets if items in the project that is currently active should be included.
|
boolean |
getIncludeMine()
Deprecated.
Gets if items of logged in user should be included
|
boolean |
getIncludeNotRemoved()
Deprecated.
Include not removed items
|
boolean |
getIncludeOthers()
Deprecated.
Gets if other users' item should be included in the query
|
boolean |
getIncludeShared()
Deprecated.
Gets if items shared to the logged in user should
be included or not
|
QueryParameter[] |
getParameters()
Deprecated.
Get the parameters used in this query.
|
String |
getRestriction()
Deprecated.
Gets the restriction for this QueryOptions
|
String |
getRestrictionPrefix()
Deprecated.
Gets the prefix used with the restriction/expression
in this object.
|
void |
setIncludeInProject(boolean includeInProject)
Deprecated.
Sets if items in currently active project should be included.
|
void |
setIncludeMine(boolean includeMine)
Deprecated.
Sets if the logged in user's items should be included or not.
|
void |
setIncludeNotRemoved(boolean include)
Deprecated.
Sets if not removed items should be included
|
void |
setIncludeOthers(boolean includeOthers)
Deprecated.
Sets if other users' items should be included.
|
void |
setIncludeShared(boolean includeShared)
Deprecated.
Sets if items shared to logged in user should be included.
|
void |
setParameters(QueryParameter[] parameters)
Deprecated.
Set the parmeters to use in this query.
|
void |
setRestriction(String restriction)
Deprecated.
Sets restriction for these query options.
|
void |
setRestrictionPrefix(String prefix)
Deprecated.
Sets the prefix to use in restrictions or expression
|
void |
setRestrictionWithPrefix(String restriction,
String prefix)
Deprecated.
Sets both the restriction and the prefix with it.
|
private boolean includeMine
private boolean includeShared
private boolean includeInProject
private boolean includeOthers
private boolean includeNotRemoved
private QueryParameter[] parameters
private String restriction
private String prefix
restriction
and will be replaced when the restriction is
inserted into a HQL query.public QueryOptions()
public QueryOptions(Boolean includeMine, Boolean includeShared, Boolean includeInProject, Boolean includeOthers, String restriction, String prefix)
includeMine
- TRUE if logged in user's items should be included.includeShared
- TRUE if items shared to logged in user should be included.includeInProject
- TRUE if items in the active project should be included.includeOthers
- TRUE if other users' items should be included.restriction
- A Restriction
as a string.prefix
- Prefix used in the restriction.public void setIncludeMine(boolean includeMine)
includeMine
- TRUE to include logged in user's items, otherwise FALSEpublic boolean getIncludeMine()
public void setIncludeShared(boolean includeShared)
includeShared
- TRUE to include shared items, otherwise FALSE.public boolean getIncludeShared()
public void setIncludeInProject(boolean includeInProject)
includeInProject
- TRUE to include, FALSE otherwise.public boolean getIncludeInProject()
public void setIncludeOthers(boolean includeOthers)
includeOthers
- TRUE if the item should be included, FALSE otherwise.public boolean getIncludeOthers()
public void setIncludeNotRemoved(boolean include)
include
- TRUE(default) to include.public boolean getIncludeNotRemoved()
public void setRestriction(String restriction)
The string must be in right format so it can be inserted
directly into a hql query. The restriction string
can contain a prefix, but it has to be set separatly
setRestrictionPrefix(String)
.
Example how this property can be used together with the prefix:
$name='item1'
When this string is used in a query, ie that select users, it will look like this:
usr.name='item1'.
restriction
- A restriction as a string to use with HQL queries.public String getRestriction()
public void setRestrictionPrefix(String prefix)
prefix
- A prefix where the root-alias should be put.public String getRestrictionPrefix()
public void setRestrictionWithPrefix(String restriction, String prefix)
restriction
- A string with a valid hql restriction.prefix
- A string that is used where root-alias should be put in
the restriction/expression.public QueryParameter[] getParameters()
public void setParameters(QueryParameter[] parameters)
parameters
- An array of query parameters, may be null or empty
if not parameters are used