com.atlassian.jira.entity.property
Interface EntityPropertyQuery<T extends EntityPropertyQuery<T>>

All Known Subinterfaces:
EntityPropertyQuery.ExecutableQuery

@ExperimentalApi
public interface EntityPropertyQuery<T extends EntityPropertyQuery<T>>

A query builder for requests to the JsonEntityPropertyManager.

Notes:


Nested Class Summary
static interface EntityPropertyQuery.ExecutableQuery
          An EntityPropertyQuery for which sufficient contraints have been provided to make the query valid.
 
Method Summary
 T entityId(Long entityId)
          Restricts the search by the entity ID.
 EntityPropertyQuery.ExecutableQuery entityName(String entityName)
          Restricts the search by the entity name, which can neither be null nor blank.
 EntityPropertyQuery.ExecutableQuery key(String key)
          Restricts the search to the given property key, which can neither be null nor blank.
 T keyPrefix(String keyPrefix)
          Restricts the search to the given property key prefix, which can neither be null nor blank.
 T maxResults(int maxResults)
          The maximum number of results to return.
 T offset(int offset)
          The offset into the result list at which to begin.
 

Method Detail

entityName

EntityPropertyQuery.ExecutableQuery entityName(@Nonnull
                                               String entityName)
Restricts the search by the entity name, which can neither be null nor blank. If this is not specified, then the key is required.

Parameters:
entityName - the entity name; must not be null or blank
Returns:
this query, as an EntityPropertyQuery.ExecutableQuery, since specifying the entityName is sufficient to form a valid query
Throws:
IllegalArgumentException - if entityName is null or blank

key

EntityPropertyQuery.ExecutableQuery key(@Nonnull
                                        String key)
Restricts the search to the given property key, which can neither be null nor blank. If this is not specified, then the entity name is required. This restriction is not compatible with a key prefix restriction.

Parameters:
key - the property key
Returns:
this query, as an EntityPropertyQuery.ExecutableQuery, since specifying the key is sufficient to form a valid query
Throws:
IllegalArgumentException - if key is null or blank
IllegalStateException - if keyPrefix(String) has already been specified

entityId

T entityId(@Nonnull
           Long entityId)
Restricts the search by the entity ID. This may be specified without specifying the entity name (so long as the key has been provided), but doing so probably does not make any sense.

Parameters:
entityId - the entity ID
Returns:
this query
Throws:
IllegalArgumentException - if entityId is null

keyPrefix

T keyPrefix(@Nonnull
            String keyPrefix)
Restricts the search to the given property key prefix, which can neither be null nor blank. The entity name is required to use this restriction, which is not compatible with a key restriction.

Parameters:
keyPrefix - the property key prefix
Returns:
this query
Throws:
IllegalArgumentException - if keyPrefix is null or blank
IllegalStateException - if key(String) has already been specified

offset

T offset(int offset)
The offset into the result list at which to begin. You must also specify max results to use this feature.

Parameters:
offset - the (0-based) index offset into the complete results. Nonsensical values like -42 are silently ignored.
Returns:
this query

maxResults

T maxResults(int maxResults)
The maximum number of results to return. You must specify this value to use an offset.

Parameters:
maxResults - the maximum results to return. Nonsensical values like -42 are silently ignored.
Returns:
this query


Copyright © 2002-2014 Atlassian. All Rights Reserved.