public void loadChats(){
  log.fine("#" + m_vo.TabNo);
  if (!canHaveAttachment())   return;
  String sql="SELECT CM_Chat_ID, Record_ID FROM CM_Chat " + "WHERE AD_Table_ID=?";
  try {
    if (m_Chats == null)     m_Chats=new HashMap<Integer,Integer>();
 else     m_Chats.clear();
    PreparedStatement pstmt=DB.prepareStatement(sql,null);
    pstmt.setInt(1,m_vo.AD_Table_ID);
    ResultSet rs=pstmt.executeQuery();
    while (rs.next()) {
      Integer key=new Integer(rs.getInt(2));
      Integer value=new Integer(rs.getInt(1));
      m_Chats.put(key,value);
    }
    rs.close();
    pstmt.close();
  }
 catch (  SQLException e) {
    log.log(Level.SEVERE,sql,e);
  }
  log.config("#" + m_Chats.size());
}

public void loadChats ( ) { log . fine ( "#" + m_vo . TabNo ) ; if ( ! canHaveAttachment ( ) ) return ; String sql = "SELECT CM_Chat_ID, Record_ID FROM CM_Chat " + "WHERE AD_Table_ID=?" ; try { if ( m_Chats == null ) m_Chats = new HashMap < Integer , Integer > ( ) ; else m_Chats . clear ( ) ; PreparedStatement pstmt = DB . prepareStatement ( sql , null ) ; pstmt . setInt ( 1 , m_vo . AD_Table_ID ) ; ResultSet rs = pstmt . executeQuery ( ) ; while ( rs . next ( ) ) { Integer key = new Integer ( rs . getInt ( 2 ) ) ; Integer value = new Integer ( rs . getInt ( 1 ) ) ; m_Chats . put ( key , value ) ; } rs . close ( ) ; pstmt . close ( ) ; } catch ( SQLException e ) { log . log ( Level . SEVERE , sql , e ) ; } log . config ( "#" + m_Chats . size ( ) ) ; }
load chats for this table
