Package org.openbravo.model.ad.utility

Examples of org.openbravo.model.ad.utility.DataSetTable


        .isDerivedReadable(obObject.getEntity());

    final List<Property> exportableProperties;
    // second 'and' is necessary because referenced entities are not part of the dataset
    if (getDataSet() != null && dataSetTablesByEntity.get(obObject.getEntity()) != null) {
      final DataSetTable dst = dataSetTablesByEntity.get(obObject.getEntity());
      exportableProperties = DataSetService.getInstance().getExportableProperties(obObject, dst,
          dst.getDataSetColumnList(), optionExportTransientInfo);
    } else {
      exportableProperties = obObject.getEntity().getProperties();
    }

    // export each property
View Full Code Here


   *
   * @see Table
   */
  public void testDataSetTable() {
    setUserContext("100");
    final DataSetTable dst = OBProvider.getInstance().get(DataSetTable.class);
    final Table t = OBProvider.getInstance().get(Table.class);
    t.setName("ADTable");
    dst.setTable(t);
    dst.setSQLWhereClause("(" + Table.PROPERTY_DELETABLERECORDS + "='N' or " + Table.PROPERTY_VIEW
        + "='N') and client.id='0'");
    final List<BaseOBObject> l = DataSetService.getInstance().getExportableObjects(dst, "0");
    for (final BaseOBObject bob : l) {
      log.debug(bob.getIdentifier());
    }
View Full Code Here

      dst.setIncludeAllColumns(true);
      dst.setBusinessObject(false);
    }

    // exclude the Order.project and Order.selfService
    final DataSetTable dst = ds.getDataSetTableList().get(0);
    assertTrue(dst.getTable().getDBTableName().toLowerCase().equals("c_order"));
    dst.getDataSetColumnList().add(
        createDataSetColumn(dst, getProperty(Order.ENTITY_NAME, Order.PROPERTY_PROJECT), true));
    dst.getDataSetColumnList().add(
        createDataSetColumn(dst, getProperty(Order.ENTITY_NAME, Order.PROPERTY_SELFSERVICE), true));

    String xml = DataExportService.getInstance().exportDataSetToXML(ds);
    checkPropsPresent(ds, xml, false, false, new String[] { Order.PROPERTY_PROJECT,
        Order.PROPERTY_SELFSERVICE });
View Full Code Here

      dst.setIncludeAllColumns(false);
      dst.setBusinessObject(false);
    }

    // exclude the Order.project and Order.selfService
    final DataSetTable dst = ds.getDataSetTableList().get(0);
    assertTrue(dst.getTable().getDBTableName().toLowerCase().equals("c_order"));
    dst.getDataSetColumnList().add(
        createDataSetColumn(dst, getProperty(Order.ENTITY_NAME, Order.PROPERTY_PROJECT), false));
    dst.getDataSetColumnList()
        .add(
            createDataSetColumn(dst, getProperty(Order.ENTITY_NAME, Order.PROPERTY_SELFSERVICE),
                false));

    final List<String> excludeList = new ArrayList<String>();
View Full Code Here

    final OBCriteria<Table> obcTable = OBDal.getInstance().createCriteria(Table.class);
    obcTable.add(Expression.eq(Table.PROPERTY_DBTABLENAME, tableName));
    assertTrue(obcTable.list().size() == 1);
    final Table table = obcTable.list().get(0);

    final DataSetTable dst = OBProvider.getInstance().get(DataSetTable.class);
    dst.setId("" + System.currentTimeMillis());
    dst.setClient(OBContext.getOBContext().getCurrentClient());
    dst.setOrganization(OBContext.getOBContext().getCurrentOrganization());
    dst.setActive(true);
    dst.setBusinessObject(false);
    dst.setDataset(ds);
    dst.setExcludeAuditInfo(true);
    dst.setIncludeAllColumns(true);
    dst.setTable(table);
    return dst;
  }
View Full Code Here

TOP

Related Classes of org.openbravo.model.ad.utility.DataSetTable

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.