Esempio n. 1
0
 /**
  * Get the global/cross-type filter expression.
  *
  * @param loadClass
  * @return The global filter expression evaluated at the first load
  */
 public Optional<FilterExpression> getLoadFilterExpression(Class<?> loadClass) {
   if (globalFilterExpression == null) {
     String typeName = dictionary.getJsonAliasFor(loadClass);
     return getFilterExpressionByType(typeName);
   }
   return Optional.of(globalFilterExpression);
 }
  @BeforeTest
  public void setup() {
    dictionary.bindEntity(FunWithPermissions.class);

    FunWithPermissions fun = new FunWithPermissions();
    fun.setId(1);

    AuditLogger testLogger = new TestAuditLogger();
    funRecord =
        new PersistentResource<>(
            fun, new RequestScope(null, null, null, goodUser, dictionary, null, testLogger));
    badRecord =
        new PersistentResource<>(
            fun, new RequestScope(null, null, null, badUser, dictionary, null, testLogger));
  }