The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Usergrid::Collection - a Usergrid collection

DESCRIPTION

Encapsulates Usergrid collections and provides methods for iterating and paging through them.

ATTRIBUTES

object

A hash reference with the collection data

uri

The URI from which this collection was retrieved

auto_page

When set, the collection will automatically move to the next page when iterating through the collection

METHODS

has_next_entity

Returns true if there's another entity available during iteration.

get_next_entity

Returns the next available Usergrid::Entity. If there's no entity available to return, it returns a FALSE. If the auto_page attribute it set, the next page is automatically fetched and the next entity is returned.

count

Returns the count of the items in the collection.

reset_iterator

Rewinds the iterator back to the beginning.

get_first_entity

Returns the first entity in the collection. This is only applicable for the current page of the collection.

get_last_entity

Returns the last entity in the collection. This is only applicable for the current page of the collection.

get_next_page

Fetches the next page in the collection. Returns false when there are no more reults.

get_prev_page

Fetches the previous page in the collection. Returns false when there are no more reults.

SEE ALSO

Usergrid::Client, Usergrid::Entity, Usergrid::Request

LICENSE

This software is distributed under the Apache 2 license.

AUTHOR

Anuradha Weeraman <anuradha@cpan.org>