com.bea.wli.config.resource
Class ResourceQuery

java.lang.Object
  extended by com.bea.wli.config.resource.BaseQuery
      extended by com.bea.wli.config.resource.ResourceQuery
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArchiveResourceQuery, JndiProviderQuery, ServiceAccountQuery, ServiceKeyProviderQuery, ServiceProviderQuery, ServiceQuery, SmtpServerQuery, UDDIRegistryEntryQuery, WsdlQuery, WsPolicyQuery, XmlSchemaQuery

public class ResourceQuery
extends BaseQuery
implements Serializable

Query for searching resources based on various properties

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
ResourceQuery(String typeId)
           
 
Method Summary
 void addKeySearch(String key, Object keyValue)
          Adds a filtering condition.
 void addSubQuery(ResourceQuery q)
          Adds a subquery to be performed over a subordinate type in addition to this query
 Collection<String> getAttrsToReturn()
           
 Map<String,Object> getFilter()
           
 String getLocalName()
           
 String getPath()
           
 Collection<ResourceQuery> getSubQueries()
           
 String getTypeId()
           
 Date getUpdatedAfter()
           
 Date getUpdatedBefore()
           
 boolean isChangedInSessionOnly()
           
 void lastUpdatedBetween(Date startDate, Date endDate)
          Adds a predicate to return the resource modified in between two dates.
 void setAttrsToReturn(Collection<String> attrsToReturn)
          Sets additional attributes to return.
 void setChangedInSessionOnly(boolean changedInSessionOnly)
          Adds a predicate to consider only the existing resources that have been modified (updated or created) in the session.
 void setLocalName(String localName)
          Adds a predicate to return only resource that have the given local name relative to their project / folder.
 void setPath(String path)
          Adds a predicate to return only resources under the given path
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ResourceQuery

public ResourceQuery(String typeId)
Parameters:
typeId - type id of the resources to be searched. If null all resource types are searched. For valid type ids please refer to Refs class
Method Detail

getTypeId

public String getTypeId()

getPath

public String getPath()

getLocalName

public String getLocalName()

getFilter

public Map<String,Object> getFilter()

getAttrsToReturn

public Collection<String> getAttrsToReturn()

getSubQueries

public Collection<ResourceQuery> getSubQueries()

getUpdatedAfter

public Date getUpdatedAfter()

getUpdatedBefore

public Date getUpdatedBefore()

isChangedInSessionOnly

public boolean isChangedInSessionOnly()

addKeySearch

public void addKeySearch(String key,
                         Object keyValue)
Adds a filtering condition.

Parameters:
key -
keyValue -

setPath

public void setPath(String path)
Adds a predicate to return only resources under the given path

Parameters:
path -

setLocalName

public void setLocalName(String localName)
Adds a predicate to return only resource that have the given local name relative to their project / folder.

Parameters:
localName -

setAttrsToReturn

public void setAttrsToReturn(Collection<String> attrsToReturn)
Sets additional attributes to return. If null or empty no additional attributes are returned.

Parameters:
attrsToReturn -

addSubQuery

public void addSubQuery(ResourceQuery q)
Adds a subquery to be performed over a subordinate type in addition to this query

Parameters:
q -

lastUpdatedBetween

public void lastUpdatedBetween(Date startDate,
                               Date endDate)
Adds a predicate to return the resource modified in between two dates. Only the last updated time of a resource is considered for this search. Dates are inclusive. A null value indicates an open ended query. i.e. If startDate is null, then it returns resources updated before the end date. If endDate == null, it then returns resources updated after startDate. If both are null this predicate will not be applied.

Parameters:
startDate - start date of the date range
endDate - end date of the date range
Since:
2.6

setChangedInSessionOnly

public void setChangedInSessionOnly(boolean changedInSessionOnly)
Adds a predicate to consider only the existing resources that have been modified (updated or created) in the session. Resources that no longer exists (because they have been deleted) are not considered.

Parameters:
changedInSessionOnly - a value of true causes only the resources that has been modified in the session to be considered. A false value however indicates that all resources be considered, regardless of updates.
Since:
2.6