コード例 #1
0
  private void cacheSqlGroup(SqlGroup group) {
    Iterator<SqlQuery> queries = group.getSqlQuery().iterator();

    while (queries.hasNext()) cacheSQLQuery(new SQLQuery(group.getId(), queries.next()));

    Iterator<SqlFile> files = group.getSqlFile().iterator();

    while (files.hasNext()) cacheSQLFile(new SQLFile(group.getId(), files.next()));

    Iterator<SpecificDBMSProperties> iterator2 = group.getSpecificDBMSProperties().iterator();

    SpecificDBMSProperties specificDBMSProperties;

    while (iterator2.hasNext()) {
      specificDBMSProperties = iterator2.next();

      queries = specificDBMSProperties.getSqlQuery().iterator();

      while (queries.hasNext())
        overrideSQLQuery(
            specificDBMSProperties.getDBMS(), new SQLQuery(group.getId(), queries.next()));

      files = specificDBMSProperties.getSqlFile().iterator();

      while (files.hasNext())
        overrideSQLFile(specificDBMSProperties.getDBMS(), new SQLFile(group.getId(), files.next()));
    }
  }
コード例 #2
0
  public SQLGroup(SqlGroup group) {
    id = group.getId();
    defaultSQLQueriesMap = new HashMap<String, SQLQuery>();
    defaultQLFilesMap = new HashMap<String, SQLFile>();
    specificSQLQueriesMap = new HashMap<String, HashMap<String, SQLQuery>>();
    specificSQLFilesMap = new HashMap<String, HashMap<String, SQLFile>>();

    cacheSqlGroup(group);
  }