Ejemplo n.º 1
0
  public XTask createTask(FramedGraph<OrientBaseGraph> orientGraph, String userJid) {
    final ORID userRid = RidConverter.convertToRID(userJid);

    final XUser xUser = orientGraph.getVertex(userRid, XUser.class);
    if (xUser == null)
      throw new ObjectNotFoundException("User with wih jid " + userJid + " does not exist.");

    final XTask task = orientGraph.addVertex("class:xTask", XTask.class);
    task.setStatus("active");
    task.setStartTime(new Date());

    task.addOwner(xUser);

    return task;
  }