Package com.knowgate.hipergate

Examples of com.knowgate.hipergate.Address


  public void startElement(String uri, String local, String raw,
                           Attributes attrs) throws SAXException {
   
     if (local.equalsIgnoreCase("Address")) {
       oTemporaryAddr = new Address();
     } else if (local.equalsIgnoreCase("Line")) {
       oTemporaryLine = new OrderLine();
     }
   
  } // startElement(String,String,StringAttributes)
View Full Code Here


  private Address oAddr;

  public Supplier() {
    super(DB.k_suppliers, "Supplier");
    oAddr = new Address();
  }
View Full Code Here

    int nAddresses = 0;
    Address[] aAddresses;
    if (null==sWorkAreaGuid) {
      oAddresses = new DBSubset (
        DB.k_addresses+" a",
        new Address().getTable(oConn).getColumnsStr(),
        "EXISTS (SELECT m."+DB.gu_address+" FROM "+DB.k_meetings+" m WHERE m."+DB.gu_address+"=a."+DB.gu_address+" AND m."+DB.id_domain+"=? AND m."+DB.dt_start+" BETWEEN ? AND ?)",
        10);
      nAddresses = oAddresses.load(oConn, new Object[]{oDomainId,dtFirst,dtLast});
    } else {
      oAddresses = new DBSubset (
        DB.k_addresses+" a",
        new Address().getTable(oConn).getColumnsStr(),
        "EXISTS (SELECT m."+DB.gu_address+" FROM "+DB.k_meetings+" m WHERE m."+DB.gu_address+"=a."+DB.gu_address+" AND m."+DB.id_domain+"=? AND m."+DB.gu_workarea+"=? AND m."+DB.dt_start+" BETWEEN ? AND ?)",
        10);
      nAddresses = oAddresses.load(oConn, new Object[]{oDomainId,sWorkAreaGuid,dtFirst,dtLast});
    } // fi
    if (0==nAddresses) {
      aAddresses = null;
    } else {
      aAddresses = new Address[nAddresses];
      for (int a=0; a<nAddresses; a++) {
        aAddresses[a] = new Address();
      aAddresses[a].putAll(oAddresses.getRowAsMap(a));
      } // next
    }
    return aAddresses;
  } // getDistinctAddresses
View Full Code Here

    else
      sGuAddr = null;
    oRSet.close();
    oStmt.close();
    if (null!=sGuAddr)
      return new Address(oConn, sGuAddr);
    else
      return null;
  }
View Full Code Here

    else
      sGuAddr = null;
    oRSet.close();
    oStmt.close();
    if (null!=sGuAddr)
      return new Address(oConn, sGuAddr);
    else
      return null;
  }
View Full Code Here

   * @since 3.0
   */
  public Address getAddress(JDCConnection oConn, String sTpLocation)
    throws SQLException,IllegalStateException {

    Address oRetAdr;

    if (isNull(DB.gu_company))
      throw new IllegalStateException("Company.getAddress([Connection],"+sTpLocation+") gu_company property is not set");

    if (DebugFile.trace) {
      DebugFile.writeln("Begin Company.getAddress([Connection],"+sTpLocation+")" );
      DebugFile.incIdent();
    }

    PreparedStatement oStmt = oConn.prepareStatement("SELECT x." + DB.gu_address +
                                                     " FROM " + DB.k_x_company_addr + " x," +
                                                     DB.k_addresses + " a WHERE " +
                                                     "x." + DB.gu_address + "=a." + DB.gu_address +
                                                     " AND x." + DB.gu_company+"=?" +
                                                     " AND a." + DB.tp_location+"=?",
                                                     ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    oStmt.setString(1, getString(DB.gu_company));
    oStmt.setString(2, sTpLocation);
    ResultSet oRSet = oStmt.executeQuery();
    if (oRSet.next())
      oRetAdr = new Address(oConn, oRSet.getString(1));
    else
      oRetAdr = null;
    oRSet.close();
    oStmt.close();

View Full Code Here

    if (DebugFile.trace) {
      DebugFile.writeln("Begin Company.getAddresses([Connection])" );
      DebugFile.incIdent();
    }

    Address oAddr = new Address();

    DBSubset oAddrs = new DBSubset (DB.k_addresses,
                                    oAddr.getTable(oConn).getColumnsStr(),
                                    DB.gu_address + " IN (SELECT " + DB.gu_address +  " FROM " + DB.k_x_company_addr + " WHERE " + DB.gu_company + "=?)", 10);
    int iAddrs = oAddrs.load(oConn, new Object[]{getString(DB.gu_company)});

    oAddr = null;
View Full Code Here

    if (DebugFile.trace) {
      DebugFile.writeln("Begin Company.getActiveAddresses([Connection])" );
      DebugFile.incIdent();
    }

    Address oAddr = new Address();

    DBSubset oAddrs = new DBSubset (DB.k_addresses,
                                    oAddr.getTable(oConn).getColumnsStr(),
                                    DB.bo_active+"<>0 AND "+
                                    DB.gu_address + " IN (SELECT " + DB.gu_address +  " FROM " + DB.k_x_company_addr + " WHERE " + DB.gu_company + "=?)", 10);
    int iAddrs = oAddrs.load(oConn, new Object[]{getString(DB.gu_company)});

    oAddr = null;
View Full Code Here

  DBSubset oAddrs = getAddresses(oConn);
  int nAddrs = oAddrs.getRowCount();
    StringBuffer oXml = new StringBuffer(sXml.length()+512*nAddrs);
  oXml.append(sXml.substring(0,sXml.indexOf(sIdent + "</" + sAuditCls + ">")));
  oXml.append(sIdent+"  <Addresses count=\""+String.valueOf(nAddrs)+"\">"+sDelim);
  Address oAddr = new Address();
  oAddr.getTable(oConn);
  for (int a=0; a<nAddrs; a++) {
    oAddr.putAll(oAddrs.getRowAsMap(a));
    oXml.append(oAddr.toXML(sIdent+"    ", sDelim));
    oXml.append(sDelim);
    oAddr.clear();
  } // next
  oXml.append(sIdent+"  </Addresses>"+sDelim);
    oXml.append(sIdent + "</" + sAuditCls + ">");
    return oXml.toString();
  } // toXML
View Full Code Here

  public Address getAddress(JDCConnection oConn)
      throws SQLException {
    if (isNull(DB.gu_address))
      return null;
    else
      return new Address(oConn, getString(DB.gu_address));
  }
View Full Code Here

TOP

Related Classes of com.knowgate.hipergate.Address

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.