CategorySet categorySet = null;
try {
categorySet = list(category.getCategoryCode());
} catch (AppException ex) {
errorList.addError("[CategoryManager::create]", ex.getMessage());
}
if (categorySet != null) {
if (categorySet.length() != 0) {
//means category code is exist, do not allow duplicate category code