Examples of InvalidResultException


Examples of org.jooq.exception.InvalidResultException

        Map<K, V> map = new LinkedHashMap<K, V>();

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

        return map;
    }
View Full Code Here

Examples of org.jooq.exception.InvalidResultException

            for (Field<?> field : keys) {
                Utils.copyValue(key, field, record, field);
            }

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

        return map;
    }
View Full Code Here

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

Examples of org.jooq.exception.InvalidResultException

        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

Examples of org.jooq.exception.InvalidResultException

        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

Examples of org.jooq.exception.InvalidResultException

        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

Examples of org.jooq.exception.InvalidResultException

        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

Examples of org.jooq.exception.InvalidResultException

    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

Examples of org.jooq.exception.InvalidResultException

    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
Copyright © 2018 www.massapi.com. 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.