Examples of ApiAdapter


Examples of org.jpox.api.ApiAdapter

    public synchronized void attachObject(Object pc, boolean sco)
    {
        assertIsOpen();
        assertClassPersistable(pc.getClass());

        ApiAdapter api = getApiAdapter();
        Object id = api.getIdForObject(pc);
        if (id != null && isInserting(pc))
        {
            // Object is being inserted in this transaction so just return
            return;
        }
        else if (id == null && !sco)
        {
            // Transient object so needs persisting
            persistObjectInternal(pc, null, null, -1, StateManager.PC);
            return;
        }

        if (api.isDetached(pc))
        {
            // Detached, so migrate to attached
            StateManager l1CachedSM = (StateManager)cache.get(id);
            if (l1CachedSM != null && l1CachedSM.getObject() != pc)
            {
                // attached object with the same id already present in the L1 cache so cannot attach in-situ
                throw new JPOXUserException(LOCALISER.msg("010017",
                    StringUtils.toJVMIDString(pc)));
            }

            if (JPOXLogger.PERSISTENCE.isDebugEnabled())
            {
                JPOXLogger.PERSISTENCE.debug(LOCALISER.msg("010016",
                    StringUtils.toJVMIDString(pc)));
            }
            StateManager sm =
                StateManagerFactory.newStateManagerForDetached(this, pc, id, api.getVersionForObject(pc));
            sm.attach(sco);
        }
        else
        {
            // Not detached so can't attach it. Just return
View Full Code Here

Examples of org.jpox.api.ApiAdapter

    {
        assertIsOpen();
        assertClassPersistable(pc.getClass());
        assertDetachable(pc);

        ApiAdapter api = getApiAdapter();
        Object id = api.getIdForObject(pc);
        if (id != null && isInserting(pc))
        {
            // Object is being inserted in this transaction
            return pc;
        }
        else if (id == null && !sco)
        {
            // Object was not persisted before so persist it
            return persistObjectInternal(pc, null, null, -1, StateManager.PC);
        }
        else if (api.isPersistent(pc))
        {
            // Already persistent hence can't be attached
            return pc;
        }
View Full Code Here

Examples of org.jpox.api.ApiAdapter

                sm.loadFieldValues(fv); // Load the values retrieved by the query
                return pc;
            }
            if (checkInheritance)
            {
                ApiAdapter api = getApiAdapter();
                if (oid instanceof OID || api.isSingleFieldIdentity(oid))
                {
                    // Check if this id for any known subclasses is in the cache to save searching
                    String[] subclasses = getMetaDataManager().getSubclassesForClass(pcClass.getName(), true);
                    if (subclasses != null)
                    {
                        for (int i=0;i<subclasses.length;i++)
                        {
                            if (oid instanceof OID)
                            {
                                oid = OIDFactory.getInstance(this, subclasses[i], ((OID)oid).getKeyValue());
                            }
                            else if (api.isSingleFieldIdentity(oid))
                            {
                                oid = api.getNewSingleFieldIdentity(oid.getClass(), clr.classForName(subclasses[i]),
                                    api.getTargetKeyForSingleFieldIdentity(oid));
                            }
                            pc = getObjectFromCache(oid);
                            if (pc != null)
                            {
                                sm = findStateManager(pc);
View Full Code Here

Examples of org.jpox.api.ApiAdapter

        // try to find object in cache(s)
        Object pc = getObjectFromCache(id);
        boolean fromCache = true;

        ApiAdapter api = getApiAdapter();
        if (id instanceof SCOID && pc != null)
        {
            if (api.isPersistent(pc) && !api.isNew(pc) && !api.isDeleted(pc) && !api.isTransactional(pc))
            {
                // JDO2 [5.4.4] Cant return HOLLOW nondurable objects
                throw new JPOXUserException(LOCALISER.msg("010005"));
            }
        }

        if (pc != null && api.isTransactional(pc))
        {
            // JDO2 [12.6.5] If there's already an object with the same id and it's transactional, return it
            return pc;
        }

        StateManager sm = null;
        if (pc == null)
        {
            // Find it direct from the store if the store supports that
            pc = getStoreManager().getPersistenceHandler().findObject(this, id);

            if (pc == null)
            {
                // Object not found in cache(s) with this identity
                String className = null;
                String originalClassName = null;
                boolean checkedClassName = false;
                if (id instanceof SCOID)
                {
                    throw new JPOXUserException(LOCALISER.msg("010006"));
                }
                else if (id instanceof OID)
                {
                    // OID, so check that the implied class is managed
                    originalClassName = getStoreManager().manageClassForIdentity(id, getClassLoaderResolver());
                }
                else if (api.isSingleFieldIdentity(id))
                {
                    // SingleFieldIdentity, so check that the implied class is managed
                    originalClassName = getStoreManager().manageClassForIdentity(id, getClassLoaderResolver());
                }
                else if (objectClassName != null)
                {
                    // Object class name specified so use that directly
                    originalClassName = objectClassName;
                }
                else
                {
                    // We dont know the object class so try to deduce it from what is known by the StoreManager
                    originalClassName = getStoreManager().getClassNameForObjectID(id, clr, this);
                    checkedClassName = true;
                }

                if (checkInheritance)
                {
                    // Verify if correct class inheritance level is set
                    if (!checkedClassName)
                    {
                        className = getStoreManager().getClassNameForObjectID(id, clr, this);
                    }
                    else
                    {
                        // We just checked the name of the class in the section above so just use that
                        className = originalClassName;
                    }
   
                    if (className == null)
                    {
                        throw new JPOXObjectNotFoundException(LOCALISER.msg("010026"), id);
                    }
   
                    if (originalClassName != null && !originalClassName.equals(className))
                    {
                        // Inheritance checking has found a different inherited
                        // object with this identity so create new id
                        if (id instanceof OID)
                        {
                            // Create new OID using correct target class
                            id = OIDFactory.getInstance(this, className, ((OID)id).getKeyValue());
   
                            // try again to read object from cache with this id
                            pc = getObjectFromCache(id);
                        }
                        else if (api.isSingleFieldIdentity(id))
                        {
                            // Create new SingleFieldIdentity using correct targetClass
                            id = api.getNewSingleFieldIdentity(id.getClass(), getClassLoaderResolver().classForName(className),
                                    api.getTargetKeyForSingleFieldIdentity(id));
   
                            // try again to read object from cache with this id
                            pc = getObjectFromCache(id);
                        }
                    }
View Full Code Here

Examples of org.jpox.api.ApiAdapter

        List failures = null;
        try
        {
            // Commit all enlisted StateManagers
            ApiAdapter api = getApiAdapter();
            StateManager[] sms = (StateManager[]) enlistedSMCache.values().toArray(new StateManager[enlistedSMCache.size()]);
            for (int i = 0; i < sms.length; ++i)
            {
                try
                {
                    // Perform any operations required after committing
                    //TODO this if is due to sms that can have lc == null, why?, should not be here then
                    if (sms[i] != null &&
                        sms[i].getObject() != null &&
                        (api.isPersistent(sms[i].getObject()) || api.isTransactional(sms[i].getObject())))
                    {
                        sms[i].postCommit(getTransaction());
   
                        // TODO Change this check so that we remove all objects that are no longer suitable for caching
                        if (detachAllOnCommit && api.isDetachable(sms[i].getObject()))
                        {
                            // "DetachAllOnCommit" - Remove the object from the L1 cache since it is now detached
                            removeStateManager(sms[i]);
                        }
                    }
View Full Code Here

Examples of org.jpox.api.ApiAdapter

     * @param clr ClassLoaderResolver to use for loading any key/value types
     * @param primary the primary ClassLoader to use (or null)
     */
    public void populate(ClassLoaderResolver clr, ClassLoader primary)
    {
        ApiAdapter api = getMetaDataManager().getApiAdapter();

        // Check the field type and see if it is castable to a Map
        Class field_type = getMemberMetaData().getType();
        if (!java.util.Map.class.isAssignableFrom(field_type))
        {
            throw new InvalidMetaDataException(LOCALISER,
                    "044145",
                    getFieldName(),getMemberMetaData().getClassName(false));
        }

        // "key-type"
        if (key.type == null)
        {
            throw new InvalidMetaDataException(LOCALISER,
                    "044146",
                    getFieldName(),getMemberMetaData().getClassName(false));
        }

        // Check that the key type exists
        Class keyTypeClass = null;
        try
        {
            keyTypeClass = clr.classForName(key.type, primary);
        }
        catch (ClassNotResolvedException cnre)
        {
            try
            {
                // Maybe the user specified a java.lang class without fully-qualifying it
                // This is beyond the scope of the JDO spec which expects java.lang cases to be fully-qualified
                keyTypeClass = clr.classForName(ClassUtils.getJavaLangClassForType(key.type), primary);
            }
            catch (ClassNotResolvedException cnre2)
            {
                throw new InvalidMetaDataException(LOCALISER,
                    "044147",
                    getFieldName(),getMemberMetaData().getClassName(false),
                    key.type);
            }
        }

        if (!keyTypeClass.getName().equals(key.type))
        {
            // The value-type has been resolved from what was specified in the MetaData - update to the fully-qualified name
            JPOXLogger.METADATA.info(LOCALISER.msg("044148", getFieldName(), getMemberMetaData().getClassName(false),
                key.type, keyTypeClass.getName()));
            key.type = keyTypeClass.getName();
        }

        // "embedded-key"
        if (key.embedded == null)
        {
            // Assign default for "embedded-key" based on 18.13.2 of JDO 2 spec
            if (getMetaDataManager().getOMFContext().getTypeManager().isDefaultEmbeddedType(keyTypeClass))
            {
                key.embedded = Boolean.TRUE;
            }
            else if (api.isPersistable(keyTypeClass) ||
                Object.class.isAssignableFrom(keyTypeClass) ||
                keyTypeClass.isInterface())
            {
                key.embedded = Boolean.FALSE;
            }
            else
            {
                key.embedded = Boolean.TRUE;
            }
        }
        if (key.embedded == Boolean.FALSE)
        {
            // If the user has set a non-PC/non-Interface as not embedded, correct it since not supported.
            // Note : this fails when using in the enhancer since not yet PC
            if (!api.isPersistable(keyTypeClass) && !keyTypeClass.isInterface() &&
                keyTypeClass != java.lang.Object.class)
            {
                key.embedded = Boolean.TRUE;
            }
        }
        KeyMetaData keymd = ((AbstractMemberMetaData)parent).getKeyMetaData();
        if (keymd != null && keymd.getEmbeddedMetaData() != null)
        {
            // If the user has specified <embedded>, set to true
            key.embedded = Boolean.TRUE;
        }

        // "value-type"
        if (value.type == null)
        {
            throw new InvalidMetaDataException(LOCALISER,
                    "044149",
                    getFieldName(),getMemberMetaData().getClassName(false));
        }

        // Check that the value-type exists
        Class valueTypeClass = null;
        try
        {
            valueTypeClass = clr.classForName(value.type);
        }
        catch (ClassNotResolvedException cnre)
        {
            try
            {
                // Maybe the user specified a java.lang class without fully-qualifying it
                // This is beyond the scope of the JDO spec which expects java.lang cases to be fully-qualified
                valueTypeClass = clr.classForName(ClassUtils.getJavaLangClassForType(value.type));
            }
            catch (ClassNotResolvedException cnre2)
            {
                throw new InvalidMetaDataException(LOCALISER,
                    "044150",
                    getFieldName(),getMemberMetaData().getClassName(false),
                    value.type);
            }
        }

        if (!valueTypeClass.getName().equals(value.type))
        {
            // The value-type has been resolved from what was specified in the MetaData - update to the fully-qualified name
            JPOXLogger.METADATA.info(LOCALISER.msg("044151", getFieldName(), getMemberMetaData().getClassName(false),
                value.type, valueTypeClass.getName()));
            value.type = valueTypeClass.getName();
        }

        // "embedded-value"
        if (value.embedded == null)
        {
            // Assign default for "embedded-value" based on 18.13.2 of JDO 2 spec
            if (getMetaDataManager().getOMFContext().getTypeManager().isDefaultEmbeddedType(valueTypeClass))
            {
                value.embedded = Boolean.TRUE;
            }
            else if (api.isPersistable(valueTypeClass) ||
                Object.class.isAssignableFrom(valueTypeClass) ||
                valueTypeClass.isInterface())
            {
                value.embedded = Boolean.FALSE;
            }
            else
            {
                value.embedded = Boolean.TRUE;
            }
        }
        if (value.embedded == Boolean.FALSE)
        {
            // If the user has set a non-PC/non-Interface as not embedded, correct it since not supported.
            // Note : this fails when using in the enhancer since not yet PC
            if (!api.isPersistable(valueTypeClass) && !valueTypeClass.isInterface() &&
                valueTypeClass != java.lang.Object.class)
            {
                value.embedded = Boolean.TRUE;
            }
        }
View Full Code Here

Examples of org.jpox.api.ApiAdapter

     * @param clr ClassLoaderResolver to use for any loading operations
     * @param primary the primary ClassLoader to use (or null)
     */
    public void populate(ClassLoaderResolver clr, ClassLoader primary)
    {
        ApiAdapter api = getMetaDataManager().getApiAdapter();

        // Check the field type and see if it is castable to a Collection
        Class field_type = getMemberMetaData().getType();
        if (!java.util.Collection.class.isAssignableFrom(field_type))
        {
            throw new InvalidMetaDataException(LOCALISER,
                    "044132",
                    getFieldName(),getMemberMetaData().getClassName(false));
        }

        // "element-type"
        if (element.type == null)
        {
            throw new InvalidMetaDataException(LOCALISER,
                    "044133",
                    getFieldName(),getMemberMetaData().getClassName(false));
        }

        // Check that the key type exists
        Class elementTypeClass = null;
        try
        {
            elementTypeClass = clr.classForName(element.type, primary);
        }
        catch (ClassNotResolvedException cnre)
        {
            try
            {
                // Maybe the user specified a java.lang class without fully-qualifying it
                // This is beyond the scope of the JDO spec which expects java.lang cases to be fully-qualified
                elementTypeClass = clr.classForName(ClassUtils.getJavaLangClassForType(element.type), primary);
            }
            catch (ClassNotResolvedException cnre2)
            {
                throw new InvalidMetaDataException(LOCALISER,
                    "044134",
                    getFieldName(),getMemberMetaData().getClassName(false),
                    element.type);
            }
        }

        if (!elementTypeClass.getName().equals(element.type))
        {
            // The element-type has been resolved from what was specified in the MetaData - update to the fully-qualified name
            JPOXLogger.METADATA.info(LOCALISER.msg("044135", getFieldName(), getMemberMetaData().getClassName(false),
                element.type, elementTypeClass.getName()));
            element.type = elementTypeClass.getName();
        }

    // "embedded-element"
        if (element.embedded == null)
        {
            // Assign default for "embedded-element" based on 18.13.1 of JDO 2 spec
            // Note : this fails when using in the enhancer since not yet PC
            if (getMetaDataManager().getOMFContext().getTypeManager().isDefaultEmbeddedType(elementTypeClass))
            {
                element.embedded = Boolean.TRUE;
            }
            else if (api.isPersistable(elementTypeClass) ||
                Object.class.isAssignableFrom(elementTypeClass) ||
                elementTypeClass.isInterface())
            {
                element.embedded = Boolean.FALSE;
            }
            else
            {
                element.embedded = Boolean.TRUE;
            }
        }
        if (element.embedded == Boolean.FALSE)
        {
            // If the user has set a non-PC/non-Interface as not embedded, correct it since not supported.
            // Note : this fails when using in the enhancer since not yet PC
            if (!api.isPersistable(elementTypeClass) && !elementTypeClass.isInterface() &&
                elementTypeClass != java.lang.Object.class)
            {
                element.embedded = Boolean.TRUE;
            }
        }

        ElementMetaData elemmd = ((AbstractMemberMetaData)parent).getElementMetaData();
        if (elemmd != null && elemmd.getEmbeddedMetaData() != null)
        {
            element.embedded = Boolean.TRUE;
        }

        if (element.dependent == Boolean.TRUE)
        {
            // If the user has set a non-PC/non-reference as dependent, correct it since not valid.
            // Note : this fails when using in the enhancer since not yet PC
            if (!api.isPersistable(elementTypeClass) && !elementTypeClass.isInterface() &&
                elementTypeClass != java.lang.Object.class)
            {
                element.dependent = Boolean.FALSE;
            }
        }
View Full Code Here

Examples of org.jpox.api.ApiAdapter

     * @throws InvalidMetaDataException if the identity type is APPLICATION but not primary key fields have been set
     * @throws InvalidMetaDataException if the <code>objectid-class</code> cannot be loaded by the <code>clr</code>                                                                    
     */
    protected void determineObjectIdClass(ClassLoaderResolver clr)
    {
        ApiAdapter api = getMetaDataManager().getApiAdapter();

        // Update "objectid-class" if required yet not specified
        if (objectidClass == null && persistenceCapableSuperclass == null && identityType == IdentityType.APPLICATION)
        {
            int no_of_pk_fields = 0;
            AbstractMemberMetaData fmd_pk = null;
            Iterator fields_pk_iter=members.iterator();
            while (fields_pk_iter.hasNext())
            {
                AbstractMemberMetaData fmd=(AbstractMemberMetaData)fields_pk_iter.next();
                if (fmd.isPrimaryKey())
                {
                    fmd_pk = fmd;
                    no_of_pk_fields++;
                }
            }

            // Check for more than 1 field
            if (no_of_pk_fields > 1 || no_of_pk_fields == 0)
            {
                JPOXLogger.METADATA.error(LOCALISER.msg("044065", fullName, "" + no_of_pk_fields));
                throw new InvalidMetaDataException(LOCALISER, "044065", fullName, "" + no_of_pk_fields);
            }

            // Assign associated SingleField identity class
            Class pk_type = fmd_pk.getType();
            if (Byte.class.isAssignableFrom(pk_type) ||
                byte.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForByte();
            }
            else if (Character.class.isAssignableFrom(pk_type) ||
                     char.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForChar();
            }
            else if (Integer.class.isAssignableFrom(pk_type) ||
                     int.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForInt();
            }
            else if (Long.class.isAssignableFrom(pk_type) ||
                     long.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForLong();
            }
            else if (Short.class.isAssignableFrom(pk_type) ||
                     short.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForShort();
            }
            else if (String.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForString();
            }
            else if (Object.class.isAssignableFrom(pk_type))
            {
                objectidClass = api.getSingleFieldIdentityClassNameForObject();
            }
            else
            {
                JPOXLogger.METADATA.error(LOCALISER.msg("044066", fullName, pk_type.getName()));
                throw new InvalidMetaDataException(LOCALISER, "044066", fullName, pk_type.getName());
            }
            JPOXLogger.METADATA.info(LOCALISER.msg("044064", fullName, objectidClass));
        }

        // Check no of primary key fields (inc superclass)
        int no_of_pk_fields = getNoOfPopulatedPKMembers();
        if (no_of_pk_fields == 0 && identityType == IdentityType.APPLICATION)
        {
            // No primary key fields found (even in superclasses)
            throw new InvalidMetaDataException(LOCALISER,
                "044077",
                fullName,objectidClass);
        }

        // Update "objectid-class" since has been specified.
        // Only check at the least derived pc class
        if (objectidClass != null && getPersistenceCapableSuperclass() == null)
        {
            Class obj_cls = null;
            try
            {
                // Load the class, using the same class loader resolver as this class
                obj_cls=clr.classForName(objectidClass);
            }
            catch (ClassNotResolvedException cnre)
            {
                // ObjectIdClass not found
                throw new InvalidMetaDataException(LOCALISER,
                    "044079",
                    fullName,objectidClass);
            }

            boolean validated = false;
            Set errors = new HashSet();
            try
            {
                // Check against the API Adapter in use for this MetaData
                if (api.isValidPrimaryKeyClass(obj_cls, this, clr, no_of_pk_fields))
                {
                    validated = true;
                }
            }
            catch (JPOXException ex)
View Full Code Here

Examples of org.jpox.api.ApiAdapter

     * @param name the API name
     */
    public void setApi(String name)
    {
        this.apiName = name;
        ApiAdapter adapter = ApiAdapterFactory.getInstance().getApiAdapter(name);
        if (adapter != null)
        {
            this.apiAdapter = adapter;
        }
        else
View Full Code Here

Examples of org.jpox.api.ApiAdapter

                ScalarExpression oidExpr =  m.newLiteral(qs,((OID)value).getKeyValue());
                bExpr = expr.expressionList.getExpression(0).eq(oidExpr);
            }
            else
            {
                ApiAdapter api = qs.getStoreManager().getApiAdapter();
                AbstractClassMetaData cmd = storeMgr.getOMFContext().getMetaDataManager().getMetaDataForClass(value.getClass(), clr);
                if (cmd == null)
                {
                    // if there is no metadata, we either have an SingleFieldIdentity, application identity, or any object
                    if (storeMgr.getApiAdapter().isSingleFieldIdentityClass(value.getClass().getName()))
                    {
                        // Object is SingleFieldIdentity
                        JavaTypeMapping m = dba.getMapping(api.getTargetClassForSingleFieldIdentity(value), storeMgr, clr);
                        ScalarExpression oidExpr =  m.newLiteral(qs, api.getTargetKeyForSingleFieldIdentity(value));
                        bExpr = expr.expressionList.getExpression(0).eq(oidExpr);
                    }
                    else
                    {
                        String pcClassName = storeMgr.getClassNameForObjectID(value, clr, null);
                        if (pcClassName != null)
                        {
                            // Object is an application identity
                            cmd = storeMgr.getOMFContext().getMetaDataManager().getMetaDataForClass(pcClassName, clr);
                            bExpr = eqApplicationIdentity(value, null, expr, null, storeMgr, clr);
                        }
                        else
                        {
                            // Value not PersistenceCapable nor an identity, so return nothing "(1 = 0)"
                            bExpr = new BooleanLiteral(qs, mapping, false).eq(new BooleanLiteral(qs, mapping, true));
                        }
                    }
                }
                else
                {
                    // Value is a PersistenceCapable
                    if (cmd.getIdentityType() == IdentityType.APPLICATION)
                    {
                        // Application identity
                        if (api.getIdForObject(value) != null)
                        {
                            // Persistent PC object (FCO)
                            // Cater for composite PKs and parts of PK being PC mappings, and recursion
                            JavaTypeMapping[] pkMappingsApp = new JavaTypeMapping[expr.expressionList.size()];
                            Object[] pkFieldValues = new Object[expr.expressionList.size()];
                            int position = 0;
                            for (int i=0;i<cmd.getNoOfPrimaryKeyMembers();i++)
                            {
                                AbstractMemberMetaData mmd = cmd.getMetaDataForManagedMemberAtAbsolutePosition(cmd.getPKMemberPositions()[i]);
                                Object fieldValue = getFieldValue(mmd, value);
                                JavaTypeMapping mapping = dba.getMapping(fieldValue.getClass(), storeMgr, clr);
                                if (mapping instanceof PersistenceCapableMapping)
                                {
                                    position = populatePrimaryKeyMappingsValuesForPCMapping(pkMappingsApp,
                                        pkFieldValues, position, (PersistenceCapableMapping)mapping,
                                        cmd, mmd, fieldValue, storeMgr, clr);
                                }
                                else
                                {
                                    pkMappingsApp[position] = mapping;
                                    pkFieldValues[position] = fieldValue;
                                    position++;
                                }
                            }

                            for (int i=0; i<expr.expressionList.size(); i++)
                            {
                                ScalarExpression source = expr.expressionList.getExpression(i);
                                ScalarExpression target = pkMappingsApp[i].newLiteral(qs, pkFieldValues[i]);
                                if (bExpr == null)
                                {
                                    bExpr = source.eq(target);
                                }
                                else
                                {
                                    bExpr = bExpr.and(source.eq(target));
                                }
                            }
                        }
                        else
                        {
                            // PC object with no id (embedded, or transient maybe)
                            for (int i=0; i<expr.expressionList.size(); i++)
                            {
                                // Query should return nothing (so just do "(1 = 0)")
                                JPOXLogger.QUERY.warn(LOCALISER.msg("037003", value));
                                bExpr = new BooleanLiteral(qs, mapping, false).eq(new BooleanLiteral(qs, mapping, true));
                                // It is arguable that we should compare the id with null (as below)
                                /*bExpr = expr.eq(new NullLiteral(qs));*/
                            }
                        }
                    }
                    else
                    {
                        // Datastore identity
                        for (int i=0; i<expr.expressionList.size(); i++)
                        {
                            ScalarExpression source = expr.expressionList.getExpression(i);
                            OID objectId = (OID)api.getIdForObject(value);
                            if (objectId == null)
                            {
                                // PC object with no id (embedded, or transient maybe)
                                // Query should return nothing (so just do "(1 = 0)")
                                JPOXLogger.QUERY.warn(LOCALISER.msg("037003", value));
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.