Interface VRObjectRepository

  • All Superinterfaces:<Entity,​Long>,<Entity,​Long>,<Entity,​Long>,<Entity>,<Entity,​Long>, VRSpaceDB

    public interface VRObjectRepository
    extends<Entity,​Long>, VRSpaceDB
    • Field Detail

      • log

        static final org.slf4j.Logger log
    • Method Detail

      • findById

        default Optional<Entity> findById​(Long id)
        Specified by:
        findById in interface<Entity,​Long>
      • deleteById

        default void deleteById​(Long id)
        Specified by:
        deleteById in interface<Entity,​Long>
      • getPermanents

        @Query("MATCH (o:VRObject{permanent:true})-[r:IN_WORLD]->(w:World) WHERE ID(w)=$worldId RETURN o")
        Set<VRObject> getPermanents​(Long worldId)
      • getClient

        default Client getClient​(Long id)
      • getWorldByName

        @Query("MATCH (o:World) WHERE = $name RETURN o")
        World getWorldByName​(String name)
      • getRange

        @Query("MATCH (w:World)<-[i:IN_WORLD]-(o:VRObject)-[r:HAS_POSITION]->(p:Point) WHERE ID(w) = $worldId AND p.x >= $x1 AND p.y >= $y1 AND p.z >= $z1 AND p.x <= $x2 AND p.y <= $y2 AND p.z <= $z2 RETURN o,r,p,i,w")
        Set<VRObject> getRange​(Long worldId,
                               double x1,
                               double y1,
                               double z1,
                               double x2,
                               double y2,
                               double z2)
      • getPoints

        @Query("MATCH (p:Point) WHERE p.x >= $x1 AND p.y >= $y1 AND p.z >= $z1 AND p.x <= $x2 AND p.y <= $y2 AND p.z <= $z2 RETURN p")
        Set<Point> getPoints​(double x1,
                             double y1,
                             double z1,
                             double x2,
                             double y2,
                             double z2)
      • getMember

        @Query("MATCH (o:Entity) WHERE ID(o) = $id RETURN o")
        <T extends Embedded> T getMember​(Class<T> cls,
                                         Long id)
      • delete

        default void delete​(VRObject o)
      • nullSafeDelete

        default void nullSafeDelete​(Entity e)
      • listWorlds

        @Query("MATCH (o:World) RETURN o")
        List<World> listWorlds()
      • countUsers

        @Query("MATCH (o:Client)-[i:IN_WORLD]->(w:World) WHERE ID(w) = $worldId RETURN count(*)")
        int countUsers​(long worldId)
      • countUsers

        @Query("MATCH (o:Client)-[i:IN_WORLD]->(w:World) WHERE ID(w) = $worldId AND = $active RETURN count(*)")
        int countUsers​(long worldId,
                       boolean active)