Package org.vrspace.server.core
Interface VRObjectRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Entity,
,Long> org.springframework.data.neo4j.repository.Neo4jRepository<Entity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<Entity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Entity>
,org.springframework.data.repository.Repository<Entity,
,Long> VRSpaceDB
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault List<WorldStatus>
int
countUsers
(long worldId) int
countUsers
(long worldId, boolean active) default void
default void
deleteById
(Long id) default void
deleteMembers
(Class<?> cls, VRObject obj) default void
deleteWorld
(World world) findGltfModelByUid
(String uid) findOwnership
(long ownerId, long ownedId) WARNING this doesn't return full, useful owned Entity - e.g.findUserData
(long objectId, String key) getAllInWorld
(Long worldId) default Client
<T extends Embedded>
TgetOwnedObjects
(long clientId) WARNING this doesn't return full, useful owned VRObject - position and other members are missing - use listOwnedObjects insteadgetOwners
(long objectId) default Ownership
getOwnership
(long ownerId, long ownedId) getOwnersOf
(long objectId) WARNING this doesn't return full, useful owned Entity - position and other members are missing - use getOwners insteadgetPermanents
(Long worldId) getPoints
(double x1, double y1, double z1, double x2, double y2, double z2) getTerrainPoint
(Long terrainId, Long index) getTerrainPoints
(Long terrainId) getWorldByName
(String name) listOwnedObjects
(long ownerId) listSubscriptions
(long clientId) listUserData
(long 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(long worldId) -
countUsers
@Query("MATCH (o:Client) WHERE o.worldId = $worldId AND o.active = $active RETURN count(*)") int countUsers(long worldId, boolean active) -
countUsers
-
getOwnedObjects
@Query("MATCH (obj:Entity)<-[owned:IS_OWNED]-(o:Ownership)-[owns:IS_OWNER]->(c:Client) WHERE ID(c) = $clientId RETURN o,owns,c,owned,obj") List<Ownership> getOwnedObjects(long 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 ID(obj) = $objectId RETURN o,owns,c,owned,obj") List<Ownership> getOwnersOf(long 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 ID(c) = $ownerId AND ID(obj) = $ownedId RETURN o,owns,c,owned,obj") Optional<Ownership> findOwnership(long ownerId, long 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 ID(t)=$terrainId RETURN tp") Set<TerrainPoint> getTerrainPoints(Long terrainId) -
getTerrainPoint
@Query("MATCH (tp:TerrainPoint)-[r:IS_POINT_OF]->(t:Terrain) WHERE ID(t)=$terrainId and tp.index=$index RETURN tp") TerrainPoint getTerrainPoint(Long terrainId, Long index) -
listUserData
-
findUserData
-
listSubscriptions
@Query("MATCH (wps:WebPushSubscription)-[sc:SUBSCRIBED_CLIENT]->(c:Client) WHERE ID(c)=$clientId RETURN wps, sc, c") List<WebPushSubscription> listSubscriptions(long clientId)
-