}
if(hasErrors()){
return INPUT;
}
Contact contact;
if(getContact().getId() == null || "".equalsIgnoreCase(getContact().getId())){
contact = new Contact();
logInfo = new LogInformation();
logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
} else {
contact = (Contact) manager.getById(Contact.class, getContact().getId());
logInfo = contact.getLogInformation();
}
logInfo.setActiveFlag(1);
logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
contact.setLogInformation(logInfo);
contact.setName(getContact().getName());
contact.setDescription(getContact().getDescription());
contact.setComments(getContact().getComments());
contact.setEmail(getContact().getEmail());
contact.setGreeting(getGreeting());
contact.setTitle(getContact().getTitle());
contact.setPhone(getContact().getPhone());
contact.setTwoNDPhone(getContact().getTwoNDPhone());
contact.setFax(getContact().getFax());
contact.setPositionCategory(getPositionCategory());
contact.setFullBPAccess(getContact().getFullBPAccess());
manager.save(contact);
setContact(contact);
return SUCCESS;
}