ccc.persistence
Interface GroupRepository

All Known Implementing Classes:
GroupRepositoryImpl

public interface GroupRepository

API for group repositories.

Author:
Civic Computing Ltd.

Method Summary
 void create(GroupEntity g)
          Create a new group in the repository.
 GroupEntity find(java.util.UUID groupId)
          Look up a group from its Id.
 java.util.Collection<GroupEntity> list(java.lang.String name, int pageNo, int pageSize)
          List groups.
 long totalCount(java.lang.String name)
          Return number of group entities with given filter.
 

Method Detail

find

GroupEntity find(java.util.UUID groupId)
Look up a group from its Id.

Parameters:
groupId - The UUID for the group.
Returns:
The group corresponding to 'groupId'.

create

void create(GroupEntity g)
Create a new group in the repository.

Parameters:
g - The group to create.

list

java.util.Collection<GroupEntity> list(java.lang.String name,
                                       int pageNo,
                                       int pageSize)
List groups.

Parameters:
name - Filter groups based on name. NULL disables the filter.
pageNo - The page of results to return.
pageSize - The number of results in a page.
Returns:
A list of groups matching the search criteria.

totalCount

long totalCount(java.lang.String name)
Return number of group entities with given filter.

Parameters:
name - Filter groups based on name. NULL disables the filter.
Returns:
The amount of the entities.


Copyright © 2010. All Rights Reserved.