Package org.martinlaw

Examples of org.martinlaw.ScopedKeyValue


        @SuppressWarnings("unchecked")
    Collection<BusinessObject> kvs = (Collection<BusinessObject>) getBusinessObjectService().findAll(scopedClass);
        // to be configured via xml using blankOption
        /*keyValues.add(new ConcreteKeyValue("", ""));*/
        for (BusinessObject bo : kvs ) {
          ScopedKeyValue kv = (ScopedKeyValue)bo;
          if (kv.getScope().isEmpty()) {
            keyValues.add(new ConcreteKeyValue(kv.getKey(), kv.getValue()));
          } else {
            for (Scope scope: kv.getScope()) {
              if (StringUtils.equals(qualifiedMatterClassName, scope.getQualifiedClassName())) {
                keyValues.add(new ConcreteKeyValue(kv.getKey(), kv.getValue()));
                break;
              }
            }
          }
        }
View Full Code Here


      scope.setQualifiedClassName(qualifiedClassName);
      scope.setTypeId(type.getId());
      getBoSvc().save(scope);
     
      type.refresh();
      ScopedKeyValue scoped = (ScopedKeyValue)type;
      assertNotNull("scope should not be null", scoped.getScope());
      assertFalse("scope should not be empty", scoped.getScope().isEmpty());
      assertEquals("qualified class name differs", qualifiedClassName, scoped.getScope().get(0).getQualifiedClassName());
      // insert boolean to indicate that a scope has been set, to be used at the delete section below
      scopeAdded = true;
    }
    testCrudCreated(type);
   
View Full Code Here

TOP

Related Classes of org.martinlaw.ScopedKeyValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.