Examples of Employee


Examples of org.apache.myfaces.view.facelets.bean.Employee

   
    @Test
    public void testIf1() throws Exception
    {
        Map session = facesContext.getExternalContext().getSessionMap();
        Employee e = new Employee();
        session.put("employee", e);

        UIViewRoot root = facesContext.getViewRoot();

        // make sure the form is there
        e.setManagement(true);
        vdl.buildView(facesContext, root,"if2.xhtml");
        UIComponent c = root.findComponent("form");
        Assert.assertNotNull("form is null", c);
        c = root.findComponent("start");
        Assert.assertNotNull("start is null", c);
        c = root.findComponent("end");
        Assert.assertNotNull("end is null", c);
              
       
        // now make sure it isn't
        e.setManagement(false);
       
        //facesContext.setViewRoot(facesContext.getApplication().getViewHandler()
        //        .createView(facesContext, "/test"));
        root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root,"if2.xhtml");
View Full Code Here

Examples of org.apache.olingo.odata2.annotation.processor.ref.model.Employee

  private static Employee createEmployee(final String name,
      final Location location, final int age, final Calendar date,
      final byte[] image, final String imageType, final String imageUrl,
      final Manager manager, final Team team, final Room room) {
    Employee employee = new Employee();
    employee.setEmployeeName(name);
    employee.setLocation(location);
    employee.setAge(age);
    employee.setEntryDate(date);
    employee.setImage(image);
    employee.setImageType(imageType);
    employee.setImageUri(imageUrl);
    employee.setManager(manager);
    employee.setTeam(team);
    employee.setRoom(room);
    return employee;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.ref.model.Employee

    }
    return location;
  }

  private Employee getOldestEmployee() {
    Employee oldestEmployee = null;
    for (final Employee employee : dataContainer.getEmployees()) {
      if (oldestEmployee == null || employee.getAge() > oldestEmployee.getAge()) {
        oldestEmployee = employee;
      }
    }
    return oldestEmployee;
  }
View Full Code Here

Examples of org.apache.openjpa.persistence.inheritance.entity.Employee

        d.setId(1);
        d.setDepartmentName("d1");
        d.setDepartmentManager(m);
        m.setDepartment(d);
       
        Employee e1 = new Employee();
        e1.setId(2);
        e1.setFirstName("ef1");
        e1.setLastName("el1");
        e1.setDepartment(d);
        e1.setManager(m);
        e1.setVacationDays(20);
       
        em.persist(m);
        em.persist(d);
        em.persist(e1);
    em.getTransaction().commit();
View Full Code Here

Examples of org.apache.struts2.showcase.model.Employee

  /**
   * Creating a default employee and main skill, since the JSF EL can't handle
   * creating new objects as necessary
   */
  public JsfEmployeeAction() {
    Employee e = new Employee();
    e.setMainSkill(new Skill());
    setCurrentEmployee(e);
  }
View Full Code Here

Examples of org.assertj.core.test.Employee

  private List<Employee> employees;
  private FieldSupport fieldSupport = FieldSupport.instance();

  @Before
  public void setUpOnce() {
  yoda = new Employee(1L, new Name("Yoda"), 800);
  luke = new Employee(2L, new Name("Luke", "Skywalker"), 26);
  employees = newArrayList(yoda, luke);
  }
View Full Code Here

Examples of org.baeldung.spring.form.Employee

@Controller
public class EmployeeController {

    @RequestMapping(value = "/employee", method = RequestMethod.GET)
    public ModelAndView showForm() {
        return new ModelAndView("employeeHome", "employee", new Employee());
    }
View Full Code Here

Examples of org.blueoxygen.postila.partnerrelations.businesspartnerrules.entity.Employee

  public String execute(){
    if(getBusinessPartner().getId() != null && !"".equalsIgnoreCase(getBusinessPartner().getId())){
      setBusinessPartner((BusinessPartner) manager.getById(BusinessPartner.class, getBusinessPartner().getId()));
    }
   
    Employee employee;
    if(getEmployee().getId() == null || "".equalsIgnoreCase(getEmployee().getId())){
      employee = new Employee();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      employee = (Employee) manager.getById(Employee.class, getEmployee().getId());
      logInfo = employee.getLogInformation();
    }
   
    logInfo.setActiveFlag(1);
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    employee.setBusinessPartner(getBusinessPartner());
    employee.setIsEmployee(getEmployee().getIsEmployee());
    employee.setSearchKey(getBusinessPartner().getSearchKey());
    employee.setName(getBusinessPartner().getName1());
    employee.setSalesRepresentative(getEmployee().getSalesRepresentative());
   
    manager.save(employee);
    setEmployee(employee);
   
    return SUCCESS;
View Full Code Here

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

Examples of org.crank.crud.test.model.Employee

        group.toString());
  }

  @Test(groups = { "broken" })
  public void example() {
    Employee employee = new Employee();
    employee.setActive(true);
    employee.setAge(40);
    employee.setFirstName("Rick");
    employee.setLastName("Rick");
    Example example = Example.like(employee).excludeProperty("lastName");
    assertEquals(
        "1",
        "(AND [active_EQ_true, age_EQ_40, firstName_LIKE_CONTAINS_Rick])",
        example.toString());

    example = Example.createExample(employee).excludeZeroes();
    employee.setAge(0);
    employee.setLastName(null);
    assertEquals("2", "(AND [active_EQ_true, firstName_EQ_Rick])", example
        .toString());

    example = Example.createExample(employee).excludeZeroes();
    employee.setAge(40);
    employee.setLastName(null);
    assertEquals("3",
        "(AND [active_EQ_true, age_EQ_40, firstName_EQ_Rick], numberOfPromotions_EQ_0, tasks_EQ_[]])", example
            .toString());

    example = Example.createExample(employee).excludeZeroes().excludeNone();
    employee.setAge(0);
    employee.setLastName(null);
    assertEquals(
        "4",
        "(AND [active_EQ_true, address_EQ_null, department_EQ_null, description_EQ_null, firstName_EQ_Rick, id_EQ_null, lastName_EQ_null, numberOfPromotions_EQ_null, rank_EQ_null, status_EQ_null])",
        example.toString());
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.