Package org.jooq.exception

Examples of org.jooq.exception.InvalidResultException


            for (Field<?> key : keys) {
                keyValueList.add(record.getValue(key));
            }

            if (map.put(keyValueList, mapper.map(record)) != null) {
                throw new InvalidResultException("Key list " + keyValueList + " is not unique in Result for " + this);
            }
        }

        return map;
    }
View Full Code Here


        for (R record : this) {
            S key = record.into(table);

            if (map.put(key, record) != null) {
                throw new InvalidResultException("Key list " + key + " is not unique in Result for " + this);
            }
        }

        return map;
    }
View Full Code Here

        for (R record : this) {
            S key = record.into(table);

            if (map.put(key, mapper.map(record)) != null) {
                throw new InvalidResultException("Key list " + key + " is not unique in Result for " + this);
            }
        }

        return map;
    }
View Full Code Here

        int index = indexOrFail(fieldsRow(), key);
        Map<K, E> map = new LinkedHashMap<K, E>();

        for (R record : this) {
            if (map.put((K) record.getValue(index), mapper.map(record)) != null) {
                throw new InvalidResultException("Key " + key + " is not unique in Result for " + this);
            }
        }

        return map;
    }
View Full Code Here

        if (size == 1) {
            return list.get(0);
        }
        else if (size > 1) {
            throw new InvalidResultException("Too many rows selected : " + size);
        }

        return null;
    }
View Full Code Here

    static final <R extends Record> R fetchOne(Cursor<R> cursor) throws InvalidResultException {
        try {
            R record = cursor.fetchOne();

            if (cursor.hasNext()) {
                throw new InvalidResultException("Cursor returned more than one result");
            }

            return record;
        }
        finally {
View Full Code Here

    private final <T, R extends Record1<T>> T value1(R record) {
        if (record == null)
            return null;

        if (record.size() != 1)
            throw new InvalidResultException("Record contains more than one value : " + record);

        return record.value1();
    }
View Full Code Here

TOP

Related Classes of org.jooq.exception.InvalidResultException

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.