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
-
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 VRObject - position and other members are missing - use getOwnership insteadgetAllInWorld
(Long worldId) default Client
<T extends Embedded>
TgetOwned
(long ownerId) getOwners
(long objectId) default Ownership
getOwnership
(long ownerId, long ownedId) getOwnerships
(long clientId) WARNING this doesn't return full, useful owned VRObject - position and other members are missing - use getOwned insteadgetOwnersOf
(long objectId) WARNING this doesn't return full, useful owned VRObject - 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) 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, 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
-
getOwnerships
@Query("MATCH (obj:VRObject)<-[owned:IS_OWNED]-(o:Ownership)-[owns:IS_OWNER]->(c:Client) WHERE ID(c) = $clientId RETURN o,owns,c,owned,obj") List<Ownership> getOwnerships(long clientId) WARNING this doesn't return full, useful owned VRObject - position and other members are missing - use getOwned instead- Parameters:
clientId
-- Returns:
- list of all ownerships
-
getOwned
-
getOwnersOf
@Query("MATCH (obj:VRObject)<-[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 VRObject - position and other members are missing - use getOwners instead- Parameters:
objectIdId
-- Returns:
- list of all owners
-
getOwners
-
findOwnership
@Query("MATCH (obj:VRObject)<-[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 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)
-