private Share newShare() { Share share = new Share(); share.putAt("#2733", "ALLOW"); return share; } }
protected Share shareToSession(final ShareData data) { Share share = iQuery.execute(new HibernateCallback<Object>() { public Object doInHibernate(org.hibernate.Session arg0) throws HibernateException, SQLException { BasicSecuritySystem bss = (BasicSecuritySystem) sec; try { bss.disableReadFilter(arg0); return arg0 .createQuery( "select sh from Share sh " + "join fetch sh.owner " + "where sh.id = :id") .setParameter("id", data.id).uniqueResult(); } finally { bss.enableReadFilter(arg0); } } }); if (share != null) { share.putAt("#2733", "ALLOW"); } return share; }