Package org.datanucleus.api.jpa.metamodel

Examples of org.datanucleus.api.jpa.metamodel.AttributeImpl


        {
            // First token is not the alias of this type, so reset the tokeniser
            tokeniser = new StringTokenizer(attrName, ".");
        }

        AttributeImpl currentAttr = null;
        while (tokeniser.hasMoreTokens())
        {
            token = tokeniser.nextToken();
            currentAttr = (AttributeImpl)currentType.getAttribute(token);
            if (currentAttr == null)
            {
                throw new IllegalArgumentException("Unable to access attribute " + token + " of " + currentType + " for join");
            }

            if (tokeniser.hasMoreTokens())
            {
                if (currentAttr.getPersistentAttributeType() == PersistentAttributeType.BASIC)
                {
                    throw new IllegalArgumentException("Cannot resolve attribute " + attrName + " since " +
                        token + " is not a relation field and the attribute name goes beyond it!");
                }
                currentType = (ManagedType)currentAttr.getType();
            }
        }

        return currentAttr;
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.api.jpa.metamodel.AttributeImpl

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.