示例#1
0
  public static boolean nameAdresseExist(String name, String adresse, String plz)
      throws SQLException {

    if (adresse == null) {
      adresse = "";
    }
    if (plz == null) {
      plz = "";
    }
    if (name == null) {
      name = "";
    }
    String sqlNamePLZAdresse =
        "select * from locations where straßenname = '"
            + adresse
            + "' "
            + "and PLZ = '"
            + plz
            + "' and Name = '"
            + name
            + "'";
    ResultSet resultSet0 = db.runSql(sqlNamePLZAdresse);
    if (!resultSet0.next()) {
      String sqlNameAdresse =
          "select * from locations where straßenname = '"
              + adresse
              + "' "
              + "and  Name = '"
              + name
              + "'";
      ResultSet resultSet1 = db.runSql(sqlNameAdresse);
      if (!resultSet1.next()) {
        return false;
      } else {
        return true;
      }
    } else {
      return true;
    }
  }
示例#2
0
 public static boolean idExist(String id, String api) throws SQLException {
   String sql0 =
       "select * from locations where ID_Plattform = '"
           + id
           + "' "
           + "and Quell_Plattform = '"
           + api
           + "'";
   ResultSet resultSet0 = db.runSql(sql0);
   if (resultSet0.next()) {
     return true;
   }
   return false;
 }
示例#3
0
 public static boolean partyphaseEventExist(String datum, String location, String text)
     throws SQLException {
   String sql1 =
       "SELECT * FROM `crawler`.`crawl_events` "
           + "WHERE `crawl_events`.`datum`='"
           + datum
           + "' "
           + "AND `crawl_events`.`name`='"
           + location
           + "' "
           + "AND `crawl_events`.`text`='"
           + text
           + "' ";
   ResultSet resultSet0 = db.runSql(sql1);
   if (resultSet0.next()) {
     return true;
   }
   return false;
 }
示例#4
0
  public static boolean msmarketingEventExist(
      String datum, String location, String titel, String uhrzeit) throws SQLException {

    String sql1 =
        "SELECT * FROM `crawler`.`crawl_events` "
            + "WHERE `crawl_events`.`datum`='"
            + datum
            + "' "
            + "AND `crawl_events`.`uhrzeit`='"
            + uhrzeit
            + "' "
            + "AND `crawl_events`.`name`='"
            + location
            + "' "
            + "AND `crawl_events`.`titel`='"
            + titel
            + "' ";
    ResultSet resultSet0 = db.runSql(sql1);
    if (resultSet0.next()) {
      return true;
    }
    return false;
  }