public static DescriptorException errorAccessingSetMethodOfEntity(Class aClass, String methodName, ClassDescriptor descriptor, Exception underlying) { Object[] args = { aClass, methodName }; DescriptorException exception = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, INTERNAL_ERROR_SET_METHOD, args), descriptor, underlying); return exception; }
public static DescriptorException directFieldNameNotSet(DatabaseMapping mapping) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, DIRECT_FIELD_NAME_NOT_SET, args), mapping); descriptorException.setErrorCode(DIRECT_FIELD_NAME_NOT_SET); return descriptorException; }
public static DescriptorException illegalAccessWhileConstructorInstantiation(ClassDescriptor descriptor, Exception exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ACCESS_WHILE_CONSTRUCTOR_INSTANTIATION, args), descriptor, exception); descriptorException.setErrorCode(ILLEGAL_ACCESS_WHILE_CONSTRUCTOR_INSTANTIATION); return descriptorException; }
/** * @since EclipseLink 2.5.0 */ public static DescriptorException missingClassIndicatorField(XMLRecord row, ClassDescriptor descriptor) { Object[] args = { row }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, MISSING_CLASS_INDICATOR_FIELD, args), descriptor); descriptorException.setErrorCode(MISSING_CLASS_INDICATOR_FIELD); return descriptorException; }
public static DescriptorException noMappingForPrimaryKey(DatabaseField field, ClassDescriptor descriptor) { Object[] args = { field }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_MAPPING_FOR_PRIMARY_KEY, args), descriptor); descriptorException.setErrorCode(NO_MAPPING_FOR_PRIMARY_KEY); return descriptorException; }
public static DescriptorException noSuchMethodWhileConstructorInstantiationOfFactory(ClassDescriptor descriptor, Throwable exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_WHILE_CONSTRUCTOR_INSTANTIATION_OF_FACTORY, args), descriptor, exception); descriptorException.setErrorCode(NO_SUCH_METHOD_WHILE_CONSTRUCTOR_INSTANTIATION_OF_FACTORY); return descriptorException; }
public static DescriptorException noSuchMethodWhileInitializingCopyPolicy(String methodName, ClassDescriptor descriptor, Exception exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_WHILE_INITIALIZING_COPY_POLICY, args), descriptor, exception); descriptorException.setErrorCode(NO_SUCH_METHOD_WHILE_INITIALIZING_COPY_POLICY); return descriptorException; }
public static DescriptorException nullForNonNullAggregate(Object object, DatabaseMapping mapping) { Object[] args = { object }; DescriptorException exception = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NULL_FOR_NON_NULL_AGGREGATE, args), mapping); exception.setErrorCode(NULL_FOR_NON_NULL_AGGREGATE); return exception; }
public static DescriptorException nullPointerWhileConstructorInstantiationOfFactory(ClassDescriptor descriptor, Throwable exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION_OF_FACTORY, args), descriptor, exception); descriptorException.setErrorCode(NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION_OF_FACTORY); return descriptorException; }
public static DescriptorException setExistenceCheckingNotUnderstood(String token, ClassDescriptor descriptor) { Object[] args = { token }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, SET_EXISTENCE_CHECKING_NOT_UNDERSTOOD, args), descriptor); descriptorException.setErrorCode(SET_EXISTENCE_CHECKING_NOT_UNDERSTOOD); return descriptorException; }
public static DescriptorException tableNotSpecified(ClassDescriptor descriptor) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, TABLE_NOT_SPECIFIED, args), descriptor); descriptorException.setErrorCode(TABLE_NOT_SPECIFIED); return descriptorException; }
public static DescriptorException targetInvocationWhileMethodInstantiationOfFactory(String methodName, ClassDescriptor descriptor, Exception exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, TARGET_INVOCATION_WHILE_METHOD_INSTANTIATION_OF_FACTORY, args), descriptor, exception); descriptorException.setErrorCode(TARGET_INVOCATION_WHILE_METHOD_INSTANTIATION_OF_FACTORY); return descriptorException; }
public static DescriptorException returningPolicyAndDescriptorFieldTypeConflict(String fieldName, String returningPolicyFieldTypeName, String descriptorFieldTypeName, ClassDescriptor descriptor) { Object[] args = { fieldName, returningPolicyFieldTypeName, descriptorFieldTypeName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, RETURNING_POLICY_AND_DESCRIPTOR_FIELD_TYPE_CONFLICT, args), descriptor); descriptorException.setErrorCode(RETURNING_POLICY_AND_DESCRIPTOR_FIELD_TYPE_CONFLICT); return descriptorException; }
public static DescriptorException errorUsingPrimaryKey(Object primaryKey, ClassDescriptor descriptor, Exception underlying) { Object[] args = { primaryKey }; DescriptorException exception = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, INTERNAL_ERROR_ACCESSING_PKFIELD, args), descriptor, underlying); exception.setErrorCode(INTERNAL_ERROR_ACCESSING_PKFIELD); return exception; }
public static DescriptorException listOrderFieldRequiersList(ClassDescriptor descriptor, DatabaseMapping mapping) { Object[] args = { mapping }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LIST_ORDER_FIELD_REQUIRES_LIST, args), descriptor); descriptorException.setErrorCode(LIST_ORDER_FIELD_REQUIRES_LIST); return descriptorException; }
public static DescriptorException oneToOneMappingConflict(ClassDescriptor descriptor, DatabaseMapping mapping) { Object[] args = { mapping }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ONE_TO_ONE_MAPPING_CONFLICT, args), descriptor); descriptorException.setErrorCode(ONE_TO_ONE_MAPPING_CONFLICT); return descriptorException; }
public static DescriptorException serializedObjectPolicyFieldNotSet(ClassDescriptor descriptor) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, SERIALIZED_OBJECT_POLICY_FIELD_NOT_SET, args), descriptor); descriptorException.setErrorCode(SERIALIZED_OBJECT_POLICY_FIELD_NOT_SET); return descriptorException; }
public static DescriptorException illegalAccessWhileSettingValueThruInstanceVariableAccessor(String attributeName, String objectName, Object objectValue, Throwable exception) { Object[] args = { attributeName, objectName, String.valueOf(objectValue), CR }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ACCESS_WHILE_SETTING_VALUE_THRU_INSTANCE_VARIABLE_ACCESSOR, args)); descriptorException.setInternalException(exception); descriptorException.setErrorCode(ILLEGAL_ACCESS_WHILE_SETTING_VALUE_THRU_INSTANCE_VARIABLE_ACCESSOR); return descriptorException; }
public static DescriptorException couldNotInstantiateIndirectContainerClass(Class containerClass, Exception exception) { Object[] args = { containerClass, Helper.getShortClassName(containerClass) }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, COULD_NOT_INSTANTIATE_INDIRECT_CONTAINER_CLASS, args)); descriptorException.setErrorCode(COULD_NOT_INSTANTIATE_INDIRECT_CONTAINER_CLASS); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException fieldTransformerClassNotFound(String className, AbstractTransformationMapping mapping, Exception exception) { Object[] args = { className }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, FIELD_TRANSFORMER_CLASS_NOT_FOUND, args)); descriptorException.setErrorCode(FIELD_TRANSFORMER_CLASS_NOT_FOUND); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }