Package org.openqreg.bean

Examples of org.openqreg.bean.Patientlogview


* @return A populated Patientlogview
*
* @throws SQLException
*/
protected static Patientlogview populate(ResultSet rs) throws SQLException {
Patientlogview valueObject = new Patientlogview();
valueObject.setId((Long)rs.getObject(1));
valueObject.setPid((Long)rs.getObject(2));
valueObject.setUserid((String)rs.getObject(3));
valueObject.setCentreid((String)rs.getObject(4));
valueObject.setContext((String)rs.getObject(5));
valueObject.setStep((String)rs.getObject(6));
valueObject.setSearchid((Long)rs.getObject(7));
valueObject.setTscreated((java.sql.Timestamp)rs.getObject(8));
valueObject.setSsn((String)rs.getObject(9));
valueObject.setUserfirstname((String)rs.getObject(10));
valueObject.setUserlastname((String)rs.getObject(11));
return valueObject;
}
View Full Code Here


* @throws SQLException
*/
public static Collection<Patientlogview> findAll(Connection con) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
Patientlogview valueObject = null;
Collection<Patientlogview> col = Collections.synchronizedList(new ArrayList<Patientlogview>());
try{
pStmt = con.prepareStatement(FIND_ALL_STATEMENT);
rs = pStmt.executeQuery();
while (rs.next()){
View Full Code Here

   */
  public static Collection<Patientlogview> findBySsnUserid(Connection con,
      String ssn, String userid) throws SQLException {
    PreparedStatement pStmt = null;
    ResultSet rs = null;
    Patientlogview valueObject = null;
    Collection<Patientlogview> col = Collections
        .synchronizedList(new ArrayList<Patientlogview>());
    try {
      pStmt = con.prepareStatement(SSNUSERID_STATEMENT);
      pStmt.setObject(1, ssn);
View Full Code Here

      if (null != tscreated) {
        pStmt.setObject(r, tscreated);
        r++;
      }
      rs = pStmt.executeQuery();
      Patientlogview valueObject = null;
      while (rs.next()) {
        valueObject = populate(rs);
        col.add(valueObject);
      }
      return col;
View Full Code Here

      if (null != tscreatedTo) {
        pStmt.setObject(r, tscreatedTo);
        r++;
      }
      rs = pStmt.executeQuery();
      Patientlogview valueObject = null;
      while (rs.next()) {
        valueObject = populate(rs);
        col.add(valueObject);
      }
      return col;
View Full Code Here

    //if only userid and no ssn, show only one hit for each patient 
    if (loggedUserid == null && ssn != null) {
      //if only ssn remove all duplicate users
     
      for(Iterator<Patientlogview> it = col.iterator(); it.hasNext();) {
        Patientlogview logview =  it.next();
        if(tempCol.contains(logview.getUserid())) {
          it.remove();
        }else {
          tempCol.add(logview.getUserid());
        }
      }
      //if only ssn and no userid, show only one hit for each user 
    } else if (loggedUserid != null && ssn == null) {
     
      for(Iterator<Patientlogview> it = col.iterator(); it.hasNext();) {
        Patientlogview logview =  it.next();
        if(tempCol.contains(logview.getPid())) {
          it.remove();
        }else {
          tempCol.add(logview.getPid());
        }
      }
    }
   
    //get the patientid once for each patient
View Full Code Here

TOP

Related Classes of org.openqreg.bean.Patientlogview

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.