Package org.apache.openjpa.kernel.exps

Examples of org.apache.openjpa.kernel.exps.Literal


                literalType = Literal.TYPE_STRING;
            } else if (Enum.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_ENUM;
            } else if (Class.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_CLASS;
                Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
                ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
                Class<?> candidate = can.getDescribedType();
                if (candidate.isAssignableFrom((Class)value)) {
                   lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
                } else {
                    lit.setMetaData(can);
                }
                return lit;
            } else if (Collection.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_COLLECTION;
            }
View Full Code Here


                literalType = Literal.TYPE_STRING;
            } else if (Enum.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_ENUM;
            } else if (Class.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_CLASS;
                Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
                ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
                Class<?> candidate = can.getDescribedType();
                if (candidate.isAssignableFrom((Class)value)) {
                   lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
                } else {
                    lit.setMetaData(can);
                }
                return lit;
            } else if (Collection.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_COLLECTION;
            }
View Full Code Here

                literalType = Literal.TYPE_STRING;
            } else if (Enum.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_ENUM;
            } else if (Class.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_CLASS;
                Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
                ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
                Class<?> candidate = can.getDescribedType();
                if (candidate.isAssignableFrom((Class)value)) {
                   lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
                } else {
                    lit.setMetaData(can);
                }
                return lit;
            } else if (Collection.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_COLLECTION;
            }
View Full Code Here

                literalType = Literal.TYPE_STRING;
            } else if (Enum.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_ENUM;
            } else if (Class.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_CLASS;
                Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
                ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
                Class<?> candidate = can.getDescribedType();
                if (candidate.isAssignableFrom((Class)value)) {
                   lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
                } else {
                    lit.setMetaData(can);
                }
                return lit;
            } else if (Collection.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_COLLECTION;
            }
View Full Code Here

                literalType = Literal.TYPE_STRING;
            } else if (Enum.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_ENUM;
            } else if (Class.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_CLASS;
                Literal lit = factory.newTypeLiteral(value, Literal.TYPE_CLASS);
                ClassMetaData can = ((Types.Entity<X>)q.getRoot().getModel()).meta;
                Class<?> candidate = can.getDescribedType();
                if (candidate.isAssignableFrom((Class)value)) {
                   lit.setMetaData(q.getMetamodel().getRepository().getMetaData((Class<?>)value, null, true));
                } else {
                    lit.setMetaData(can);
                }
                return lit;
            } else if (Collection.class.isAssignableFrom(literalClass)) {
                literalType = Literal.TYPE_COLLECTION;
            }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.kernel.exps.Literal

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.