Package org.openbravo.base.structure

Examples of org.openbravo.base.structure.DynamicOBObject


      Check.isTrue(obObject.getEntityName().equals(entityName),
          "Entityname of instantiated object " + obObject.getEntityName()
              + " and expected entityName: " + entityName + " is different.");
      return obObject;
    } else {
      final DynamicOBObject dob = new DynamicOBObject();
      dob.setEntityName(entityName);
      dob.setId((String) id);
      return dob;
    }
  }
View Full Code Here


   * Create a record for the {@link Category} in the database using a {@link DynamicOBObject}.
   */
  public void testCreateBPGroup() {
    setUserContext("1000000");
    addReadWriteAccess(Category.class);
    final DynamicOBObject bpGroup = new DynamicOBObject();
    bpGroup.setEntityName(Category.ENTITY_NAME);
    bpGroup.set(Category.PROPERTY_DEFAULT, true);
    bpGroup.set(Category.PROPERTY_DESCRIPTION, "hello world");
    bpGroup.set(Category.PROPERTY_NAME, "hello world");
    bpGroup.set(Category.PROPERTY_SEARCHKEY, "hello world");
    bpGroup.setActive(true);
    OBDal.getInstance().save(bpGroup);
    printXML(bpGroup);
  }
View Full Code Here

  /**
   * Performs type checking of property values on a {@link DynamicOBObject}.
   */
  public void testTypeCheckDynamicObject() {
    final DynamicOBObject bpGroup = new DynamicOBObject();
    bpGroup.setEntityName(Category.ENTITY_NAME);
    setValue(bpGroup, Category.PROPERTY_CLIENT, "test", "only allows reference instances of type");
    setValue(bpGroup, Category.PROPERTY_DESCRIPTION, new Double(400.0), "only allows instances of");
    setValue(bpGroup, Category.PROPERTY_DEFAULT, new BigDecimal(100.0), "only allows instances of");
  }
View Full Code Here

TOP

Related Classes of org.openbravo.base.structure.DynamicOBObject

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.