Class ContactsDataProvider

    • Constructor Detail

      • ContactsDataProvider

        public ContactsDataProvider​(ContactDao dao)
    • Method Detail

      • setQueryParam

        public void setQueryParam​(QueryParam queryParam)
      • iterator

        public Iterator<Contact> iterator​(long first,
                                          long count)
        Gets an iterator for the subset of contacts.
        Specified by:
        iterator in interface IDataProvider<Contact>
        Parameters:
        first - offset for the first row of data to retrieve
        count - number of rows to retrieve
        Returns:
        iterator capable of iterating over {first, first+count} contacts
      • size

        public long size()
        Gets total number of items in the collection.
        Specified by:
        size in interface IDataProvider<Contact>
        Returns:
        total item count
      • model

        public IModel<Contact> model​(Contact object)
        Converts the object in the collection to its model representation. A good place to wrap the object in a detachable model.
        Specified by:
        model in interface IDataProvider<Contact>
        Parameters:
        object - The object that needs to be wrapped
        Returns:
        The model representation of the object