Examples of InvalidStateException


Examples of org.apache.openjpa.util.InvalidStateException

    /**
     * Add a column to the constraint.
     */
    public void addColumn(Column col) {
        if (col == null || !ObjectUtils.equals(col.getTable(), getTable()))
            throw new InvalidStateException(_loc.get("table-mismatch",
                col == null ? null : col.getTable(),
                col == null ? null : getTable()));

        if (_colList == null)
            _colList = new ArrayList(3);
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

    public static Object loadObject(ValueMapping vm, OpenJPAStateManager sm,
        JDBCStore store, JDBCFetchConfiguration fetch, Result res,
        Joins joins, Column[] cols, boolean objectValueRequiresLoad)
        throws SQLException {
        if (cols.length == 0)
            throw new InvalidStateException(_loc.get("cant-project-owned",
                vm));

        Object val = loadDataStore(vm, res, joins, cols);
        if (objectValueRequiresLoad)
            return vm.getHandler().toObjectValue(vm, val, sm, store, fetch);
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

     * Load the object in the current row of the given result.
     */
    public Object load(ClassMapping mapping, JDBCFetchConfiguration fetch,
        BitSet exclude, Result result) throws SQLException {
        if (!mapping.isMapped())
            throw new InvalidStateException(_loc.get("virtual-mapping",
                mapping));

        // get the object id for the row; base class selects pk columns
        ClassMapping base = mapping;
        while (base.getJoinablePCSuperclassMapping() != null)
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

        ClassMapping orig, OpenJPAStateManager sm, BitSet fields,
        JDBCFetchConfiguration fetch, int eager, FieldMapping eagerToMany,
        boolean ident, boolean joined) {
        ClassMapping parent = mapping.getJoinablePCSuperclassMapping();
        if (parent == null && !mapping.isMapped())
            throw new InvalidStateException(_loc.get("virtual-mapping", mapping.
                getDescribedType()));

        int seld = -1;
        int pseld = -1;
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

                inMem = true;
            }
        }

        if (inMem && !_storeQuery.supportsInMemoryExecution())
            throw new InvalidStateException(_loc.get("cant-exec-inmem",
                _language));
        return inMem;
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

            _broker.assertOpen();
    }

    public void assertNotReadOnly() {
        if (_readOnly)
            throw new InvalidStateException(_loc.get("read-only"));
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

            throw new InvalidStateException(_loc.get("read-only"));
    }

    public void assertNotSerialized() {
        if (_broker == null)
            throw new InvalidStateException(_loc.get("serialized"));
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

    /**
     * Check that a candidate class has been set for the query.
     */
    private void assertCandidateType() {
        if (_class == null && _storeQuery.requiresCandidateType())
            throw new InvalidStateException(_loc.get("no-class"));
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

     * updateClause and isolationLevel hints
     */
    protected String getForUpdateClause(JDBCFetchConfiguration fetch,
        boolean forUpdate) {
        if (fetch != null && fetch.getIsolation() != -1) {
            throw new InvalidStateException(_loc.get(
                "isolation-level-config-not-supported", getClass().getName()));
        } else if (forUpdate && !simulateLocking) {
            assertSupport(supportsSelectForUpdate, "SupportsSelectForUpdate");
            return forUpdateClause;
        } else {
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

    }

    public void setOptimistic(boolean val) {
        assertOpen();
        if ((_flags & FLAG_ACTIVE) != 0)
            throw new InvalidStateException(_loc.get("trans-active",
                "Optimistic"));

        // make sure the runtime supports it
        if (val && !_conf.supportedOptions().contains(_conf.OPTION_OPTIMISTIC))
            throw new UnsupportedException(_loc.get
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.