* @param product
* @return
* @throws AppException
*/
public ErrorList create(Product product) throws AppException {
ErrorList errorList = new ErrorList();
ProductSet productSet = null;
try {
productSet = list(product.getProductID());
} catch (AppException ex) {
errorList.addError("[ProductManager::create]", ex.getMessage());
}
if (productSet != null) {
if (productSet.length() != 0) {
//means product code is exist, do not allow duplicate product code
errorList.addError(MEMBER_DUPLICATE_ENTRY);
return errorList;
}
}
try {