Examples of ClassExpression


Examples of org.jpox.store.mapped.expression.ClassExpression

                Class cls = null;
                try
                {
                    cls = query.resolveClassDeclaration(name);
                    expr = new ClassExpression(qs, cls);
                }
                catch (JPOXUserException jdoe)
                {
                    if (aliasInfo == null && name.indexOf('.') > 0)
                    {
                        // Try without the last part of the name (in case its a class name plus field or method)
                        String partialName = name.substring(0, name.lastIndexOf('.'));
                        String finalNamePart = name.substring(name.lastIndexOf('.')+1);
                        try
                        {
                            //try method invocation
                            expr = callUserDefinedScalarExpression(name);
                            if (expr == null)
                            {
                                cls = query.resolveClassDeclaration(partialName);
                                //try field access
                                expr = new ClassExpression(qs, cls);
                                expr = expr.accessField(finalNamePart, true);
                            }
                        }
                        catch (JPOXUserException jdoe2)
                        {
                            throw new JPOXUserException(LOCALISER.msg("021066", partialName),jdoe2);
                        }
                    }
                    else
                    {
                        try
                        {
                            // try with candidate class using field access
                            expr = new ClassExpression(qs, candidateClass);
                            expr = expr.accessField(name, true);
                        }
                        catch (JPOXUserException jdoe2)
                        {
                            // Implicit variable
View Full Code Here

Examples of org.jpox.store.mapped.expression.ClassExpression

                Class cls = null;
                try
                {
                    cls = query.resolveClassDeclaration(name);
                    expr = new ClassExpression(qs, cls);
                }
                catch (JPOXUserException jpue)
                {
                    if (name.indexOf('.') > 0)
                    {
                        // Try without the last part of the name (in case its a class name plus field or method)
                        String partialName = name.substring(0, name.lastIndexOf('.'));
                        String finalNamePart = name.substring(name.lastIndexOf('.') + 1);
                        try
                        {
                            // try method invocation
                            expr = callUserDefinedScalarExpression(name);
                            if (expr == null)
                            {
                                // try with this class using field access
                                cls = query.resolveClassDeclaration(partialName);
                                expr = new ClassExpression(qs, cls);
                                expr = expr.accessField(finalNamePart, true);
                            }
                        }
                        catch (JPOXUserException jpue2)
                        {
                            throw new JPOXUserException(LOCALISER.msg("021066", partialName), jpue2);
                        }
                    }
                    else
                    {
                        try
                        {
                            // try with candidate class using field access
                            expr = new ClassExpression(qs, candidateClass);
                            expr = expr.accessField(name, true);
                        }
                        catch (JPOXUserException jpue2)
                        {
                            // Implicit variable
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.