beautypg.com

HP Integrity NonStop J-Series User Manual

Page 289

background image

boolean state1 = false;
boolean ntexist = false;

public boolean isExist() {
return exist;
}

public void setExist(boolean exist) {
this.exist = exist;
}

public int getEmpid() {
return empid;
}

public void setEmpid(int empid) {
this.empid = empid;
}

public String getFirstname() {
return firstname;
}

public void setFirstname(String firstname) {
this.firstname = firstname;
}

public String getLastname() {
return lastname;
}

public void setLastname(String lastname) {
this.lastname = lastname;
}

public int getAge() {
return age;
}

public void setAge(int age) {
this.age = age;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getRord() {
return rord;
}

public void setRord(String rord) {
this.rord = rord;
}

public String register() throws Exception {
String status = "failure";
exist = false;

if (validateData()) {
IEmployeeDao dao = (IEmployeeDao) ServiceFinder.findBean("empdao");

if (dao.checkEmp(getEmpid()) != null) {
exist = true;
status = "failure";
} else {

com.hp.empinfo.domain.Employee employee = new com.hp.empinfo.domain.Employee();

// Set employee id
employee.setEmpid(getEmpid());

// Set employee Firstname
employee.setFirstname(getFirstname());

// Set employee Lastname
employee.setLastname(getLastname());

Integrating MyFaces into Spring 289

This manual is related to the following products: