details: https://code.openbravo.com/erp/devel/pi/rev/7924a2a98a3b
changeset: 16545:7924a2a98a3b
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Tue May 15 17:21:13 2012 +0200
summary: fixed bug 20485: Slow OBCriteria
Do not calculate mappedClass each time its requiered but use cached one, which
is present in super PojoEntityTuplizer.
diffstat:
src/org/openbravo/dal/core/OBTuplizer.java | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diffs (43 lines):
diff -r 497cb2c422bd -r 7924a2a98a3b src/org/openbravo/dal/core/OBTuplizer.java
--- a/src/org/openbravo/dal/core/OBTuplizer.java Tue May 15 17:27:54
2012 +0200
+++ b/src/org/openbravo/dal/core/OBTuplizer.java Tue May 15 17:21:13
2012 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2011 Openbravo SLU
+ * All portions are Copyright (C) 2008-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -49,14 +49,11 @@
public class OBTuplizer extends PojoEntityTuplizer {
private static final Logger log = Logger.getLogger(OBTuplizer.class);
- private final PersistentClass persistentClass;
-
public OBTuplizer(EntityMetamodel entityMetamodel, PersistentClass
mappedEntity) {
super(entityMetamodel, mappedEntity);
log.debug("Created tuplizer for "
+ (mappedEntity.getMappedClass() != null ?
mappedEntity.getMappedClass().getName()
: mappedEntity.getEntityName()));
- persistentClass = mappedEntity;
}
// this is done in the generated mapping
@@ -141,12 +138,8 @@
}
@Override
- public Class<?> getMappedClass() {
- return persistentClass.getMappedClass();
+ public Class<?> getConcreteProxyClass() {
+ return getMappedClass();
}
- @Override
- public Class<?> getConcreteProxyClass() {
- return persistentClass.getMappedClass();
- }
}
\ No newline at end of file
------------------------------------------------------------------------------
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