details: https://code.openbravo.com/erp/devel/pi/rev/f3877b10d80d
changeset: 15194:f3877b10d80d
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Wed Jan 25 10:12:29 2012 +0100
summary: Related to 13649. Reverted fix, will be done in next MP
diffstat:
src/org/openbravo/dal/xml/EntityXMLConverter.java | 19 ++-----------------
src/org/openbravo/service/dataset/DataSetService.java | 18 +++++++-----------
2 files changed, 9 insertions(+), 28 deletions(-)
diffs (76 lines):
diff -r 7246b6950ddd -r f3877b10d80d
src/org/openbravo/dal/xml/EntityXMLConverter.java
--- a/src/org/openbravo/dal/xml/EntityXMLConverter.java Thu Jan 19 10:42:26
2012 +0100
+++ b/src/org/openbravo/dal/xml/EntityXMLConverter.java Wed Jan 25 10:12:29
2012 +0100
@@ -288,11 +288,6 @@
protected void export(BaseOBObject obObject, boolean
isAddedBecauseReferenced)
throws SAXException {
- export(obObject, isAddedBecauseReferenced, null);
- }
-
- protected void export(BaseOBObject obObject, boolean
isAddedBecauseReferenced,
- Boolean excludeAuditInfo) throws SAXException {
final String entityName = DalUtil.getEntityName(obObject);
final AttributesImpl entityAttrs = new AttributesImpl();
@@ -332,10 +327,7 @@
exportableProperties =
DataSetService.getInstance().getExportableProperties(obObject, dst,
dst.getDataSetColumnList(), optionExportTransientInfo);
} else {
- exportableProperties = new
ArrayList<Property>(obObject.getEntity().getProperties());
- if (excludeAuditInfo != null && excludeAuditInfo) {
- DataSetService.getInstance().removeAuditInfo(exportableProperties);
- }
+ exportableProperties = obObject.getEntity().getProperties();
}
// export each property
@@ -437,14 +429,7 @@
for (final Object o : childObjects) {
// embed in the parent
if (isOptionEmbedChildren()) {
- final DataSetTable dst = (getDataSet() != null &&
obObject.getEntity() != null) ? dataSetTablesByEntity
- .get(obObject.getEntity()) : null;
- if ((excludeAuditInfo != null && excludeAuditInfo)
- || (dst != null && dst.isExcludeAuditInfo())) {
- export((BaseOBObject) o, false, true);
- } else {
- export((BaseOBObject) o, false);
- }
+ export((BaseOBObject) o, false);
} else {
// add the child as a tag, the child entityname is
// used as the tagname
diff -r 7246b6950ddd -r f3877b10d80d
src/org/openbravo/service/dataset/DataSetService.java
--- a/src/org/openbravo/service/dataset/DataSetService.java Thu Jan 19
10:42:26 2012 +0100
+++ b/src/org/openbravo/service/dataset/DataSetService.java Wed Jan 25
10:12:29 2012 +0100
@@ -454,22 +454,18 @@
// Remove the auditinfo
if (dataSetTable.isExcludeAuditInfo()) {
- removeAuditInfo(exportables);
+ final List<Property> toRemove = new ArrayList<Property>();
+ for (final Property p : exportables) {
+ if (p.isAuditInfo()) {
+ toRemove.add(p);
+ }
+ }
+ exportables.removeAll(toRemove);
}
return exportables;
}
- public void removeAuditInfo(List<Property> properties) {
- final List<Property> toRemove = new ArrayList<Property>();
- for (final Property p : properties) {
- if (p.isAuditInfo()) {
- toRemove.add(p);
- }
- }
- properties.removeAll(toRemove);
- }
-
// compares the content of a list by converting the id to a hex
public static class BaseOBIDHexComparator implements Comparator<Object> {
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits