class HibernateSessionDAO extends HibernatePersistentObjectDAO<Session> implements SessionDAO {

	@Override
	public Session findBySid(String sid) {
		try {
			List<Session> sessions = findByWhere("_entity.sid = ?1", new Object[] { sid }, null, null);
			for (Session session : sessions) {
				if (session.getDeleted() == 0)
					return session;
			}
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
		}
		return null;
	}

	protected  HibernateSessionDAO();

}