Package javax.persistence.metamodel.Type

Examples of javax.persistence.metamodel.Type.PersistenceType


            metas.add(((AbstractManagedType<?>)root.getModel()).meta);
            for (Join<?,?> join : root.getJoins()) {
                Class<?> cls = join.getAttribute().getJavaType();
                if (join.getAttribute().isAssociation()) {
                    ClassMetaData meta = metamodel.getRepository().getMetaData(cls, null, true);
                    PersistenceType type = MetamodelImpl.getPersistenceType(meta);
                    if (type == PersistenceType.ENTITY || type == PersistenceType.EMBEDDABLE)
                        metas.add(meta);
                }
            }
        }
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

    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

            metas.add(((AbstractManagedType<?>)root.getModel()).meta);
            for (Join<?,?> join : root.getJoins()) {
                Class<?> cls = join.getAttribute().getJavaType();
                if (join.getAttribute().isAssociation()) {
                    ClassMetaData meta = metamodel.getRepository().getMetaData(cls, null, true);
                    PersistenceType type = MetamodelImpl.getPersistenceType(meta);
                    if (type == PersistenceType.ENTITY || type == PersistenceType.EMBEDDABLE)
                        metas.add(meta);
                }
            }
            for (Fetch<?,?> fetch : root.getFetches()) {
View Full Code Here

    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

    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

            metas.add(((AbstractManagedType<?>)root.getModel()).meta);
            for (Join<?,?> join : root.getJoins()) {
                Class<?> cls = join.getAttribute().getJavaType();
                if (join.getAttribute().isAssociation()) {
                    ClassMetaData meta = metamodel.getRepository().getMetaData(cls, null, true);
                    PersistenceType type = MetamodelImpl.getPersistenceType(meta);
                    if (type == PersistenceType.ENTITY || type == PersistenceType.EMBEDDABLE)
                        metas.add(meta);
                }
            }
            for (Fetch<?,?> fetch : root.getFetches()) {
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.