Package org.vrspace.server.core
Interface VRObjectRepository
- 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
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault List<WorldStatus>
int
countUsers
(String worldId) int
countUsers
(String worldId, boolean active) default void
default void
deleteById
(String id) default void
deleteMembers
(Class<?> cls, VRObject obj) default void
deleteWorld
(World world) findGltfModelByUid
(String uid) findOwnership
(String ownerId, String ownedId) WARNING this doesn't return full, useful owned Entity - e.g.findUserData
(String objectId, String key) getAllInWorld
(String worldId) default Client
<T extends Embedded>
TgetOwnedObjects
(String clientId) WARNING this doesn't return full, useful owned VRObject - position and other members are missing - use listOwnedObjects insteaddefault Ownership
getOwnership
(String ownerId, String ownedId) getOwnersOf
(String objectId) WARNING this doesn't return full, useful owned Entity - position and other members are missing - use getOwners insteadgetPermanents
(String worldId) getPoints
(double x1, double y1, double z1, double x2, double y2, double z2) getTerrainPoint
(String terrainId, Long index) getTerrainPoints
(String terrainId) getWorldByName
(String name) listOwnedObjects
(String ownerId) listSubscriptions
(String clientId) listUserData
(String objectId) default void
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, existsById, 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
-
Field Details
-
log
static final org.slf4j.Logger log
-
-
Method Details
-
findById
-
deleteById
-
getPermanents
-
getClient
-
getAllInWorld
-
deleteWorld
-
getWorldByName
-
getRange
-
getRange
-
getPoints
-
getPoints
-
getMember
-
delete
-
deleteMembers
default void deleteMembers(Class<?> cls, VRObject obj) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
nullSafeDelete
-
findGltfModelByUid
-
findContentCategoryByName
-
listWorlds
-
countUsers
@Query("MATCH (o:Client) WHERE o.worldId = $worldId RETURN count(*)") int countUsers(String worldId) -
countUsers
@Query("MATCH (o:Client) WHERE o.worldId = $worldId AND o.active = $active RETURN count(*)") int countUsers(String worldId, boolean active) -
countUsers
-
getOwnedObjects
@Query("MATCH (obj:Entity)<-[owned:IS_OWNED]-(o:Ownership)-[owns:IS_OWNER]->(c:Client) WHERE c.id = $clientId RETURN o,owns,c,owned,obj") List<Ownership> getOwnedObjects(String clientId) WARNING this doesn't return full, useful owned VRObject - position and other members are missing - use listOwnedObjects instead- Parameters:
clientId
-- Returns:
- list of all ownerships
-
listOwnedObjects
-
getOwnersOf
@Query("MATCH (obj:Entity)<-[owned:IS_OWNED]-(o:Ownership)-[owns:IS_OWNER]->(c:Client) WHERE obj.id = $objectId RETURN o,owns,c,owned,obj") List<Ownership> getOwnersOf(String objectId) WARNING this doesn't return full, useful owned Entity - position and other members are missing - use getOwners instead- Returns:
- list of all owners
-
getOwners
-
findOwnership
@Query("MATCH (obj:Entity)<-[owned:IS_OWNED]-(o:Ownership)-[owns:IS_OWNER]->(c:Client) WHERE c.id = $ownerId AND obj.id = $ownedId RETURN o,owns,c,owned,obj") Optional<Ownership> findOwnership(String ownerId, String ownedId) WARNING this doesn't return full, useful owned Entity - e.g. VRObject position and other members are missing - use getOwnership instead -
getOwnership
-
getTerrainPoints
@Query("MATCH (tp:TerrainPoint)-[r:IS_POINT_OF]->(t:Terrain) WHERE t.id=$terrainId RETURN tp") Set<TerrainPoint> getTerrainPoints(String terrainId) -
getTerrainPoint
@Query("MATCH (tp:TerrainPoint)-[r:IS_POINT_OF]->(t:Terrain) WHERE t.id=$terrainId and tp.index=$index RETURN tp") TerrainPoint getTerrainPoint(String terrainId, Long index) -
listUserData
-
findUserData
-
listSubscriptions
@Query("MATCH (wps:WebPushSubscription)-[sc:SUBSCRIBED_CLIENT]->(c:Client) WHERE c.id=$clientId RETURN wps, sc, c") List<WebPushSubscription> listSubscriptions(String clientId)
-