Package com.mysema.query

Examples of com.mysema.query.QueryException


*/
class JaveSE7SQLExceptionWrapper extends SQLExceptionWrapper {

    @Override
    public RuntimeException wrap(SQLException exception) {
        QueryException rv = new QueryException(exception);
        SQLException linkedException = exception.getNextException();
        while (linkedException != null) {
            rv.addSuppressed(linkedException);
            linkedException = linkedException.getNextException();
        }
        return rv;
    }
View Full Code Here


        return rv;
    }

    @Override
    public RuntimeException wrap(String message, SQLException exception) {
        QueryException rv = new QueryException(message, exception);
        SQLException linkedException = exception.getNextException();
        while (linkedException != null) {
            rv.addSuppressed(linkedException);
            linkedException = linkedException.getNextException();
        }
        return rv;
    }
View Full Code Here

    @Override
    public long count() {
        try {
            return queryEngine.count(getMetadata(), iterables);
        } catch (Exception e) {
            throw new QueryException(e.getMessage(), e);
        } finally {
            reset();
        }
    }
View Full Code Here

    @Override
    public boolean exists() {
        try {
            return queryEngine.exists(getMetadata(), iterables);
        } catch (Exception e) {
            throw new QueryException(e.getMessage(), e);
        } finally {
            reset();
        }
    }
View Full Code Here

            // serialize projections
            serialize(projectionSerializer, projectionTypes);

        } catch (IOException e) {
            throw new QueryException(e);
        }

    }
View Full Code Here

            try {
                for (Class<?> cl : ClassPathUtils.scanPackage(classLoader, pkg)) {
                    handleClass(cl);
                }
            } catch (IOException e) {
                throw new QueryException(e);
            }
        }
    }
View Full Code Here

        reset();
        Long rv = (Long)query.uniqueResult();
        if (rv != null) {
            return rv.longValue();
        } else {
            throw new QueryException("Query returned null");
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public <A> A createAliasForExpr(Class<A> cl, Expression<? extends A> expr) {
        try {
            return (A) proxyCache.get(Pair.<Class<?>, Expression<?>>of(cl, expr));
        } catch (ExecutionException e) {
           throw new QueryException(e);
        }
    }
View Full Code Here

    public <A> A createAliasForVariable(Class<A> cl, String var) {
        try {
            Expression<?> path = pathCache.get(Pair.<Class<?>, String>of(cl, var));
            return (A) proxyCache.get(Pair.<Class<?>, Expression<?>>of(cl, path));
        } catch (ExecutionException e) {
            throw new QueryException(e);
        }       
    }
View Full Code Here

                    continue;
                } else if (!escape && ch == '\\') {
                    escape = true;
                    continue;
                } else if (!escape && (ch == '[' || ch == ']' || ch == '^' || ch == '.' || ch == '*')) {
                    throw new QueryException("'" + str + "' can't be converted to like form");
                } else if (escape && (ch == 'd' || ch == 'D' || ch == 's' || ch == 'S' || ch == 'w' || ch == 'W')) {
                    throw new QueryException("'" + str + "' can't be converted to like form");
                }
                rv.append(ch);
                escape = false;
            }
            if (!rv.toString().equals(str)) {
View Full Code Here

TOP

Related Classes of com.mysema.query.QueryException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.