Package weave.config.DataConfig

Examples of weave.config.DataConfig.RelationshipList


    PreparedStatement stmt = null;
    String query = null;
    try
    {
      Connection conn = connectionConfig.getAdminConnection();
      RelationshipList result = new RelationshipList();
      if (ids.size() == 0)
        return result;
     
      // build query
      String idList = Strings.join(",", ids);
      query = String.format(
          "SELECT * FROM %s WHERE %s IN (%s) OR %s IN (%s) ORDER BY %s",
          SQLUtils.quoteSchemaTable(conn, schemaName, tableName),
          SQLUtils.quoteSymbol(conn, FIELD_PARENT), idList,
          SQLUtils.quoteSymbol(conn, FIELD_CHILD), idList,
          SQLUtils.quoteSymbol(conn, FIELD_ORDER)
        );
      stmt = conn.prepareStatement(query);
      rs = stmt.executeQuery();
      rs.setFetchSize(SQLResult.FETCH_SIZE);
      while (rs.next())
        result.add(new Relationship(rs.getInt(FIELD_PARENT), rs.getInt(FIELD_CHILD)));
      return result;
    }
    catch (SQLException e)
    {
      if (query != null)
View Full Code Here

TOP

Related Classes of weave.config.DataConfig.RelationshipList

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.