Package org.apache.empire.samples.cxf.wssample.common

Examples of org.apache.empire.samples.cxf.wssample.common.Employee


    }

    public void saveEmmployee(javax.xml.ws.Holder<Employee> empHolder)
    {
        DBRecord r = new DBRecord();
        Employee emp = empHolder.value;
        boolean init;
        if (emp.isNew())
            r.create(T_EMP, conn);
        else
            r.read(T_EMP, emp.getEmployeeId(), conn);

        r.setBeanValues(emp);
        r.update(conn);


        r.getBeanProperties(emp);
        emp.setNew(false);
    }
View Full Code Here


    }

    public Employee createEmmployee()
    {
        DBRecord r = new DBRecord();
        Employee emp = new Employee();

        // null, so that no IDs are wasted.
        r.create(T_EMP, null);
        r.getBeanProperties(emp);

        emp.setNew(true);

        return emp;
    }
View Full Code Here

    }

    public Employee getEmmployee(int id)
    {
        DBRecord r = new DBRecord();
        Employee emp = new Employee();

        r.read(T_EMP, id, conn);
        r.getBeanProperties(emp);
        return emp;
    }
View Full Code Here

    public static final SampleBeanDomain.Employees T = SampleBeanDomain.getInstance().T_EMPLOYEES; 
    // Department Record
    public EmployeeRecord(SampleContext context)
    {
        super(context, new Employee(), T);
    }
View Full Code Here

    // ------- Action Properties -------
    // ------- the have to overridables -------
    @Override
    public Employee createBean()
    {
        Employee e = proxy.createEmmployee();
        return e;
    }
View Full Code Here

      _btnAdd.setPreferredSize(new Dimension(75, 20));
      _btnAdd.setSize(new Dimension(75, 20));
      _btnAdd.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          try {
            Employee emp = proxy.createEmmployee();
            emp.setFirstname(_txtName.getText());
            emp.setLastname(_txtLastname.getText());
            emp.setDepartmentId(_departments.get(
                _cbxDepartment.getSelectedIndex())
                .getDepartmentId());
            proxy.saveEmployee(emp);
          } catch (Exception ex) {
            JOptionPane.showMessageDialog(me, ex.getMessage());
View Full Code Here

    }

    public boolean saveEmmployee(javax.xml.ws.Holder<Employee> empHolder)
    {
        DBRecord r = new DBRecord();
        Employee emp = empHolder.value;
        boolean init;
        if (emp.isNew())
            init = r.create(T_EMP, conn);
        else
            init = r.read(T_EMP, emp.getEmployeeId(), conn);

        boolean fill = r.setBeanValues(emp);
        boolean save = r.update(conn);

        if (init && fill && save)
        {
            r.getBeanProperties(emp);
            emp.setNew(false);
        }

        return init && fill && save;
    }
View Full Code Here

    }

    public Employee createEmmployee()
    {
        DBRecord r = new DBRecord();
        Employee emp = new Employee();

        // null, so that no IDs are wasted.
        boolean create = r.create(T_EMP, null);
        boolean fill = r.getBeanProperties(emp);

        emp.setNew(true);

        return (create && fill ? emp : null);
    }
View Full Code Here

    }

    public Employee getEmmployee(int id)
    {
        DBRecord r = new DBRecord();
        Employee emp = new Employee();

        boolean read = r.read(T_EMP, id, conn);
        boolean fill = r.getBeanProperties(emp);

        return (read && fill ? emp : null);
View Full Code Here

    public static final SampleBeanDomain.Employees T = SampleBeanDomain.getInstance().T_EMPLOYEES; 
    // Department Record
    public EmployeeRecord(SampleContext context)
    {
        super(context, new Employee(), T);
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.samples.cxf.wssample.common.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.