# Google Data APIs Client Library (1.43.0)

## com.google.gdata.client.contacts
Class ContactQuery

    java.lang.Object
      com.google.gdata.client.Query
          com.google.gdata.client.contacts.ContactQuery

    public class ContactQuery

extends Query

Describes a query for the following feeds:

- The feed of contacts
- The feed of contact groups

Nested Class Summary
`static class` `ContactQuery.OrderBy` Order of entries in a feed.
`static class` `ContactQuery.SortOrder` Direction of sorting.

Nested classes/interfaces inherited from class com.google.gdata.client.Query
`Query.CategoryFilter, Query.CustomParameter, Query.ResultFormat`

Field Summary

Fields inherited from class com.google.gdata.client.Query
`UNDEFINED`

Constructor Summary
`ContactQuery(java.net.URL feedUrl)` Constructs a new query object that targets a feed.

Method Summary
`java.lang.String` `getGroup()` Returns the group id.
`ContactQuery.OrderBy` `getOrderBy()` Returns the order of entries in a feed.
`java.lang.Boolean` `getShowDeleted()` Returns the should tombstones be returned.
`ContactQuery.SortOrder` `getSortOrder()` Returns the direction of sorting.
`void` `setGroup(java.lang.String group)` Sets the group id.
`void` `setOrderBy(ContactQuery.OrderBy orderBy)` Sets the order of entries in a feed.
`void` `setShowDeleted(java.lang.Boolean showDeleted)` Sets the should tombstones be returned.
`void` `setSortOrder(ContactQuery.SortOrder sortOrder)` Sets the direction of sorting.

Methods inherited from class com.google.gdata.client.Query

`addCategoryFilter, addCustomParameter, appendQueryParameter, getAuthor, getCategoryFilters, getCustomParameters, getCustomParameters, getFeedUrl, getFields, getFullTextQuery, getIntegerCustomParameter, getMaxResults, getPublishedMax, getPublishedMin, getQueryUri, getResultFormat, getStartIndex, getStringCustomParameter, getUpdatedMax, getUpdatedMin, getUrl, isStrict, isValidState, setAuthor, setFields, setFullTextQuery, setIntegerCustomParameter, setMaxResults, setPublishedMax, setPublishedMin, setResultFormat, setStartIndex, setStrict, setStringCustomParameter, setUpdatedMax, setUpdatedMin`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContactQuery

    public ContactQuery(java.net.URL feedUrl)

  Constructs a new query object that targets a feed. The initial state of the query contains no parameters, meaning all entries in the feed would be returned if the query was executed immediately after construction.

  Parameters:
    `feedUrl` - the URL of the feed against which queries will be executed.

Method Detail

### getGroup

    public java.lang.String getGroup()

  Returns the group id. Results are limited to contacts belonging to this group..

  Returns:
    group id or `null` to indicate that the parameter is not set.

### setGroup

    public void setGroup(java.lang.String group)

  Sets the group id. Results are limited to contacts belonging to this group..

  Parameters:
    `group` - group id or `null` to remove this parameter if set.

### getOrderBy

    public ContactQuery.OrderBy getOrderBy()

  Returns the order of entries in a feed.

  Returns:
    order of entries in a feed.

### setOrderBy

    public void setOrderBy(ContactQuery.OrderBy orderBy)

  Sets the order of entries in a feed.

  Parameters:
    `orderBy` - order of entries in a feed or `null` to reset this parameter to default value `ContactQuery.OrderBy.NONE`.

### getShowDeleted

    public java.lang.Boolean getShowDeleted()

  Returns the should tombstones be returned.

  Returns:
    should tombstones be returned.

### setShowDeleted

    public void setShowDeleted(java.lang.Boolean showDeleted)

  Sets the should tombstones be returned.

  Parameters:
    `showDeleted` - should tombstones be returned or `null` to reset this parameter to default value `false`.

### getSortOrder

    public ContactQuery.SortOrder getSortOrder()

  Returns the direction of sorting.

  Returns:
    direction of sorting.

### setSortOrder

    public void setSortOrder(ContactQuery.SortOrder sortOrder)

  Sets the direction of sorting.

  Parameters:
    `sortOrder` - direction of sorting or `null` to reset this parameter to default value `ContactQuery.SortOrder.NONE`.