Examples of GenericDao


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

     * Calls { @link GenericDao#getAll(Class) }.
     */
    @SuppressWarnings("unchecked")
  @Override
    public <T extends AbstractDomainObject> List<T> getAll(Class<T> clazz) throws PTException {
      GenericDao dao = daoFactory.getDao(clazz);
        return (List<T>) dao.findAll();
    }
View Full Code Here

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

    }

    @SuppressWarnings("unchecked")
  @Override
    public <T extends AbstractDomainObject> boolean isObjectInUse(T object) {
        GenericDao dao = daoFactory.getDao((Class<T>) object.getClass());
        return dao.isObjectInUse(object);
    }
View Full Code Here

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

        // save states
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("saving objects... ");
        }
        for (AbstractDomainObject object : objects) {
            GenericDao dao = daoFactory.getDao(object.getClass());
            dao.merge(object);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("save object " + object);
            }
        }
    }
View Full Code Here

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

        // delete objects
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("deleting objects... ");
        }
        for (AbstractDomainObject object : objects) {
            GenericDao dao = daoFactory.getDao(object.getClass());
            dao.remove(object);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("delete " + object);
            }
        }
    }
View Full Code Here

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

        // save states
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("creating objects... ");
        }
        for (AbstractDomainObject object : objects) {
            GenericDao dao = daoFactory.getDao(object.getClass());
            dao.persist(object);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("create object " + object);
            }
        }
    }
View Full Code Here

Examples of org.crank.crud.GenericDao

    bulkUpdater.setType(Employee.class);
    EntityLocator el = createMock(EntityLocator.class);
    expect(el.getSelectedEntities()).andReturn(employees);
    replay(el);
    bulkUpdater.setEntityLocator(el);
    GenericDao repo = createMock(GenericDao.class);
    bulkUpdater.setRepo(repo);
  }
View Full Code Here

Examples of org.crank.crud.GenericDao

  public Map<String, GenericDao> repositories() throws Exception {

        DeferredResourceCreator drc = new DeferredResourceCreator(){
               public void createResource(Map map, CrudManagedObject cmo) throws Exception{

                   GenericDao dao = createDao(cmo);
                   map.put(cmo.getName(), dao);

               }
        };
View Full Code Here

Examples of org.skyscreamer.yoga.demo.dao.GenericDao

                params.put( "com.sun.jersey.config.property.packages", AbstractResource.class.getPackage().getName() );

                DemoData data = new DemoData();
                data.init();

                GenericDao dao = new DemoDataGenericDaodata );

                YogaBuilder builder = new YogaBuilder()
                    .withClassFinderStrategy( new HibernateClassFinderStrategy() )
                    .withAliasProperties( this.getClass().getClassLoader().getResourceAsStream( "selectorAlias.properties" ) )
                    .withOutputCountLimit( 2000 )
View Full Code Here

Examples of org.skyscreamer.yoga.demo.dao.GenericDao

    {

        DemoData data = new DemoData();
        data.init();

        GenericDao dao = new DemoDataGenericDaodata );
       
        YogaBuilder builder = new YogaBuilder()
            .withClassFinderStrategy( new HibernateClassFinderStrategy() )
            .withAliasProperties( this.getClass().getClassLoader().getResourceAsStream( "selectorAlias.properties" ) )
            .withOutputCountLimit( 2000 )
View Full Code Here

Examples of utn.frsf.gabinete.fw.dao.GenericDAO

  public void doGet(HttpServletRequest req, HttpServletResponse resp){}
 
  public void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    String nombreClase = "utn.frsf.gabinete.fw.sample."+req.getParameter("ent");
    GenericDAO dao = new GenericDAO();
    ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
    Object obj = null;
    try {
      obj = dao.crearInstancia(mapper.readValue(req.getParameter("datos"),Class.forName(nombreClase)));
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
    System.out.println("obj"+obj.toString()+" / "+mapper.writeValueAsString(obj));
    resp.setContentType("application/json");
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.