/** * INTERNAL * Create an exception to wrap a general parsing exception */ public static JPQLException generalParsingException(String theEjbql, Exception theException) { Object[] args = { theEjbql, theException.getMessage() }; String message = ExceptionMessageGenerator.buildMessage(JPQLException.class, generalParsingException, args); JPQLException exception = new JPQLException(message, theException, generalParsingException); exception.setErrorCode(generalParsingException); return exception; }
public static JPQLException aliasResolutionException(String query, int line, int column, String theAlias) { Object[] args = { query, line, column, theAlias }; String message = ExceptionMessageGenerator.buildMessage(JPQLException.class, aliasResolutionException, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(aliasResolutionException); return exception; }
public static JPQLException expressionNotSupported(String query, String unsupportedExpression) { Object[] args = { query, unsupportedExpression }; String message = ExceptionMessageGenerator.buildMessage(JPQLException.class, expressionNotSupported, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(expressionNotSupported); return exception; }
public static JPQLException invalidMultipleUseOfSameParameter( String query, int line, int column, String parameter, String oldType, String newType) { Object[] args = { query, line, column , parameter, oldType, newType }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidMultipleUseOfSameParameter, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidMultipleUseOfSameParameter); return exception; }
public static JPQLException syntaxErrorAt(String query, int line, int column, String token, Exception ex) { Object[] args = { query, line, column, token }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, syntaxErrorAt, args); JPQLException exception = new JPQLException(message, ex); exception.setErrorCode(syntaxErrorAt); return exception; }
public static JPQLException unexpectedEOF(String query, int line, int column, Exception ex) { Object[] args = { query, line, column}; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, unexpectedEOF, args); JPQLException exception = new JPQLException(message, ex); exception.setErrorCode(unexpectedEOF); return exception; }
public static JPQLException invalidEnumEqualExpression(String query, int line, int column, String enumType, String type) { Object[] args = { query, line, column, enumType, type }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidEnumEqualExpression, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidEnumEqualExpression); return exception; }
public static JPQLException variableCannotHaveMapKey(String query, int line, int column, String name) { Object[] args = { query, line, column, name }; String message = ExceptionMessageGenerator.buildMessage(JPQLException.class, variableCannotHaveMapKey, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(variableCannotHaveMapKey); return exception; }
public static JPQLException invalidCollectionMemberDecl(String query, int line, int column, String attributeName) { Object[] args = { query, line, column, attributeName }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidCollectionMemberDecl, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidCollectionMemberDecl); return exception; }
public static JPQLException notYetImplemented(String query, String detail) { Object[] args = { query, detail }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, notYetImplemented, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(notYetImplemented); return exception; }
public static JPQLException constructorClassNotFound(String query, int line, int column, String className) { Object[] args = { query, line, column, className }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, constructorClassNotFound, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(constructorClassNotFound); return exception; }
public static JPQLException invalidSelectForGroupByQuery(String query, int line, int column, String select, String groupBy) { Object[] args = { query, line, column, select, groupBy }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidSelectForGroupByQuery, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidSelectForGroupByQuery); return exception; }
public static JPQLException unsupportJoinArgument(String query, int line, int column, String join, String type) { Object[] args = { query, line, column, join, type }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, unsupportJoinArgument, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(unsupportJoinArgument); return exception; }
public static JPQLException expectedOrderableOrderByItem(String query, int line, int column, String item, String type) { Object[] args = { query, line, column, item, type }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, expectedOrderableOrderByItem, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(expectedOrderableOrderByItem); return exception; }
public static JPQLException unexpectedChar(String query, int line, int column, String unexpected, Exception ex) { Object[] args = { query, line, column, unexpected }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, unexpectedChar, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(unexpectedChar); return exception; }
public static JPQLException invalidNavigation( String query, int line, int column, String expr, String lhs, String type) { Object[] args = { query, line, column, expr, lhs, type }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidNavigation, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidNavigation); return exception; }
public static JPQLException classNotFoundException(String theClassName, String theMessage, Exception theException) { Object[] args = { theClassName, theMessage }; String message = ExceptionMessageGenerator.buildMessage(JPQLException.class, classNotFoundException, args); JPQLException exception = new JPQLException(message, theException, classNotFoundException); exception.setErrorCode(classNotFoundException); return exception; }
public static JPQLException invalidSizeArgument(String query, int line, int column, String attributeName) { Object[] args = { query, line, column, attributeName }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidSizeArgument, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidSizeArgument); return exception; }
public static JPQLException unexpectedChar(String query, int line, int column, String unexpected, Exception ex) { Object[] args = { query, line, column, unexpected }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, unexpectedChar, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(unexpectedChar); return exception; }
public static JPQLException invalidSetClauseNavigation( String query, int line, int column, String expr, String relationship) { Object[] args = { query, line, column, expr, relationship }; String message = ExceptionMessageGenerator.buildMessage( JPQLException.class, invalidSetClauseNavigation, args); JPQLException exception = new JPQLException(message); exception.setErrorCode(invalidSetClauseNavigation); return exception; }