Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.JavaQName


        throw new IllegalStateException("No tables have been added.");
      }
      headTable = (TableInfo) iter.next();
    }
  
    JavaQName resultType = JavaQNameImpl.getInstance(Object[].class);
    JavaMethod jm = pSource.newJavaMethod("clone", resultType, JavaSource.PUBLIC);
    jm.addThrows(SQLException.class);
    JavaComment jc = jm.newComment();
    jc.addLine("<p>This method takes as input the key values of a row in the table " +
               headTable.getTable().getQName() + ".");
View Full Code Here


   *
   * @param classes
   * @return
   */
  public static JavaQName getCommonJavaType(List types) {
    JavaQName parentType = null;
    JavaQName ownType = null;
    boolean ownTypeIsObject = false;
    boolean parentTypeIsObject = false;
   
    for(int i=0;i<types.size();i++) {
      XmlSchemaType type = (XmlSchemaType)types.get(i);
      JavaQName currentOwnType = getOwnType(type);
      JavaQName currentParentType = getParentType(type);
     
      if(log.isDebugEnabled())
        log.debug(type.getQName().toString()+" [ownType="+currentOwnType.getClassName()
            +",parentType="+currentParentType.getClassName()+"]");
     
      if(ownType==null)
        ownType = currentOwnType;
      else if(!ownTypeIsObject && !ownType.getClassName().equals(currentOwnType.getClassName())) {
        ownType = JavaQNameImpl.getInstance(Object.class);
        ownTypeIsObject = true;
      }
       
      if(parentType==null)
        parentType = currentParentType;
      else if(!parentTypeIsObject && !parentType.getClassName().equals(currentParentType.getClassName())) {
        parentType = JavaQNameImpl.getInstance(Object.class);
        parentTypeIsObject = true;
      }
    }
   
View Full Code Here

   
    return _package.toString();
  }
 
  public static JavaQName toJavaQName(QName qname) {
    JavaQName jQName = (JavaQName)javaQNames.get(qname.toString());
    if(jQName==null && qname.getNamespaceURI().equals(W3C_XML_SCHEMA_NS_URI))
      throw new RuntimeException("Unsupported xsd type : "+qname.getLocalPart());
    if(jQName==null)
      jQName = JavaQNameImpl.getInstance(toJavaPackage(qname.getNamespaceURI(),qname.getLocalPart()));
     
View Full Code Here

    return field.toString();
  }
 
  public static boolean isSimpleType(QName qname) {
    JavaQName jQName = (JavaQName)javaQNames.get(qname.toString());
    return jQName!=null;
  }
View Full Code Here

    if(options.hasGetter()) this.addGetter(propertyName, JavaSourceUtils.getGetterName(propertyName), fieldType);
  }
 
  public void addPropertyList(String propertyName, JavaQName arrayType) {
    propertyName = JavaSourceUtils.toJavaField(propertyName);
    JavaQName propertyType;
    if(!options.isListAsPlainArray() && !arrayType.isPrimitive()) {
      propertyType = JavaQNameImpl.getInstance(options.getListInterface());
    } else {
      propertyType = JavaQNameImpl.getArray(arrayType);
    }
View Full Code Here

                JavaSource result = super.getXMLImplementation(pController);
                JavaQName[] interfaces = result.getImplements();
                boolean done = false;
                result.clearImplements();
                for (int i = 0;  i < interfaces.length;  i++) {
                    JavaQName interfaceName = interfaces[i];
                    if (interfaceName.equals(JMELEMENT_TYPE||
                        interfaceName.equals(INO_OBJECT_TYPE)) {
                        if (!done) {
                            result.addImplements(INO_OBJECT_TYPE);
                            done = true;
                        }
                    } else {
View Full Code Here

    if (!pController.isComplex()) {
      return;
    }
    CustomTableData customTableData = (CustomTableData) pController.getProperty(jdbcSG.getKey());
    if (customTableData != null) {
      JavaQName qName = pController.getComplexTypeSG().getClassContext().getPMName();
      JavaSource js = pController.getSchema().getJavaSourceFactory().newJavaSource(qName, JavaSource.PUBLIC);
      getPMClass(pController, js, customTableData);
    }
  }
View Full Code Here

    if (!pController.isComplex()) {
      return;
    }
    CustomTableData customTableData = (CustomTableData) pController.getProperty(jdbcSG.getKey());
    if (customTableData != null) {
      JavaQName qName = pController.getComplexTypeSG().getClassContext().getPMName();
      JavaInnerClass jic = pSource.newJavaInnerClass(qName.getClassName());
      getPMClass(pController, jic, customTableData);
    }
  }
View Full Code Here

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getInsertStatement());
    LocalJavaField query = jm.newJavaField(String.class);
    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
    elem.addLine("(", qName, ") ", pElement);

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
View Full Code Here

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getUpdateStatement());
    LocalJavaField query = jm.newJavaField(String.class);
    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
    elem.addLine("(", qName, ") ", pElement);

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.JavaQName

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.