Examples of GenericDao


Examples of br.com.progolden.dneutils.abstractions.GenericDAO

    ;
    if (cep.length() != 8)
      return CEPStatus.INEXISTENTE;
   
    if (this.factory != null) {
      GenericDAO dao = new GenericDAO(this.factory);
      Long count;
     
      // Buscando CEP de Localidade.
      count = this.countByCEP(cep, dao, Localidade.class);
      if (count > 0L)
View Full Code Here

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

Examples of com.baasbox.dao.GenericDao

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

Examples of com.baasbox.dao.GenericDao

    }

  }

  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

Examples of com.baasbox.dao.GenericDao

   * @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

Examples of com.cloud.utils.db.GenericDao

    }

    @SuppressWarnings("unchecked")
    @DB
    public long submitAsyncJob(AsyncJob job, boolean scheduleJobExecutionInContext) {
        @SuppressWarnings("rawtypes")
        GenericDao dao = GenericDaoBase.getDao(job.getClass());
        job.setInitMsid(getMsid());
        job.setSyncSource(null);        // no sync source originally
        dao.persist(job);

        publishOnEventBus(job, "submit");
        scheduleExecution(job, scheduleJobExecutionInContext);
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("submit async job-" + job.getId() + ", details: " + job.toString());
View Full Code Here

Examples of com.cloud.utils.db.GenericDao

    @SuppressWarnings("unchecked")
    @Override
    @DB
    public long submitAsyncJob(final AsyncJob job, final String syncObjType, final long syncObjId) {
        try {
            @SuppressWarnings("rawtypes")
            final GenericDao dao = GenericDaoBase.getDao(job.getClass());

            return Transaction.execute(new TransactionCallback<Long>() {
                @Override
                public Long doInTransaction(TransactionStatus status) {
                    job.setInitMsid(getMsid());
                    dao.persist(job);

                    publishOnEventBus(job, "submit");
                    syncAsyncJobExecution(job, syncObjType, syncObjId, 1);

                    return job.getId();
View Full Code Here

Examples of com.cloud.utils.db.GenericDao

    }

    @SuppressWarnings("unchecked")
    @DB
    public long submitAsyncJob(AsyncJob job, boolean scheduleJobExecutionInContext) {
        @SuppressWarnings("rawtypes")
        GenericDao dao = GenericDaoBase.getDao(job.getClass());
        job.setInitMsid(getMsid());
        job.setSyncSource(null);        // no sync source originally
        dao.persist(job);

        scheduleExecution(job, scheduleJobExecutionInContext);
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("submit async job-" + job.getId() + ", details: " + job.toString());
        }
View Full Code Here

Examples of com.cloud.utils.db.GenericDao

    @SuppressWarnings("unchecked")
    @Override
    @DB
    public long submitAsyncJob(final AsyncJob job, final String syncObjType, final long syncObjId) {
        try {
            @SuppressWarnings("rawtypes")
            final GenericDao dao = GenericDaoBase.getDao(job.getClass());

            return Transaction.execute(new TransactionCallback<Long>() {
                @Override
                public Long doInTransaction(TransactionStatus status) {
                    job.setInitMsid(getMsid());
                    dao.persist(job);

                    syncAsyncJobExecution(job, syncObjType, syncObjId, 1);

                    return job.getId();
                }
View Full Code Here

Examples of com.peusoft.ptcollect.server.persistance.dao.GenericDao

    }

    @SuppressWarnings("unchecked")
  @Override
    public GenericDao getDao(Class<? extends AbstractDomainObject> clazz) {
        GenericDao dao = daoMap.get(clazz);
        if (dao != null) {
            return dao;
        } else {
            throw new PTException(ErrorCode.ERR_PERSISTENCE_DAO_NOT_SUPPORTED,
                    messageHelper.getErrorMessage(ErrorCode.ERR_PERSISTENCE_DAO_NOT_SUPPORTED,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.