@Test public void testExecute() { boolean result = sut.execute(TEST_PERSON_ACCOUNTID, TEST_TAB_ID); assertTrue(result); }
public boolean execute(final String inPersonAccountId, final Long inTabId) { if (logger.isTraceEnabled()) { logger.trace("Determinging permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId); } try { Query q = getEntityManager().createQuery( "Select count(*) from Person p, Tab t " + "where t.id =:tabId and p.accountId =:personAccountId and p.startTabGroup.id = t.tabGroup.id") .setParameter("tabId", inTabId) .setParameter("personAccountId", inPersonAccountId); Long count = (Long) q.getSingleResult(); if (logger.isDebugEnabled()) { logger.trace("Determined permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId + " value: " + (count > 0)); } return count > 0; } catch (Exception ex) { logger.error("Error occurred retrieving permissions, fail over to denying permission.", ex); } return false; }
GetTabPermissionByPersonAndTab extends BaseDomainMapper { public boolean execute(final String inPersonAccountId, final Long inTabId) { if (logger.isTraceEnabled()) { logger.trace("Determinging permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId); } try { Query q = getEntityManager().createQuery( "Select count(*) from Person p, Tab t " + "where t.id =:tabId and p.accountId =:personAccountId and p.startTabGroup.id = t.tabGroup.id") .setParameter("tabId", inTabId) .setParameter("personAccountId", inPersonAccountId); Long count = (Long) q.getSingleResult(); if (logger.isDebugEnabled()) { logger.trace("Determined permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId + " value: " + (count > 0)); } return count > 0; } catch (Exception ex) { logger.error("Error occurred retrieving permissions, fail over to denying permission.", ex); } return false; } }
GetTabPermissionByPersonAndTab extends BaseDomainMapper { public boolean execute(final String inPersonAccountId, final Long inTabId) { if (logger.isTraceEnabled()) { logger.trace("Determinging permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId); } try { Query q = getEntityManager().createQuery( "Select count(*) from Person p, Tab t " + "where t.id =:tabId and p.accountId =:personAccountId and p.startTabGroup.id = t.tabGroup.id") .setParameter("tabId", inTabId) .setParameter("personAccountId", inPersonAccountId); Long count = (Long) q.getSingleResult(); if (logger.isDebugEnabled()) { logger.trace("Determined permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId + " value: " + (count > 0)); } return count > 0; } catch (Exception ex) { logger.error("Error occurred retrieving permissions, fail over to denying permission.", ex); } return false; }  }
GetTabPermissionByPersonAndTab extends BaseDomainMapper { public boolean execute(final String inPersonAccountId, final Long inTabId) { if (logger.isTraceEnabled()) { logger.trace("Determinging permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId); } try { Query q = getEntityManager().createQuery( "Select count(*) from Person p, Tab t " + "where t.id =:tabId and p.accountId =:personAccountId and p.startTabGroup.id = t.tabGroup.id") .setParameter("tabId", inTabId) .setParameter("personAccountId", inPersonAccountId); Long count = (Long) q.getSingleResult(); if (logger.isDebugEnabled()) { logger.trace("Determined permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId + " value: " + (count > 0)); } return count > 0; } catch (Exception ex) { logger.error("Error occurred retrieving permissions, fail over to denying permission.", ex); } return false; }  boolean execute(final String inPersonAccountId, final Long inTabId); }
GetTabPermissionByPersonAndTab extends BaseDomainMapper { public boolean execute(final String inPersonAccountId, final Long inTabId) { if (logger.isTraceEnabled()) { logger.trace("Determinging permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId); } try { Query q = getEntityManager().createQuery( "Select count(*) from Person p, Tab t " + "where t.id =:tabId and p.accountId =:personAccountId and p.startTabGroup.id = t.tabGroup.id") .setParameter("tabId", inTabId) .setParameter("personAccountId", inPersonAccountId); Long count = (Long) q.getSingleResult(); if (logger.isDebugEnabled()) { logger.trace("Determined permissions for tab id: " + inTabId + " and person id: " + inPersonAccountId + " value: " + (count > 0)); } return count > 0; } catch (Exception ex) { logger.error("Error occurred retrieving permissions, fail over to denying permission.", ex); } return false; }  boolean execute(final String inPersonAccountId, final Long inTabId);  }