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:
- Queries must include an entity name or key at the very least.
- Although it probably doesn't make any sense to do so, searching by the entity ID without the entity name is permitted, as long as the key is specified.
- Null and blank values are generally not permitted, including for the key prefix search.
- The offset is ignored unless maxResults is specified, and both are ignored for
count
queries.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
AnEntityPropertyQuery
for which sufficient contraints have been provided to make the query valid. -
Method Summary
Modifier and TypeMethodDescriptionRestricts the search by the entity ID.entityName
(String entityName) Restricts the search by the entity name, which can neither benull
nor blank.Restricts the search to the given property key, which can neither benull
nor blank.Restricts the search to the given property key prefix, which can neither benull
nor blank.maxResults
(int maxResults) The maximum number of results to return.offset
(int offset) The offset into the result list at which to begin.
-
Method Details
-
entityName
Restricts the search by the entity name, which can neither benull
nor blank. If this is not specified, then thekey
is required.- Parameters:
entityName
- the entity name; must not benull
or blank- Returns:
- this query, as an
EntityPropertyQuery.ExecutableQuery
, since specifying theentityName
is sufficient to form a valid query - Throws:
IllegalArgumentException
- ifentityName
isnull
or blank
-
key
Restricts the search to the given property key, which can neither benull
nor blank. If this is not specified, then theentity name
is required. This restriction is not compatible with akey prefix
restriction.- Parameters:
key
- the property key- Returns:
- this query, as an
EntityPropertyQuery.ExecutableQuery
, since specifying thekey
is sufficient to form a valid query - Throws:
IllegalArgumentException
- ifkey
isnull
or blankIllegalStateException
- ifkeyPrefix(String)
has already been specified
-
entityId
Restricts the search by the entity ID. This may be specified without specifying the entity name (so long as thekey
has been provided), but doing so probably does not make any sense.- Parameters:
entityId
- the entity ID- Returns:
- this query
- Throws:
IllegalArgumentException
- ifentityId
isnull
-
keyPrefix
Restricts the search to the given property key prefix, which can neither benull
nor blank. Theentity name
is required to use this restriction, which is not compatible with akey
restriction.- Parameters:
keyPrefix
- the property key prefix- Returns:
- this query
- Throws:
IllegalArgumentException
- ifkeyPrefix
isnull
or blankIllegalStateException
- ifkey(String)
has already been specified
-
offset
The offset into the result list at which to begin. You must also specifymax 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
The maximum number of results to return. You must specify this value to use anoffset
.- Parameters:
maxResults
- the maximum results to return. Nonsensical values like-42
are silently ignored.- Returns:
- this query
-