Package com.sogou.qadev.service.cynthia.bean

Examples of com.sogou.qadev.service.cynthia.bean.Filter


      {
        UUID id = DataAccessFactory.getInstance().createUUID(Long.toString(rs.getLong("id")));
        String createUser = rs.getString("create_user");
        Timestamp createTime = rs.getTimestamp("create_time");

        Filter filter = new FilterImpl(id, createUser, createTime, null);
        filter.setName(rs.getString("name"));
        filter.setXml(rs.getString("xml"));
        filter.setAnd(rs.getBoolean("is_and"));
        filter.setPublic(rs.getBoolean("is_public"));
        filter.setVisible(rs.getBoolean("is_visible"));

        filterList.add(filter);
      }
    }
    catch(Exception e)
View Full Code Here


  {
    if(id == null)
    {
      return null;
    }
    Filter filter = null;

    PreparedStatement pstm = null;
    Connection conn = null;
    ResultSet rs = null;
    try
    {
      conn = DbPoolConnection.getInstance().getReadConnection();
      pstm = conn.prepareStatement("SELECT * FROM filter"
          + " WHERE id = ?");
      pstm.setLong(1, Long.parseLong(id.getValue()));

      rs = pstm.executeQuery();
      if(rs.next())
      {
        String createUser = rs.getString("create_user");
        Timestamp createTime = rs.getTimestamp("create_time");
        UUID fatherId = null;
        if(rs.getObject("father_id") != null)
          fatherId = DataAccessFactory.getInstance().createUUID(rs.getObject("father_id").toString());

        filter = new FilterImpl(id, createUser, createTime, fatherId);
        filter.setName(rs.getString("name"));
        filter.setXml(rs.getString("xml"));
        filter.setAnd(rs.getBoolean("is_and"));
        filter.setPublic(rs.getBoolean("is_public"));
        filter.setVisible(rs.getBoolean("is_visible"));
      }
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.bean.Filter

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.