/** * Check that references does not point to self. * @param references from */ private void checkCircularReference(final BeanId... references) { for (BeanId beanId : references) { if (getId().equals(beanId)) { throw CFG310_CIRCULAR_REF(getId(), getId()); } } }
@EventDoc(module = MODULE_NAME, code = CFG089, desc = CFG089_MSG) public static AbortRuntimeException CFG088_INVALID_DATA() { Event event = new Event(MODULE_NAME, CFG088, CFG088_MSG); return new AbortRuntimeException(event); }
private static void validateReferences(Bean bean) { Schema schema = bean.getSchema(); Set<String> schemaReferenceNames = schema.getReferenceNames(); for (String name : bean.getReferenceNames()) { if (!schemaReferenceNames.contains(name)) { throw Events.CFG111_REF_NOT_EXIST_IN_SCHEMA(name); } } }
private static void validatePropertyNames(Bean bean) { Schema schema = bean.getSchema(); Set<String> schemaPropertyNames = schema.getPropertyNames(); for (String name : bean.getPropertyNames()) { if (!schemaPropertyNames.contains(name)) { throw Events.CFG110_PROP_NOT_EXIST_IN_SCHEMA(name); } } }
@EventDoc(module = MODULE_NAME, code = CFG303, desc = "Bean with same identification already exist.") public static AbortRuntimeException CFG303_BEAN_ALREADY_EXIST(BeanId id) { Event event = new Event(MODULE_NAME, CFG303, MessageFormat.format(CFG303_MSG, id.getInstanceId())); return new AbortRuntimeException(event); }
private static void checkDeleteDefault(Bean bean) { if (bean == null) { return; } if (bean.isDefault()) { throw CFG311_DEFAULT_REMOVAL(bean.getId()); } }
@EventDoc(module = MODULE_NAME, code = CFG090, desc = CFG090_MSG) public static AbortRuntimeException CFG90_SCHEMA_OR_ID_NOT_EXIST() { Event event = new Event(MODULE_NAME, CFG090, CFG090_MSG); return new AbortRuntimeException(event); }
/** * Check that references does not point to self. * @param references from */ private void checkCircularReference(final BeanId... references) { for (BeanId beanId : references) { if (getId().equals(beanId)) { throw CFG310_CIRCULAR_REF(getId(), getId()); } } }
@EventDoc(module = MODULE_NAME, code = CFG303, desc = "Bean with same identification already exist.") public static AbortRuntimeException CFG303_BEAN_ALREADY_EXIST(BeanId id) { Event event = new Event(MODULE_NAME, CFG303, MessageFormat.format(CFG303_MSG, id.getInstanceId())); return new AbortRuntimeException(event); }
@EventDoc(module = MODULE_NAME, code = CFG090, desc = CFG090_MSG) public static AbortRuntimeException CFG90_SCHEMA_OR_ID_NOT_EXIST() { Event event = new Event(MODULE_NAME, CFG090, CFG090_MSG); return new AbortRuntimeException(event); }
@EventDoc(module = MODULE_NAME, code = CFG089, desc = CFG089_MSG) public static AbortRuntimeException CFG089_MODIFICATION_CONFLICT() { Event event = new Event(MODULE_NAME, CFG089, CFG089_MSG); return new AbortRuntimeException(event); }
@EventDoc(module = MODULE_NAME, code = CFG089, desc = CFG089_MSG) public static AbortRuntimeException CFG089_MODIFICATION_CONFLICT() { Event event = new Event(MODULE_NAME, CFG089, CFG089_MSG); return new AbortRuntimeException(event); }
@EventDoc(module = MODULE_NAME, code = CFG107, desc = CFG107_MSG) public static AbortRuntimeException CFG107_MISSING_ID() { Event event = new Event(MODULE_NAME, CFG106, CFG107_MSG); return new AbortRuntimeException(event); }
public static AbortRuntimeException CFG301_MISSING_RUNTIME_REF() { Event event = new Event(MODULE_NAME, CFG301, CFG301_MSG_3); return new AbortRuntimeException(event); }
public static AbortRuntimeException CFG303_BEAN_ALREADY_EXIST() { Event event = new Event(MODULE_NAME, CFG303, "Bean with same identification already exist."); return new AbortRuntimeException(event); }
public static AbortRuntimeException CFG088_INVALID_DATA(String msg) { Event event = new Event(MODULE_NAME, CFG088, msg); return new AbortRuntimeException(event); }
public static AbortRuntimeException CFG088_INVALID_DATA(String msg) { Event event = new Event(MODULE_NAME, CFG088, msg); return new AbortRuntimeException(event); }
@EventDoc(module = MODULE_NAME, code = CFG107, desc = CFG107_MSG) public static AbortRuntimeException CFG107_MISSING_ID() { Event event = new Event(MODULE_NAME, CFG106, CFG107_MSG); return new AbortRuntimeException(event); }