Package org.vrspace.server.core
Interface GroupRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Entity,
,String> org.springframework.data.neo4j.repository.Neo4jRepository<Entity,
,String> org.springframework.data.repository.PagingAndSortingRepository<Entity,
,String> org.springframework.data.repository.query.QueryByExampleExecutor<Entity>
,org.springframework.data.repository.Repository<Entity,
,String> VRSpaceDB
-
Method Summary
Modifier and TypeMethodDescriptionfindGroupById
(String clientId, String groupId) findGroupByName
(String groupName) findGroupByName
(String clientId, String groupName) findGroupMember
(String groupId, String clientId) listGroupClients
(String groupId) listGroupMembers
(String groupId) listGroupMemberships
(String clientId) listGroupOwners
(String groupId) listOwnedGroups
(String clientId) listPendingInvitations
(String clientId) listPendingRequests
(String groupId) listUserGroups
(String clientId) messagesSince
(String groupId, Instant since) unreadMessageCount
(String groupId, Instant since) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.neo4j.repository.Neo4jRepository
findAll, findAll, findAll, findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
Methods inherited from interface org.vrspace.server.core.VRSpaceDB
deleteById, findById, get, get, getClientByName, getClientByName
-
Method Details
-
listOwnedGroups
-
listGroupOwners
-
listUserGroups
-
listGroupMemberships
@Query("MATCH (c:Client)<-[mc:MEMBER_CLIENT]-(gm:GroupMember)-[r:IS_MEMBER_OF]->(ug:UserGroup) WHERE c.id=$clientId AND gm.pendingInvite IS NULL AND gm.pendingRequest IS NULL RETURN gm, r, ug ORDER BY ug.name") List<GroupMember> listGroupMemberships(String clientId) -
listGroupClients
-
listGroupMembers
@Query("MATCH (gm:GroupMember)-[r:IS_MEMBER_OF]->(ug:UserGroup) WHERE ug.id=$groupId AND gm.pendingRequest IS NULL AND gm.pendingInvite IS NULL RETURN gm, r, ug") List<GroupMember> listGroupMembers(String groupId) -
findGroupMember
@Query("MATCH (c:Client)<-[mc:MEMBER_CLIENT]-(gm:GroupMember)-[r:IS_MEMBER_OF]->(ug:UserGroup) WHERE ug.id=$groupId AND c.id=$clientId RETURN gm, c, mc, r, ug") Optional<GroupMember> findGroupMember(String groupId, String clientId) -
findGroupByName
-
findGroupById
-
findGroupByName
-
listPendingRequests
@Query("MATCH (c:Client)<-[mc:MEMBER_CLIENT]-(gm:GroupMember)-[r:IS_MEMBER_OF]->(ug:UserGroup) WHERE ug.id=$groupId AND gm.pendingRequest IS NOT NULL RETURN gm, c, mc, r, ug") List<GroupMember> listPendingRequests(String groupId) -
listPendingInvitations
@Query("MATCH (c:Client)<-[mc:MEMBER_CLIENT]-(gm:GroupMember)-[r:IS_MEMBER_OF]->(ug:UserGroup), (s:Client)<-[sc:SPONSOR_CLIENT]-(gm:GroupMember) WHERE c.id=$clientId AND gm.pendingInvite IS NOT NULL RETURN gm, c, mc, r, ug, sc, s ORDER BY ug.name") List<GroupMember> listPendingInvitations(String clientId) -
unreadMessageCount
-
messagesSince
@Query("MATCH (c:Client)<-[mc:SENDER_CLIENT]-(msg:GroupMessage)-[r:PARENT_GROUP]->(ug:UserGroup) WHERE ug.id=$groupId AND ($since IS NULL OR msg.timestamp >= $since) return msg, mc, c ORDER BY msg.timestamp") List<GroupMessage> messagesSince(String groupId, Instant since)
-