com.microsoft.tfs.core.clients.workitem.query
Interface StoredQuery

All Superinterfaces:
java.lang.Comparable<StoredQuery>

public interface StoredQuery
extends java.lang.Comparable<StoredQuery>

Represents a stored query.

Since:
TEE-SDK-10.1

Method Summary
 Query createQuery(java.util.Map<java.lang.String,java.lang.Object> queryContext)
          Creates a new Query from this StoredQuery.
 java.util.Date getCreationTime()
           
 java.lang.String getDescription()
           
 java.util.Date getLastWriteTime()
           
 java.lang.String getName()
           
 java.lang.String getOwner()
           
 Project getProject()
           
 com.microsoft.tfs.util.GUID getQueryGUID()
           
 QueryScope getQueryScope()
           
 java.lang.String getQueryText()
           
 boolean isParsable()
           
 boolean isSaved()
           
 void reset()
          Resets all changes that were made to this query to the initial state.
 WorkItemCollection runQuery(java.util.Map<java.lang.String,java.lang.Object> queryContext)
          Runs this stored query directly.
 void setDescription(java.lang.String description)
          Sets the description of this stored query.
 void setName(java.lang.String name)
          Sets the name of this stored query.
 void setQueryScope(QueryScope scope)
          Sets the scope of this stored query.
 void setQueryText(java.lang.String text)
          Sets the query string.
 void update()
          Updates the stored query.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

reset

void reset()
Resets all changes that were made to this query to the initial state.


update

void update()
Updates the stored query.


getCreationTime

java.util.Date getCreationTime()
Returns:
the date and time that this stored query was created.

getDescription

java.lang.String getDescription()
Returns:
the description of this stored query.

setDescription

void setDescription(java.lang.String description)
Sets the description of this stored query.

Parameters:
description - the new description (may be null or empty)

isSaved

boolean isSaved()
Returns:
true if this stored query has been saved, false otherwise

getLastWriteTime

java.util.Date getLastWriteTime()
Returns:
the date and time that this stored query was created.

getName

java.lang.String getName()
Returns:
the name of this stored query.

setName

void setName(java.lang.String name)
Sets the name of this stored query.

Parameters:
name - the new name (must not be null)

getOwner

java.lang.String getOwner()
Returns:
the owner of this stored query.

getProject

Project getProject()
Returns:
he project that is associated with this stored query.

getQueryGUID

com.microsoft.tfs.util.GUID getQueryGUID()
Returns:
the GUID that is associated with this stored query.

getQueryScope

QueryScope getQueryScope()
Returns:
the scope of this stored query.

setQueryScope

void setQueryScope(QueryScope scope)
Sets the scope of this stored query.

Parameters:
scope - the QueryScope (must not be null)

getQueryText

java.lang.String getQueryText()
Returns:
the query string.

setQueryText

void setQueryText(java.lang.String text)
                  throws InvalidQueryTextException
Sets the query string.

Parameters:
text - the query string (must not be null or empty)
Throws:
InvalidQueryTextException - if the query text was not valid WIQL

createQuery

Query createQuery(java.util.Map<java.lang.String,java.lang.Object> queryContext)
                  throws InvalidQueryTextException
Creates a new Query from this StoredQuery.

Returns:
the new Query
Throws:
InvalidQueryTextException - if this StoredQuery's query text is not valid WIQL

runQuery

WorkItemCollection runQuery(java.util.Map<java.lang.String,java.lang.Object> queryContext)
                            throws InvalidQueryTextException
Runs this stored query directly. Equivalent to #createQuery(). #runQuery().

Returns:
the work items returned by the query
Throws:
InvalidQueryTextException - if this StoredQuery's query text is not valid WIQL

isParsable

boolean isParsable()
Returns:
true if the current query text is valid WIQL, false otherwise.


© 2015 Microsoft. All rights reserved.