} else {
q = Databinder.getHibernateSession().getNamedQuery("StudentFlag.queryByFlaggerAndFlagee");
}
q.setParameter("flagee", person);
q.setParameter("flagger", ISISession.get().getUser());
StudentFlag f = (StudentFlag) q.uniqueResult();
// Databinder.getHibernateSession().evict(f);
Session session = Databinder.getHibernateSession();
if (f == null) { // Create Flag
f = new StudentFlag();
f.setFlagee(person);
f.setFlagger(ISISession.get().getUser());
if (period != null)
f.setPeriod(period);
f.setTimestamp(new Date());
session.save(f);
note = "on";
} else { // Delete Flag
session.delete(f);
note = "off";