예제 #1
0
 private Query getSelectWithKeyQuery(
     List<String> param,
     String tablePrimaryKey,
     String queryId,
     String tableName,
     DataService dataServiceObject,
     DatabaseMetaData metaData,
     String dbName,
     String schema,
     String colomNames)
     throws IllegalArgumentException, DataServiceFault, SQLException {
   DynamicSqlUtils sqlStatement = new DynamicSqlUtils();
   String query = sqlStatement.getSelectByKey(tableName, schema, tablePrimaryKey, colomNames);
   Result result = this.getResult(dataServiceObject, metaData, dbName, schema, tableName);
   Map<String, String> advanceProp = new HashMap<String, String>();
   return new SQLQuery(
       dataServiceObject,
       queryId,
       DBConstants.DataServiceGenerator.CONFIG_ID,
       false,
       null,
       query,
       this.getQueryParamList(metaData, dbName, schema, tableName, param),
       result,
       null,
       null,
       advanceProp,
       null);
 }
예제 #2
0
 private SQLQuery getInsertQuery(
     List<String> param,
     String queryId,
     String tableName,
     DataService dataServiceObject,
     DatabaseMetaData metaData,
     String dbName,
     String schema)
     throws IllegalArgumentException, DataServiceFault, SQLException {
   /* get the query */
   DynamicSqlUtils sqlStatementCreator = new DynamicSqlUtils();
   String query = sqlStatementCreator.getInsertStatement(tableName, schema, param);
   Result result = null;
   Map<String, String> advanceProp = new HashMap<String, String>();
   return new SQLQuery(
       dataServiceObject,
       queryId,
       DBConstants.DataServiceGenerator.CONFIG_ID,
       false,
       null,
       query,
       this.getQueryParamList(metaData, dbName, schema, tableName, param),
       result,
       null,
       null,
       advanceProp,
       null);
 }