details: https://code.openbravo.com/erp/devel/pi/rev/f5d290f71735
changeset: 16559:f5d290f71735
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Wed May 16 18:05:08 2012 +0200
summary: Related to issue 20530: Code refactored to prevent unnecessary
queries.
For some tables it is better not to try to remove them from AccessibleEntities.
In that case, the check is done before executing the query that retrieves the
table model.
diffstat:
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java
| 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 19f445d28fd2 -r f5d290f71735
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java
Wed May 16 17:50:36 2012 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java
Wed May 16 18:05:08 2012 +0200
@@ -56,12 +56,14 @@
Set<Entity> accessibleEntities = new HashSet<Entity>();
for (Entity entity : entities) {
String tableId = entity.getTableId();
- Table table = OBDal.getInstance().get(Table.class, tableId);
- if ("800018".equals(table.getId()) || "203".equals(table.getId())) {
+ if ("800018".equals(tableId) || "203".equals(tableId)) {
// Special cases, may not link to its window/poWindow
+ // It is safer not to try to remove them
// See [email protected]
+ accessibleEntities.add(entity);
continue;
}
+ Table table = OBDal.getInstance().get(Table.class, tableId);
Window window = table.getWindow();
Window poWindow = table.getPOWindow();
if (windowAccessible(windowAccessList, window)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits