Examples of DoesExistQuery


Examples of org.eclipse.persistence.queries.DoesExistQuery

        XMLCompositeObjectMapping doesExistQueryMapping = new XMLCompositeObjectMapping();
        doesExistQueryMapping.setAttributeName("doesExistQuery");
        // Handle translation of default does-exist to null.
        doesExistQueryMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                DoesExistQuery query = ((DescriptorQueryManager)object).getDoesExistQuery();
                if ((!query.isCallQuery()) && query.shouldCheckCacheForDoesExist()) {
                    return null;
                }
                return query;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                DoesExistQuery query = (DoesExistQuery)value;
                if (value == null) {
                    return;
                }
                ((DescriptorQueryManager)object).setDoesExistQuery(query);
            }
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

                }
            }           
            return objectFromCache;
        }

        DoesExistQuery existQuery = descriptor.getQueryManager().getDoesExistQuery();
        // Optimize cache option to avoid executing the does exist query.
        if (existQuery.shouldCheckCacheForDoesExist()) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);           
            if (unitOfWork.hasNewObjects() && unitOfWork.getNewObjectsOriginalToClone().containsKey(clone)) {
                this.mergedNewObjects.put(registeredObject, registeredObject);
            }           
            return registeredObject;
        }

        // Check early return to check if it is a new object, i.e. null primary key.
        Boolean doesExist = Boolean.FALSE;
        if (primaryKey != null) {
            doesExist = (Boolean)existQuery.checkEarlyReturn(clone, primaryKey, unitOfWork, null);
        }
        if (doesExist == Boolean.FALSE) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);//should use cloneAndRegisterNewObject to avoid the exist check
            this.mergedNewObjects.put(registeredObject, registeredObject);
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

        XMLCompositeObjectMapping doesExistQueryMapping = new XMLCompositeObjectMapping();
        doesExistQueryMapping.setAttributeName("doesExistQuery");
        // Handle translation of default does-exist to null.
        doesExistQueryMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                DoesExistQuery query = ((DescriptorQueryManager)object).getDoesExistQuery();
                if ((!query.isCallQuery()) && query.shouldCheckCacheForDoesExist()) {
                    return null;
                }
                return query;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                DoesExistQuery query = (DoesExistQuery)value;
                if (value == null) {
                    return;
                }
                ((DescriptorQueryManager)object).setDoesExistQuery(query);
            }
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

        XMLCompositeObjectMapping doesExistQueryMapping = new XMLCompositeObjectMapping();
        doesExistQueryMapping.setAttributeName("doesExistQuery");
        // Handle translation of default does-exist to null.
        doesExistQueryMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                DoesExistQuery query = ((DescriptorQueryManager)object).getDoesExistQuery();
                if ((!query.isCallQuery()) && query.shouldCheckCacheForDoesExist()) {
                    return null;
                }
                return query;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                DoesExistQuery query = (DoesExistQuery)value;
                if (value == null) {
                    return;
                }
                ((DescriptorQueryManager)object).setDoesExistQuery(query);
            }
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

     * INTERNAL:
     * Initialize the state of the descriptor query manager
     */
    public DescriptorQueryManager() {
        this.queries = new LinkedHashMap(5);
        setDoesExistQuery(new DoesExistQuery());// Always has a does exist.
        this.setQueryTimeout(DefaultTimeout);
    }
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

                }
            }           
            return objectFromCache;
        }

        DoesExistQuery existQuery = descriptor.getQueryManager().getDoesExistQuery();
        // Optimize cache option to avoid executing the does exist query.
        if (existQuery.shouldCheckCacheForDoesExist()) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor, false);           
            if (unitOfWork.hasNewObjects() && unitOfWork.getNewObjectsOriginalToClone().containsKey(clone)) {
                this.mergedNewObjects.put(registeredObject, registeredObject);
            }           
            return registeredObject;
        }

        // Check early return to check if it is a new object, i.e. null primary key.
        Boolean doesExist = Boolean.FALSE;
        if (primaryKey != null) {
            doesExist = (Boolean)existQuery.checkEarlyReturn(clone, primaryKey, unitOfWork, null);
        }
        if (doesExist == Boolean.FALSE) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor, shouldForceCascade);//should use cloneAndRegisterNewObject to avoid the exist check
            this.mergedNewObjects.put(registeredObject, registeredObject);
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

                }
            }           
            return objectFromCache;
        }

        DoesExistQuery existQuery = descriptor.getQueryManager().getDoesExistQuery();
        // Optimize cache option to avoid executing the does exist query.
        if (existQuery.shouldCheckCacheForDoesExist()) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);           
            if (unitOfWork.hasNewObjects() && unitOfWork.getNewObjectsOriginalToClone().containsKey(clone)) {
                this.mergedNewObjects.put(registeredObject, registeredObject);
            }           
            return registeredObject;
        }

        // Check early return to check if it is a new object, i.e. null primary key.
        Boolean doesExist = Boolean.FALSE;
        if (primaryKey != null) {
            doesExist = (Boolean)existQuery.checkEarlyReturn(clone, primaryKey, unitOfWork, null);
        }
        if (doesExist == Boolean.FALSE) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);//should use cloneAndRegisterNewObject to avoid the exist check
            this.mergedNewObjects.put(registeredObject, registeredObject);
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

        XMLCompositeObjectMapping doesExistQueryMapping = new XMLCompositeObjectMapping();
        doesExistQueryMapping.setAttributeName("doesExistQuery");
        // Handle translation of default does-exist to null.
        doesExistQueryMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                DoesExistQuery query = ((DescriptorQueryManager)object).getDoesExistQuery();
                if ((!query.isCallQuery()) && query.shouldCheckCacheForDoesExist()) {
                    return null;
                }
                return query;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                DoesExistQuery query = (DoesExistQuery)value;
                if (value == null) {
                    return;
                }
                ((DescriptorQueryManager)object).setDoesExistQuery(query);
            }
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

                }
            }           
            return objectFromCache;
        }

        DoesExistQuery existQuery = descriptor.getQueryManager().getDoesExistQuery();
        // Optimize cache option to avoid executing the does exist query.
        if (existQuery.shouldCheckCacheForDoesExist()) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);           
            if (unitOfWork.hasNewObjects() && unitOfWork.getNewObjectsOriginalToClone().containsKey(clone)) {
                this.mergedNewObjects.put(registeredObject, registeredObject);
            }           
            return registeredObject;
        }

        // Check early return to check if it is a new object, i.e. null primary key.
        Boolean doesExist = Boolean.FALSE;
        if (primaryKey != null) {
            doesExist = (Boolean)existQuery.checkEarlyReturn(clone, primaryKey, unitOfWork, null);
        }
        if (doesExist == Boolean.FALSE) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);//should use cloneAndRegisterNewObject to avoid the exist check
            this.mergedNewObjects.put(registeredObject, registeredObject);
View Full Code Here

Examples of org.eclipse.persistence.queries.DoesExistQuery

                }
            }           
            return objectFromCache;
        }

        DoesExistQuery existQuery = descriptor.getQueryManager().getDoesExistQuery();
        // Optimize cache option to avoid executing the does exist query.
        if (existQuery.shouldCheckCacheForDoesExist()) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);           
            if (unitOfWork.hasNewObjects() && unitOfWork.getNewObjectsOriginalToClone().containsKey(clone)) {
                this.mergedNewObjects.put(registeredObject, registeredObject);
            }           
            return registeredObject;
        }

        // Check early return to check if it is a new object, i.e. null primary key.
        Boolean doesExist = Boolean.FALSE;
        if (primaryKey != null) {
            doesExist = (Boolean)existQuery.checkEarlyReturn(clone, primaryKey, unitOfWork, null);
        }
        if (doesExist == Boolean.FALSE) {
            checkNewObjectLockVersion(clone, primaryKey, descriptor, unitOfWork);
            Object registeredObject = unitOfWork.internalRegisterObject(clone, descriptor);//should use cloneAndRegisterNewObject to avoid the exist check
            this.mergedNewObjects.put(registeredObject, registeredObject);
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.