Package org.eclipse.persistence.internal.queries

Examples of org.eclipse.persistence.internal.queries.MapContainerPolicy


        defaultSequenceMapping.setReferenceClass(Sequence.class);
        defaultSequenceMapping.setXPath(getPrimaryNamespaceXPath() + "sequencing/" + getPrimaryNamespaceXPath() + "default-sequence");
        descriptor.addMapping(defaultSequenceMapping);

        XMLCompositeCollectionMapping sequencesMapping = new XMLCompositeCollectionMapping();
        MapContainerPolicy containerPolicy = new MapContainerPolicy(HashMap.class);
        containerPolicy.setKeyName("name", Sequence.class.getName());
        sequencesMapping.setContainerPolicy(containerPolicy);
        sequencesMapping.setAttributeName("sequences");
        sequencesMapping.setSetMethodName("setSequences");
        sequencesMapping.setGetMethodName("getSequencesToWrite");
        sequencesMapping.setReferenceClass(Sequence.class);
View Full Code Here


    public void useMapClassName(String concreteContainerClass, String methodName) {
        // the reference class has to be specified before coming here
        if (this.getReferenceClass() == null) {
            throw DescriptorException.referenceClassNotSpecified(this);
        }
        MapContainerPolicy policy = new MapContainerPolicy(concreteContainerClass);
        policy.setKeyName(methodName, getReferenceClass().getName());
        this.setContainerPolicy(policy);
    }
View Full Code Here

        }
        this.variableAttributeAccessor.initializeAttributes(this.getReferenceClass());
    }

    public void useMapClass(String concreteContainerClassName) {
      MapContainerPolicy policy = new MapContainerPolicy(concreteContainerClassName);                     
        this.setContainerPolicy(policy);
    }
View Full Code Here

      public void useMapClassName(String concreteContainerClassName, String methodName) {
          // the reference class has to be specified before coming here
          if (this.getReferenceClassName() == null) {
              throw DescriptorException.referenceClassNotSpecified(this);
          }
          MapContainerPolicy policy = new MapContainerPolicy(concreteContainerClassName);         
          policy.setKeyName(methodName, getReferenceClass().getName());
          this.setContainerPolicy(policy);
      }
View Full Code Here

    public void useListClassName(String concreteClass) {
        this.containerPolicy = new ListContainerPolicy(concreteClass);
    }

    public void useMapClass(Class concreteClass, String methodName) {
        this.containerPolicy = new MapContainerPolicy(concreteClass);
    }
View Full Code Here

    public void useMapClass(Class concreteClass, String methodName) {
        this.containerPolicy = new MapContainerPolicy(concreteClass);
    }

    public void useMapClassName(String concreteClass, String methodName) {
        this.containerPolicy = new MapContainerPolicy(concreteClass);
    }
View Full Code Here

                    AbstractSessionLog.getLog().log(SessionLog.FINEST, "metamodel_unable_to_determine_element_type_in_absence_of_generic_parameters", this);
                }
            } else if(mapping.isMapKeyMapping()) {                  
                ContainerPolicy policy = mapping.getContainerPolicy();
                if(policy.isMapPolicy()) {
                    MapContainerPolicy mapPolicy = (MapContainerPolicy) mapping.getContainerPolicy();
                    attributeClass = mapPolicy.getElementClass();
                } else if(policy.isDirectMapPolicy()) {
                    attributeClass = mapping.getAttributeClassification();
                } else {
                    // TODO: refactor: default to the managedType
                    attributeClass = managedType.getJavaType();
View Full Code Here

        defaultSequenceMapping.setReferenceClass(Sequence.class);
        defaultSequenceMapping.setXPath(getPrimaryNamespaceXPath() + "sequencing/" + getPrimaryNamespaceXPath() + "default-sequence");
        descriptor.addMapping(defaultSequenceMapping);

        XMLCompositeCollectionMapping sequencesMapping = new XMLCompositeCollectionMapping();
        MapContainerPolicy containerPolicy = new MapContainerPolicy(HashMap.class);
        containerPolicy.setKeyName("name", Sequence.class.getName());
        sequencesMapping.setContainerPolicy(containerPolicy);
        sequencesMapping.setAttributeName("sequences");
        sequencesMapping.setSetMethodName("setSequences");
        sequencesMapping.setGetMethodName("getSequencesToWrite");
        sequencesMapping.setReferenceClass(Sequence.class);
View Full Code Here

    public void useMapClassName(String concreteContainerClass, String methodName) {
        // the reference class has to be specified before coming here
        if (this.getReferenceClass() == null) {
            throw DescriptorException.referenceClassNotSpecified(this);
        }
        MapContainerPolicy policy = new MapContainerPolicy(concreteContainerClass);
        policy.setKeyName(methodName, getReferenceClass().getName());
        this.setContainerPolicy(policy);
    }
View Full Code Here

    public void useListClassName(String concreteClass) {
        this.containerPolicy = new ListContainerPolicy(concreteClass);
    }

    public void useMapClass(Class concreteClass, String methodName) {
        this.containerPolicy = new MapContainerPolicy(concreteClass);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.queries.MapContainerPolicy

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.