com.starteam
Class Query.WebCacheQuery

java.lang.Object
  extended by com.starteam.Query.WebCacheQuery
All Implemented Interfaces:
ArtifactCacheManager.Securable
Enclosing class:
Query

public static class Query.WebCacheQuery
extends java.lang.Object
implements ArtifactCacheManager.Securable

Base accessor for cached SDK types encapsulating the statefulness of objects obtained from the artifact cache.


Method Summary
static Query.WebCacheQuery create(ArtifactCacheManager.Context cntxt, ViewMember.Type.WebCacheViewMemberType type, boolean isPublic, java.lang.String name, QueryNode.WebCacheQueryNode node)
          Create a new Query
 boolean equals(java.lang.Object o)
          Test this object for equality with another
 boolean evaluate(ViewMember.WebCacheViewMember vm)
          Evaluates the query on the given view member, based on the underlying user context.
 ArtifactCacheManager.Context getContext()
          Returns the context of this object.
 User.WebCacheUser getCreatedBy()
          Return the user who created this query.
 DateTime getCreatedTime()
          Return the created time of this query.
 int getID()
          Returns the internal ID of the filter.
 User.WebCacheUser getModifiedBy()
          Return the user who last modified this query.
 DateTime getModifiedTime()
          Return the last modified time of this query.
 java.lang.String getName()
          Returns the display name of the query.
 User.WebCacheUser getOwnedBy()
          Return the user who owns this query, Return null if it is a public query.
 int getPresentationID()
          Returns the unique integer identifier for this query.
 Project.WebCacheProject[] getProjects()
          Return the projects (associated with this query) visible in the current user context
 Property.WebCacheProperty[] getProperties()
          Returns the property IDs used by any of the QueryNode and QueryPart objects comprising this query.
 QueryNode.WebCacheQueryNode getQueryNode()
          Return the boolean expression defining this query.
 ACE.WebCacheACE[] getRights()
          Return the access rights assigned to this query
 Type.WebCacheType getType()
          Return the type for this query.
 int hashCode()
          Return a hash code for this object
 boolean isDeleted()
          Returns true if this query has been deleted
 boolean isDirty()
          Return true if this object is dirty
 boolean isPublic()
          Return true if the query is publicly visible.
 void makePublic()
          Make this query public.
 void remove()
          Remove this Query from the repository This is an atomic operation, and cannot be executed in a transaction
 void setName(java.lang.String name)
          Sets the name of the query.
 void setProjects(Project.WebCacheProject[] pp)
          Creates an association between a set of Projects and this query.
 void setQueryNode(QueryNode.WebCacheQueryNode node)
          Sets the boolean expression used to define this query.
 void setRights(ACE.WebCacheACE[] aces)
          Assign the specified access rights to this query
 java.lang.String toStarTeamURL()
          Resolves this StarTeam resource to a corresponding URL using an ID based scheme
 void update()
          Save this dirty Filter to the Repository This is an atomic operation, not executed in a transaction
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Query.WebCacheQuery create(ArtifactCacheManager.Context cntxt,
                                         ViewMember.Type.WebCacheViewMemberType type,
                                         boolean isPublic,
                                         java.lang.String name,
                                         QueryNode.WebCacheQueryNode node)
Create a new Query

Parameters:
cntxt - the User Web Session Context
type - the supporting type for the query
name - the query name
isPublic - true for a public query
node - the QueryNode tree representing the parts of the query
Returns:
a newly created Query in the context of the ArtifactCacheManager's server

getContext

public ArtifactCacheManager.Context getContext()
Returns the context of this object.

Returns:
the context of this object.

isDirty

public boolean isDirty()
Return true if this object is dirty

Returns:
true if this object is dirty

isDeleted

public boolean isDeleted()
Returns true if this query has been deleted

Returns:
true if this query has been deleted

evaluate

public boolean evaluate(ViewMember.WebCacheViewMember vm)
Evaluates the query on the given view member, based on the underlying user context. returns true if the artifact passes the evaluation, false otherwise The query type must match the view member type and the query must evaluate in the user context. i.e. the query is a 'Me' query and the tree of Query Nodes/Query Parts contain at least one part which will evaluated in the context of a given user

Parameters:
viewMember - the view member to evaluate for inclusion by the query
Returns:
result of the query evaluation

getName

public java.lang.String getName()
Returns the display name of the query.

Returns:
the display name of the query.

setName

public void setName(java.lang.String name)
Sets the name of the query. Cannot be null.

Parameters:
name - the name to be given to this query

isPublic

public boolean isPublic()
Return true if the query is publicly visible.

Returns:
true if the query is publicly visible.

makePublic

public void makePublic()
Make this query public. You must call update() to make the change take take effect.


toStarTeamURL

public java.lang.String toStarTeamURL()
Resolves this StarTeam resource to a corresponding URL using an ID based scheme

Returns:
a String URL that uniquely identifies this resource

update

public void update()
Save this dirty Filter to the Repository This is an atomic operation, not executed in a transaction


getID

public int getID()
Returns the internal ID of the filter. This will be negative for a filter not yet saved in the repository.

Returns:
the internal ID of the filter

getPresentationID

public int getPresentationID()
Returns the unique integer identifier for this query. on pre 14.0 servers, it returns the queryID

Returns:
the unique integer identifier for this query.

getType

public Type.WebCacheType getType()
Return the type for this query.

Returns:
the type for this query.

getProperties

public Property.WebCacheProperty[] getProperties()
Returns the property IDs used by any of the QueryNode and QueryPart objects comprising this query.


remove

public void remove()
Remove this Query from the repository This is an atomic operation, and cannot be executed in a transaction


setRights

public void setRights(ACE.WebCacheACE[] aces)
Assign the specified access rights to this query

Parameters:
aces - the rights to be assigned

getRights

public ACE.WebCacheACE[] getRights()
Return the access rights assigned to this query

Returns:
the access rights assigned to this query

getQueryNode

public QueryNode.WebCacheQueryNode getQueryNode()
Return the boolean expression defining this query.

Returns:
the boolean expression defining this query.

setQueryNode

public void setQueryNode(QueryNode.WebCacheQueryNode node)
Sets the boolean expression used to define this query. Cannot be null.

Parameters:
node - the new expression to define this query. Cannot be null.

equals

public boolean equals(java.lang.Object o)
Test this object for equality with another

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to test against

hashCode

public int hashCode()
Return a hash code for this object

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this object

getCreatedTime

public DateTime getCreatedTime()
Return the created time of this query.

Returns:
the created time of this query.

getModifiedTime

public DateTime getModifiedTime()
Return the last modified time of this query.

Returns:
the last modified time of this query.

getModifiedBy

public User.WebCacheUser getModifiedBy()
Return the user who last modified this query.

Returns:
the user who last modified this query.

getCreatedBy

public User.WebCacheUser getCreatedBy()
Return the user who created this query.

Returns:
the user who created this query.

getOwnedBy

public User.WebCacheUser getOwnedBy()
Return the user who owns this query, Return null if it is a public query.

Returns:
the user who owns this query.

getProjects

public Project.WebCacheProject[] getProjects()
Return the projects (associated with this query) visible in the current user context

Returns:
projects (associated with this query) visible in the current user context

setProjects

public void setProjects(Project.WebCacheProject[] pp)
Creates an association between a set of Projects and this query. Project Query relationships were introduced in server release 14.0 specify NULL to disassociate any projects from this query

Parameters:
pp - the set of projects to associate with this query


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.