Examples of MappedStoreManager


Examples of org.jpox.store.mapped.MappedStoreManager

     * @param id Identifier of the named parameter, starts with "?" followed by the number
     * @return Expression representing the numbered param
     */
    protected ScalarExpression compileNumberedImplicitParameter(String id)
    {
        MappedStoreManager srm = (MappedStoreManager)query.getObjectManager().getStoreManager();
        ClassLoaderResolver clr = query.getObjectManager().getClassLoaderResolver();
        id = id.substring(1); // Omit the "?"
        Integer position = new Integer(id);
        if (processedParameters == null)
        {
            processedParameters = new HashSet();
        }
        processedParameters.add(position); // Register as processed for this query

        if (parameters != null && parameters.size() > 0)
        {
            if (parameters.containsKey(position))
            {
                // Implicit parameter already found, so reuse the value
                Object paramValue = parameters.get(position);
                if (paramValue != null)
                {
                    JavaTypeMapping m = srm.getDatastoreAdapter().getMapping(paramValue.getClass(), srm, clr);
                    ScalarExpression paramExpr = m.newLiteral(qs, paramValue);
                    paramExpr.setParameterName(id);
                    paramExpr.checkForTypeAssignability();
                    return paramExpr;
                }
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.