Package com.baasbox.dao

Examples of com.baasbox.dao.GenericDao


    if (contentType==null || contentType.isEmpty()) return false;
    return (contentType.startsWith("image/"));
  }
 
  public static OrientVertex getNodeVertex(String nodeId) throws DocumentNotFoundException{
    GenericDao dao = GenericDao.getInstance();
    OrientGraph conn = DbHelper.getOrientGraphConnection();
    ORID nodeORID = dao.getRidNodeByUUID(nodeId);
    if (nodeORID==null) throw new DocumentNotFoundException(nodeId + " is not a valid Id");
    ODocument nodeDoc = dao.get(nodeORID);
    if (nodeDoc==null) throw new DocumentNotFoundException(nodeId + " is not a valid Id");
    return conn.getVertex(nodeDoc.field(NodeDao.FIELD_LINK_TO_VERTEX));
  }
View Full Code Here


  /**
   * @param rid
   * @return
   */
  public static ODocument get(String rid) {
    GenericDao dao = GenericDao.getInstance();
    ODocument doc=dao.get(rid);
       return doc;
  }
View Full Code Here

    }

  }

  public static List<ODocument> getRoles() throws SqlInjectionException {
    GenericDao dao = GenericDao.getInstance();
    QueryParams criteria = QueryParams.getInstance().where("name not like \""+RoleDao.FRIENDS_OF_ROLE+"%\" and assignable=true").orderBy("name asc");
    return dao.executeQuery("orole", criteria);
  }
View Full Code Here

   * @param name
   * @return
   * @throws SqlInjectionException
   */
  public static List<ODocument> getRoles(String name) throws SqlInjectionException {
    GenericDao dao = GenericDao.getInstance();
    QueryParams criteria = QueryParams.getInstance().where("name = ? and assignable=true").params(new String[]{name}).orderBy("name asc");
    return dao.executeQuery("orole", criteria);
  }
View Full Code Here

TOP

Related Classes of com.baasbox.dao.GenericDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.