Package org.crank.crud.controller.datasource

Examples of org.crank.crud.controller.datasource.DaoFilteringPagingDataSource


    dataSource.setType(EmployeeStatus.class);
    selectItemGenerator.setDataSource(dataSource);
    selectItemGenerators.put("EmployeeStatus", selectItemGenerator);
   
    SelectItemGenerator daoSelectItemGenerator = new SelectItemGenerator();
    DaoFilteringPagingDataSource daoDataSource = new DaoFilteringPagingDataSource();
    daoDataSource.setDao(repos().get("PetClinicInquiry"));
    daoSelectItemGenerator.setDataSource(daoDataSource);
    selectItemGenerators.put("Inquiry", daoSelectItemGenerator);
    selectItemGenerators.put("inquiry", daoSelectItemGenerator);
    return selectItemGenerators;
  }
View Full Code Here


    dataSource.setType(EmployeeStatus.class);
    selectItemGenerator.setDataSource(dataSource);
    selectItemGenerators.put("EmployeeStatus", selectItemGenerator);
   
    SelectItemGenerator daoSelectItemGenerator = new SelectItemGenerator();
    DaoFilteringPagingDataSource daoDataSource = new DaoFilteringPagingDataSource();
    daoDataSource.setDao(repos().get("PetClinicInquiry"));
    daoSelectItemGenerator.setDataSource(daoDataSource);
    selectItemGenerators.put("Inquiry", daoSelectItemGenerator);
    selectItemGenerators.put("inquiry", daoSelectItemGenerator);
    return selectItemGenerators;
  }
View Full Code Here

    dataSource.setType(EmployeeStatus.class);
    selectItemGenerator.setDataSource(dataSource);
    selectItemGenerators.put("EmployeeStatus", selectItemGenerator);
   
    SelectItemGenerator daoSelectItemGenerator = new SelectItemGenerator();
    DaoFilteringPagingDataSource daoDataSource = new DaoFilteringPagingDataSource();
    daoDataSource.setDao(repos().get("PetClinicInquiry"));
    daoSelectItemGenerator.setDataSource(daoDataSource);
    selectItemGenerators.put("Inquiry", daoSelectItemGenerator);
    selectItemGenerators.put("inquiry", daoSelectItemGenerator);
    return selectItemGenerators;
  }
View Full Code Here

    @Bean (scope = DefaultScopes.SESSION, aliases="pagers")
    public Map<String, FilterablePageable> paginators () throws Exception {

        DeferredResourceCreator drc = new DeferredResourceCreator(){
               public void createResource(Map map, CrudManagedObject mo) throws Exception{
                   DaoFilteringPagingDataSource dataSource = new DaoFilteringPagingDataSource();
                   dataSource.setDao( repos().get( mo.getName() ));
                   FilteringPaginator dataPaginator = null;
                   if (mo.getPropertyNames() == null) {
                        dataPaginator = new FilteringPaginator(dataSource, mo.getEntityType());
                   } else {
                       dataPaginator = new FilteringPaginator(dataSource, mo.getEntityType(), mo.getPropertyNames());
View Full Code Here

    public Map<String, SelectItemGenerator> selectItemGenerators() throws Exception {

        DeferredResourceCreator drc = new DeferredResourceCreator(){
               public void createResource(Map map, CrudManagedObject mo) throws Exception{
                   SelectItemGenerator selectItemGenerator = new SelectItemGenerator();
                   DaoFilteringPagingDataSource dataSource = new DaoFilteringPagingDataSource();
                   dataSource.setDao( repos().get( mo.getName() ));
                   selectItemGenerator.setDataSource( dataSource );
                   map.put(mo.getName(), selectItemGenerator);
                   map.put(StringUtils.unCapitalize(mo.getName()), selectItemGenerator);
               }
        };
View Full Code Here

TOP

Related Classes of org.crank.crud.controller.datasource.DaoFilteringPagingDataSource

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.