Examples of MetadataException


Examples of org.apache.openjpa.util.MetaDataException

                props);
            return strategy;
        } catch (Exception e) {
            if (e instanceof PrivilegedActionException)
                e = ((PrivilegedActionException) e).getException();
            throw new MetaDataException(_loc.get("bad-version-strategy",
                version.getClassMapping(), strat + ""), e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

        if (mapped != null) {
            if (mapped.getTypeCode() == JavaTypes.PC)
                return true;
            if (mapped.getElement().getTypeCode() == JavaTypes.PC)
                return false;
            throw new MetaDataException(_loc.get("bad-mapped-by", field,
                mapped));
        }

        // without a mapped-by, we have to look for clues as to the mapping.
        // we assume that anything with element foreign key columns but no join
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            Configurations.configureInstance(o, getConfiguration(), props);
            return o;
        } catch (Exception e) {
            if (e instanceof PrivilegedActionException)
                e = ((PrivilegedActionException) e).getException();
            throw new MetaDataException(_loc.get("bad-mapped-strategy",
                val, name), e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            }
            return null; // named field strategy
        } catch (Exception e) {
            if (e instanceof PrivilegedActionException)
                e = ((PrivilegedActionException) e).getException();
            throw new MetaDataException(_loc.get("bad-value-handler",
                val, name), e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            (field.getKey(), !adapt);

        ValueMapping elem = field.getElementMapping();
        if (elem.getTypeCode() != JavaTypes.PC || elem.isEmbeddedPC()
            || !elem.getTypeMapping().isMapped())
            throw new MetaDataException(_loc.get("not-elem-relation", field));

        // check for named inverse
        FieldMapping mapped = field.getMappedByMapping();
        FieldMappingInfo finfo = field.getMappingInfo();
        ValueMappingInfo vinfo = elem.getValueInfo();
        boolean criteria = vinfo.getUseClassCriteria();
        if (mapped != null) {
            mapped.resolve(mapped.MODE_META | mapped.MODE_MAPPING);
            if (!(mapped.getStrategy() instanceof RelationFieldStrategy))
                throw new MetaDataException(_loc.get("not-inv-relation",
                    field, mapped));
            vinfo.assertNoSchemaComponents(elem, !adapt);
            elem.setForeignKey(mapped.getForeignKey
                (field.getDefiningMapping()));
            elem.setColumns(mapped.getDefiningMapping().
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            return;
        }

        Message msg = _loc.get("unexpected-cols", context);
        if (die)
            throw new MetaDataException(msg);
        context.getRepository().getLog().warn(msg);
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

            strat = contextStrat.getClass().getName();

        Message msg = _loc.get("unexpected-strategy", context, expected,
            strat);
        if (die)
            throw new MetaDataException(msg);
        context.getRepository().getLog().warn(msg);
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

        if (_idx == null)
            return;

        Message msg = _loc.get("unexpected-index", context);
        if (die)
            throw new MetaDataException(msg);
        context.getRepository().getLog().warn(msg);
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

        if (_unq == null)
            return;

        Message msg = _loc.get("unexpected-unique", context);
        if (die)
            throw new MetaDataException(msg);
        context.getRepository().getLog().warn(msg);
    }
View Full Code Here

Examples of org.apache.openjpa.util.MetaDataException

        if (_fk == null)
            return;

        Message msg = _loc.get("unexpected-fk", context);
        if (die)
            throw new MetaDataException(msg);
        context.getRepository().getLog().warn(msg);
    }
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.