|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.SearchRequest
@PublicApi public class SearchRequest
A shareable representation of a search for issues. Officially known as a "Filter" or "Saved Filter".
This class binds the Query
, which is used to perform the actual search, and
the saved information (such as name, description), and any permissions that may be associated with the saved search
together.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntity |
---|
SharedEntity.Identifier, SharedEntity.SharePermissions, SharedEntity.TypeDescriptor<S extends SharedEntity> |
Field Summary | |
---|---|
static SharedEntity.TypeDescriptor<SearchRequest> |
ENTITY_TYPE
|
Constructor Summary | |
---|---|
SearchRequest()
A no-arg constructor that will build a SearchRequest with an empty Query , this
will be a search that will find all issues with the default system sorting . |
|
SearchRequest(Query query)
Creates a SearchRequest with the specified Query and no other attributes. |
|
SearchRequest(Query query,
ApplicationUser owner,
String name,
String description)
Build a SearchRequest with the provided attributes, this can be used if you want to create a SearchRequest that can be persisted. |
|
SearchRequest(Query query,
ApplicationUser owner,
String name,
String description,
Long id,
long favouriteCount)
Build a SearchRequest with the provided attributes. |
|
SearchRequest(Query query,
String ownerUserName,
String name,
String description)
Deprecated. Use SearchRequest(com.atlassian.query.Query, com.atlassian.jira.user.ApplicationUser, String, String) instead. Since v6.0.
Build a SearchRequest with the provided attributes, this can be used if you want to create a SearchRequest that
can be persisted. |
|
SearchRequest(Query query,
String ownerUserName,
String name,
String description,
Long id,
long favouriteCount)
Deprecated. Use SearchRequest(com.atlassian.query.Query, com.atlassian.jira.user.ApplicationUser, String, String, Long, long) instead. Since v6.0.
Build a SearchRequest with the provided attributes. |
|
SearchRequest(SearchRequest oldRequest)
Used to create a SearchRequest that copies all the information from the old search request. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getDescription()
A general description of the entity. |
SharedEntity.TypeDescriptor<SearchRequest> |
getEntityType()
The type of entity it is. |
Long |
getFavouriteCount()
The number of users who have marked this entity as one of their favourites. |
Long |
getId()
The id of the entity. |
String |
getName()
The name of the entity. |
ApplicationUser |
getOwner()
|
String |
getOwnerUserName()
|
SharedEntity.SharePermissions |
getPermissions()
The permissions for this entity. |
Query |
getQuery()
Gets the SearchQuery that defines the search that will be performed for this SearchRequest. |
int |
hashCode()
|
boolean |
isLoaded()
|
boolean |
isModified()
|
void |
setDescription(String description)
|
protected void |
setFavouriteCount(Long favouriteCount)
|
void |
setModified(boolean modified)
|
void |
setName(String name)
|
void |
setOwner(ApplicationUser owner)
Set the owner of the SearchRequest. |
void |
setOwnerUserName(String ownerUserName)
Deprecated. Use setOwner(com.atlassian.jira.user.ApplicationUser) instead. Since v6.0.
Set the owner of the SearchRequest. |
void |
setPermissions(SharedEntity.SharePermissions sharePermissions)
|
void |
setQuery(Query query)
|
void |
setUseColumns(boolean useColumns)
|
String |
toString()
|
boolean |
useColumns()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SharedEntity.TypeDescriptor<SearchRequest> ENTITY_TYPE
Constructor Detail |
---|
public SearchRequest()
Query
, this
will be a search that will find all issues with the default system sorting . You can then use the setter methods
to set the attributes you wish this SearchRequest to contain.
public SearchRequest(Query query)
Query
and no other attributes.
This can be used to create a programtic SearchRequest that can be used to perform a search but is not ready to
be saved.
query
- provides the details of the search that will be performed with this SearchRequest.public SearchRequest(SearchRequest oldRequest)
oldRequest
- defines all the attributes that this SearchRequest will contain.public SearchRequest(Query query, ApplicationUser owner, String name, String description)
query
- defines what this SearchRequest will search for.owner
- the owner, user who initially create the request.name
- the name associated with this SearchRequest, can be set even if this is not persistent yet.description
- the description associated with this SearchRequest, can be set even if this is not persistent yet.
filter.public SearchRequest(Query query, ApplicationUser owner, String name, String description, Long id, long favouriteCount)
query
- defines what this SearchRequest will search for.owner
- the owner, user who initially create the request.name
- the name associated with this SearchRequest, can be set even if this is not persistent yet.description
- the description associated with this SearchRequest, can be set even if this is not persistent yet.id
- the persistent id of the SearchRequest, null if the SearchRequest is not persistent.favouriteCount
- the number of users that have this filter as a favortie, will only be set if this is a persistent
filter.public SearchRequest(Query query, String ownerUserName, String name, String description)
SearchRequest(com.atlassian.query.Query, com.atlassian.jira.user.ApplicationUser, String, String)
instead. Since v6.0.
Build a SearchRequest with the provided attributes, this can be used if you want to create a SearchRequest that
can be persisted.
query
- defines what this SearchRequest will search for.ownerUserName
- the owner, user who initially create the request.name
- the name associated with this SearchRequest, can be set even if this is not persistent yet.description
- the description associated with this SearchRequest, can be set even if this is not persistent yet.
filter.public SearchRequest(Query query, String ownerUserName, String name, String description, Long id, long favouriteCount)
SearchRequest(com.atlassian.query.Query, com.atlassian.jira.user.ApplicationUser, String, String, Long, long)
instead. Since v6.0.
Build a SearchRequest with the provided attributes.
query
- defines what this SearchRequest will search for.ownerUserName
- the owner, user who initially create the request.name
- the name associated with this SearchRequest, can be set even if this is not persistent yet.description
- the description associated with this SearchRequest, can be set even if this is not persistent yet.id
- the persistent id of the SearchRequest, null if the SearchRequest is not persistent.favouriteCount
- the number of users that have this filter as a favortie, will only be set if this is a persistent
filter.Method Detail |
---|
@Nonnull public Query getQuery()
public void setQuery(Query query)
public String getName()
SharedEntity
getName
in interface SharedEntity
public void setName(String name)
public Long getId()
SharedEntity
getId
in interface SharedEntity
public SharedEntity.SharePermissions getPermissions()
SharedEntity
getPermissions
in interface SharedEntity
public void setPermissions(SharedEntity.SharePermissions sharePermissions)
public String getDescription()
SharedEntity
getDescription
in interface SharedEntity
public ApplicationUser getOwner()
getOwner
in interface SharedEntity
public String getOwnerUserName()
getOwnerUserName
in interface SharedEntity
public void setDescription(String description)
protected void setFavouriteCount(Long favouriteCount)
public Long getFavouriteCount()
Favourite
getFavouriteCount
in interface Favourite
public void setOwner(ApplicationUser owner)
owner
- the user who is the search requests owner.public void setOwnerUserName(String ownerUserName)
setOwner(com.atlassian.jira.user.ApplicationUser)
instead. Since v6.0.
Set the owner of the SearchRequest.
ownerUserName
- the name of the user who is the search requests owner.public boolean isModified()
public void setModified(boolean modified)
public boolean isLoaded()
public boolean useColumns()
public void setUseColumns(boolean useColumns)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public final SharedEntity.TypeDescriptor<SearchRequest> getEntityType()
SharedEntity
getEntityType
in interface SharedEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |