code: DatabaseSession readPrimitives(String id, String appName, Connection con) throws SQLException {
          PreparedStatement ps = null;
          ResultSet rs = null;
          DatabaseSession sess = null;
          try {
              if (usingDB2 || usingDerby) {
                  ps = con.prepareStatement(readPrimitiveDataDb2);
              } else {
                  ps = con.prepareStatement(readPrimitiveData);
              }
              ps.setString(1, id);
              ps.setString(2, id);
              ps.setString(3, appName);
  
              rs = ps.executeQuery();
              if (rs.next()) {
                  sess = new DatabaseSession(this, id, ((DatabaseStore) getIStore()).getStoreCallback());
                  long lastaccess = rs.getLong(1);
                  long createTime = rs.getLong(2);
                  int maxInact = rs.getInt(3);
                  String userName = rs.getString(4);
                  short listenerflag = rs.getShort(5);
  
                  sess.updateLastAccessTime(lastaccess);
                  sess.setCreationTime(createTime);
                  sess.internalSetMaxInactive(maxInact);
                  sess.internalSetUser(userName);
                  sess.setIsValid(true);
                  sess.setListenerFlag(listenerflag);
              }
          } finally {
              if (rs != null)
                  closeResultSet(rs);
              if (ps != null)
                  closeStatement(ps);
          }
  
          return sess;
      }
docs: /*
  Reads given session with primitives, but does not read attribute data