Package org.eclipse.persistence.internal.helper

Examples of org.eclipse.persistence.internal.helper.NonSynchronizedVector


            // set query args or execute args for the non-JPAQuery case,
            // i.e. stored proc/funcs get populated from ORM metadata
            // whereas named queries (SQL strings) do not...
            List queryArguments = query.getArguments();
            int queryArgumentsSize = queryArguments.size();
            Vector executeArguments = new NonSynchronizedVector();
            for (int i = 0; i < queryArgumentsSize; i++) {
                String argName = (String)queryArguments.get(i);
                executeArguments.add(invocation.getParameter(argName));
            }
            toBeDeleted = uow.executeQuery(query, executeArguments);
        }

        // JPAQuery will return a single result in a Vector
View Full Code Here


         }

         @Override
         public Object getAttributeValueFromObject(Object object) throws DescriptorException {
           IsSetNullPolicy aPolicy = (IsSetNullPolicy)object;
            NonSynchronizedVector aCollection = new NonSynchronizedVector();
            for(int i = 0, size = aPolicy.getIsSetParameters().length; i<size;i++) {
              aCollection.add(aPolicy.getIsSetParameters()[i]);
            }
            return aCollection;
         }
View Full Code Here

         }

         @Override
         public Object getAttributeValueFromObject(Object object) throws DescriptorException {
           IsSetNullPolicy aPolicy = (IsSetNullPolicy)object;
            NonSynchronizedVector aCollection = new NonSynchronizedVector();
            for(int i = 0, size = aPolicy.getIsSetParameterTypes().length; i<size;i++) {
              aCollection.add(aPolicy.getIsSetParameterTypes()[i]);
            }
            return aCollection;
         }
View Full Code Here

     * The default constructor initializes the sourceToTargetKeyFieldAssociations
     * and sourceToTargetKeys data structures.
     */
    public XMLCollectionReferenceMapping() {
        sourceToTargetKeyFieldAssociations = new HashMap();
        sourceToTargetKeys = new NonSynchronizedVector();
        this.containerPolicy = ContainerPolicy.buildDefaultPolicy();
        this.usesSingleNode = false;
    }
View Full Code Here

     */
    public void putCachedUpdateCalls(Vector updateFields, Vector updateCalls) {
        Vector vectorToCache = updateCalls;
        if (!updateCalls.isEmpty()) {
            int updateCallsSize = updateCalls.size();
            vectorToCache = new NonSynchronizedVector(updateCallsSize);
            for (int i = 0; i < updateCallsSize; i++) {
                DatasourceCall updateCall = (DatasourceCall)updateCalls.get(i);
                // clone call and dereference query for DatasourceCall and EJBQLCall
                DatasourceCall clonedUpdateCall = (DatasourceCall) updateCall.clone();
                clonedUpdateCall.setQuery(null);
View Full Code Here

     * The default constructor initializes the sourceToTargetKeyFieldAssociations
     * and sourceToTargetKeys data structures.
     */
    public XMLCollectionReferenceMapping() {
        sourceToTargetKeyFieldAssociations = new HashMap();
        sourceToTargetKeys = new NonSynchronizedVector();
        this.containerPolicy = ContainerPolicy.buildDefaultPolicy();
        this.usesSingleNode = false;
    }
View Full Code Here

        propertiesMapping.setAttributeName("properties");
        propertiesMapping.setReferenceClass(PropertyAssociation.class);
        propertiesMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                DatabaseMapping mapping = (DatabaseMapping)object;
                Vector propertyAssociations = new NonSynchronizedVector();
                for (Iterator i = mapping.getProperties().entrySet().iterator(); i.hasNext();) {
                    Map.Entry me = (Map.Entry)i.next();
                    PropertyAssociation propertyAssociation = new PropertyAssociation();
                    propertyAssociation.setKey(me.getKey());
                    propertyAssociation.setValue(me.getValue());
                    propertyAssociations.add(propertyAssociation);
                }
                return propertyAssociations;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                DatabaseMapping mapping = (DatabaseMapping)object;
                Vector propertyAssociations = (Vector)value;
                for (int i = 0; i < propertyAssociations.size(); i++) {
                    PropertyAssociation propertyAssociation = (PropertyAssociation)propertyAssociations.get(i);
                    mapping.getProperties().put(propertyAssociation.getKey(), propertyAssociation.getValue());
                }
            }
        });
        propertiesMapping.setXPath(getSecondaryNamespaceXPath() + "properties/" + getSecondaryNamespaceXPath() + "property");
View Full Code Here

        propertiesMapping.setAttributeName("properties");
        propertiesMapping.setReferenceClass(PropertyAssociation.class);
        propertiesMapping.setAttributeAccessor(new AttributeAccessor() {
            public Object getAttributeValueFromObject(Object object) {
                ClassDescriptor desc = (ClassDescriptor)object;
                Vector propertyAssociations = new NonSynchronizedVector();
                for (Iterator i = desc.getProperties().entrySet().iterator(); i.hasNext();) {
                    Map.Entry me = (Map.Entry)i.next();
                    PropertyAssociation propertyAssociation = new PropertyAssociation();
                    propertyAssociation.setKey(me.getKey());
                    propertyAssociation.setValue(me.getValue());
                    propertyAssociations.add(propertyAssociation);
                }
                return propertyAssociations;
            }

            public void setAttributeValueInObject(Object object, Object value) {
                ClassDescriptor desc = (ClassDescriptor)object;
                Vector propertyAssociations = (Vector)value;
                for (int i = 0; i < propertyAssociations.size(); i++) {
                    PropertyAssociation propertyAssociation = (PropertyAssociation)propertyAssociations.get(i);
                    desc.getProperties().put(propertyAssociation.getKey(), propertyAssociation.getValue());
                }
            }
        });
        propertiesMapping.setXPath(getSecondaryNamespaceXPath() + "properties/" + getSecondaryNamespaceXPath() + "property");
View Full Code Here

         }

         @Override
         public Object getAttributeValueFromObject(Object object) throws DescriptorException {
           IsSetNullPolicy aPolicy = (IsSetNullPolicy)object;
            NonSynchronizedVector aCollection = new NonSynchronizedVector();
            for(int i = 0, size = aPolicy.getIsSetParameters().length; i<size;i++) {
              aCollection.add(aPolicy.getIsSetParameters()[i]);
            }
            return aCollection;
         }
View Full Code Here

         }

         @Override
         public Object getAttributeValueFromObject(Object object) throws DescriptorException {
           IsSetNullPolicy aPolicy = (IsSetNullPolicy)object;
            NonSynchronizedVector aCollection = new NonSynchronizedVector();
            for(int i = 0, size = aPolicy.getIsSetParameterTypes().length; i<size;i++) {
              aCollection.add(aPolicy.getIsSetParameterTypes()[i]);
            }
            return aCollection;
         }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.helper.NonSynchronizedVector

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.