Package javax.persistence.metamodel.Type

Examples of javax.persistence.metamodel.Type.PersistenceType


    public MetamodelImpl(MetaDataRepository repos) {
        this.repos = repos;
        Collection<Class<?>> classes = repos.loadPersistentTypes(true, null);
        for (Class<?> cls : classes) {
          ClassMetaData meta = repos.getMetaData(cls, null, true);
            PersistenceType type = getPersistenceType(meta);
            switch (type) {
            case ENTITY:
                find(cls, _entities, ENTITY);
                if (meta.isEmbeddable())
                    find(cls, _embeddables, EMBEDDABLE);
View Full Code Here


     * @param container
     * @param expected
     */
    private <X,V extends ManagedType<?>> void instantiate(Class<X> cls, ClassMetaData meta,
            Map<Class<?>,V> container, PersistenceType expected) {
        PersistenceType actual = getPersistenceType(meta);
        if (actual != expected) {
            if (!meta.isEmbeddable() || actual != PersistenceType.ENTITY ||
                expected != PersistenceType.EMBEDDABLE)
                throw new IllegalArgumentException( _loc.get("type-wrong-category",
                    cls, actual, expected).getMessage());
View Full Code Here

        {
            // Check if this embeddable type is already present in
            // collection of MetaModelBuider.
            AbstractManagedType<T> embeddableType = null;

            PersistenceType persistenceType = PersistenceType.BASIC;
            Annotation embeddableAnnotation = attribType.getAnnotation(Embeddable.class);
            if (embeddableAnnotation != null)
            {
                persistenceType = PersistenceType.EMBEDDABLE;
            }
View Full Code Here

TOP

Related Classes of javax.persistence.metamodel.Type.PersistenceType

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.