Package org.openbravo.model.ad.module

Examples of org.openbravo.model.ad.module.DataPackage


        try {
          Image image = OBDal.getInstance().get(Image.class, imageID);
          Table table = OBDal.getInstance().get(Table.class, tableId);
          String propertyName = ModelProvider.getInstance().getEntityByTableName(
              table.getDBTableName()).getPropertyByColumnName(columnName).getName();
          DataPackage dpackage = table.getDataPackage();
          try {
            Class tableClass = Class.forName(dpackage.getJavaPackage() + "."
                + table.getJavaClassName());
            BaseOBObject parentObject = (BaseOBObject) OBDal.getInstance().get(tableClass,
                parentObjectId);
            parentObject.set(propertyName, null);
            OBDal.getInstance().flush();
View Full Code Here


    ModuleDBPrefix dbPrefix = OBProvider.getInstance().get(ModuleDBPrefix.class);
    dbPrefix.setName("TEST1");
    dbPrefix.setModule(module);
    OBDal.getInstance().save(dbPrefix);

    DataPackage pack = OBProvider.getInstance().get(DataPackage.class);
    pack.setJavaPackage("org.openbravo.test.tablename.data");
    pack.setName("org.openbravo.test.tablename.data");
    pack.setModule(module);
    OBDal.getInstance().save(pack);
    commitTransaction();
  }
View Full Code Here

  private DataPackage getPackage(String name) {
    OBCriteria<DataPackage> obCriteria = OBDal.getInstance().createCriteria(DataPackage.class);
    obCriteria.add(Expression.eq(DataPackage.PROPERTY_NAME, name));
    List<DataPackage> pack = obCriteria.list();
    DataPackage p = pack.get(0);
    log.debug("Package: " + p.getName());
    return p;
  }
View Full Code Here

TOP

Related Classes of org.openbravo.model.ad.module.DataPackage

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.