Package org.crank.crud.model

Examples of org.crank.crud.model.Employee


    FilteringPaginator filteringPaginator = new FilteringPaginator(dataSource, EmployeeReportObject.class);
    JsfCrudAdapter adapter = new JsfCrudAdapter("empRecord",filteringPaginator, (CrudOperations)empCrud().getController()){
        public Serializable getEntity() {
            Object object = ((Row)getModel().getRowData()).getObject();
            EmployeeReportObject employeeReportObject = (EmployeeReportObject) object;
            Employee employee = new Employee();
            employee.setId(employeeReportObject.getId());
            return employee;
         }
       
    };
   
View Full Code Here


   
   
    @SuppressWarnings("unchecked")
    public void populate() {
      boolean activeToggle = true;
        Employee employee = null;
        for (int index = 0; index < 100; index ++) {
            employee = new Employee();
            employee.setFirstName( "FOO" + index );
            employee.setLastName( "BAR" + index );
            employee.setActive((activeToggle ^= true));
            this.employeeDao.persist( employee );
        }
        employeeDataPaginator.reset();
    }
View Full Code Here

    FilteringPaginator filteringPaginator = new FilteringPaginator(dataSource, EmployeeReportObject.class);
    JsfCrudAdapter adapter = new JsfCrudAdapter("empRecord",filteringPaginator, (CrudOperations)empCrud().getController()){
        public Serializable getEntity() {
            Object object = ((Row)getModel().getRowData()).getObject();
            EmployeeReportObject employeeReportObject = (EmployeeReportObject) object;
            Employee employee = new Employee();
            employee.setId(employeeReportObject.getId());
            return employee;
         }
       
    };
   
View Full Code Here

  }
 
  @BeforeClass (groups="setup", dependsOnGroups="class-init")
  public void setupTags(){
    testTags = getTagRepo().store(Arrays.asList(new Tag [] {new Tag("one"), new Tag("two"), new Tag("three")}));
    testEmployee  = getEmployeeRepo().store(new Employee("Rick", "Hightower", 5));
    otherEmployee = getEmployeeRepo().store(new Employee("Foo", "Bar", 5));
    loadForm();
    availableTags = tagController.getAvailableChoices();
  }
View Full Code Here

  public void setTagRepo(TagDAO tagRepo) {
    this.tagRepo = tagRepo;
  }
 
  protected Set<Tag> getSelectedTags() {
    Employee employee = getEmployee();
    List<Tag> tagsForEmployee = tagRepo.findTagsForEmployee(employee.getId());
    return new TreeSet<Tag>(tagsForEmployee);
  }
View Full Code Here

    List<Tag> tagsForEmployee = tagRepo.findTagsForEmployee(employee.getId());
    return new TreeSet<Tag>(tagsForEmployee);
  }

  private Employee getEmployee() {
    Employee employee = parentCrudController.getEntity();
    return employee;
  }
View Full Code Here

TOP

Related Classes of org.crank.crud.model.Employee

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.