Package org.martinlaw.bo

Examples of org.martinlaw.bo.Type.refresh()


    type.setName(name);
    populateAdditionalFieldsForCrud(type);
    getBoSvc().save(type);
   
    // R
    type.refresh();
    assertEquals("name does not match", name, type.getName());
    // save scope and see if it can be seen from the base detail/type side
    boolean scopeAdded = false;
    if (ScopedKeyValue.class.isAssignableFrom(getDataObjectClass())) {
      Scope scope = getScopeClass().newInstance();
View Full Code Here


      final String qualifiedClassName = Matter.class.getCanonicalName();
      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
View Full Code Here

    }
    testCrudCreated(type);
   
    // U
    type.setDescription("test description");
    type.refresh();
    assertNotNull("description should not be null", type.getDescription());
    // D
    getBoSvc().delete(type);
    assertNull(getBoSvc().findBySinglePrimaryKey(getDataObjectClass(),  type.getId()));
    if (scopeAdded) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.