public static DescriptorException missingPartitioningPolicy(String name, ClassDescriptor descriptor, DatabaseMapping mapping) { Object[] args = { name }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, MISSING_PARTITION_POLICY, args), descriptor); if (mapping != null) { descriptorException.setMapping(mapping); } descriptorException.setErrorCode(MISSING_PARTITION_POLICY); 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; }
public static DescriptorException illegalArgumentWhileInvokingFieldToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ARGUMENT_WHILE_INVOKING_FIELD_TO_METHOD, args)); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); descriptorException.setErrorCode(ILLEGAL_ARGUMENT_WHILE_INVOKING_FIELD_TO_METHOD); return descriptorException; }
public static DescriptorException securityWhileConvertingToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, SECURITY_WHILE_CONVERTING_TO_METHOD, args)); descriptorException.setErrorCode(SECURITY_WHILE_CONVERTING_TO_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException securityWhileConvertingToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, SECURITY_WHILE_CONVERTING_TO_METHOD, args)); descriptorException.setErrorCode(SECURITY_WHILE_CONVERTING_TO_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException targetInvocationWhileInvokingFieldToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, TARGET_INVOCATION_WHILE_INVOKING_FIELD_TO_METHOD, args)); descriptorException.setErrorCode(TARGET_INVOCATION_WHILE_INVOKING_FIELD_TO_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException illegalAccessWhileInvokingFieldToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ACCESS_WHILE_INVOKING_FIELD_TO_METHOD, args)); descriptorException.setErrorCode(ILLEGAL_ACCESS_WHILE_INVOKING_FIELD_TO_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException illegalArgumentWhileInvokingAttributeMethod(DatabaseMapping mapping, Throwable exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ARGUMENT_WHILE_INVOKING_ATTRIBUTE_METHOD, args)); descriptorException.setErrorCode(ILLEGAL_ARGUMENT_WHILE_INVOKING_ATTRIBUTE_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException illegalAccessWhileInvokingAttributeMethod(DatabaseMapping mapping, Throwable exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ACCESS_WHILE_INVOKING_ATTRIBUTE_METHOD, args)); descriptorException.setErrorCode(ILLEGAL_ACCESS_WHILE_INVOKING_ATTRIBUTE_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException noSuchMethodWhileConvertingToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD, args)); descriptorException.setErrorCode(NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException targetInvocationWhileInvokingFieldToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, TARGET_INVOCATION_WHILE_INVOKING_FIELD_TO_METHOD, args)); descriptorException.setErrorCode(TARGET_INVOCATION_WHILE_INVOKING_FIELD_TO_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException illegalAccessWhileInvokingAttributeMethod(DatabaseMapping mapping, Throwable exception) { Object[] args = { }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, ILLEGAL_ACCESS_WHILE_INVOKING_ATTRIBUTE_METHOD, args)); descriptorException.setErrorCode(ILLEGAL_ACCESS_WHILE_INVOKING_ATTRIBUTE_METHOD); descriptorException.setInternalException(exception); descriptorException.setMapping(mapping); return descriptorException; }
public static DescriptorException noSuchMethodOnInitializingAttributeMethod(String attributeMethodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { attributeMethodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_ON_INITIALIZING_ATTRIBUTE_METHOD, args)); descriptorException.setErrorCode(NO_SUCH_METHOD_ON_INITIALIZING_ATTRIBUTE_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException noSuchMethodWhileConvertingToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD, args)); descriptorException.setErrorCode(NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException securityOnInitializingAttributeMethod(String attributeMethodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { attributeMethodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, SECURITY_ON_INITIALIZING_ATTRIBUTE_METHOD, args)); descriptorException.setErrorCode(SECURITY_ON_INITIALIZING_ATTRIBUTE_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException fieldTransformerClassInvalid(String className, AbstractTransformationMapping mapping, Exception exception) { Object[] args = { className }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, FIELD_TRANSFORMER_CLASS_INVALID, args)); descriptorException.setErrorCode(FIELD_TRANSFORMER_CLASS_NOT_FOUND); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
public static DescriptorException noSuchMethodWhileConvertingToMethod(String methodName, DatabaseMapping mapping, Throwable exception) { Object[] args = { methodName }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD, args)); descriptorException.setErrorCode(NO_SUCH_METHOD_WHILE_CONVERTING_TO_METHOD); descriptorException.setMapping(mapping); descriptorException.setInternalException(exception); return descriptorException; }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }