Ejemplo n.º 1
0
 /**
  * Builds the object based upon a supplied document uuid.
  *
  * @param context the task context
  * @param con the database connection
  * @param docuuid the document uuid
  * @throws Exception if an exception occurs
  */
 public void querySqlDB(TaskContext context, Connection con, String docuuid) throws Exception {
   key = null;
   xml = null;
   SqlQInfo info = getSqlQInfo();
   info.setWhere("DOCUUID=?");
   List<Object> bindings = new ArrayList<Object>();
   bindings.add(docuuid);
   info.setQueryBindings(bindings);
   SqlQuery q = new SqlQuery();
   q.query(
       context,
       con,
       info,
       new SqlRowHandler() {
         @Override
         public void handleSqlRow(TaskContext context, Connection con, ResultSet rs, long rowNum)
             throws Exception {
           readFields(rs);
         }
       });
 }
Ejemplo n.º 2
0
 /** Default constructor. */
 public GptResourceXml() {
   super();
   SqlQInfo info = this.getSqlQInfo();
   info.setTableSuffix("RESOURCE_DATA");
   info.setFields(new String[] {"DOCUUID,XML"});
   info.setOrderBy(null);
   info.setWhere(null);
   info.setFetchSize(1);
 }