Commit Graph
572 Commits
Author SHA1 Message Date
Marco Risaliti 8db113dee2 Add a @SuppressWarning("serial") in EntityFindOptions (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068649 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:34:48 +00:00
Marco Risaliti 650214e0fe Add a @SuppressWarning("serial") in ByteWrapper (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068647 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:34:11 +00:00
Marco Risaliti 402fa9441d Add a @SuppressWarning("serial") in GenericTransactionException (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068646 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:33:24 +00:00
Marco Risaliti d5eb73c6ac Remove unused import in SQLUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068644 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:32:51 +00:00
Marco Risaliti b0087a4e99 Add a @SuppressWarning("serial") in SerializeException (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068643 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:31:47 +00:00
Marco Risaliti a5bfa1cca0 Add a @SuppressWarning("serial") in ModelRelation (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068642 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:30:59 +00:00
Marco Risaliti 860fbdff0e Add a @SuppressWarning("serial") in ModelKeyMap (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068641 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:30:33 +00:00
Marco Risaliti 378c121813 Remove unused import in ModelInfo (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068638 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:29:53 +00:00
Marco Risaliti ced181c8c3 Add a @SuppressWarning("serial") in ModelIndex (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068637 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:29:12 +00:00
Marco Risaliti b8b31afa17 Add a @SuppressWarning("serial") in ModelGroupReader (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068634 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:28:41 +00:00
Marco Risaliti 228b5d5815 Add a @SuppressWarning("serial") in ModelField (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068633 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:28:00 +00:00
Marco Risaliti b4aa415419 Add a @SuppressWarning("serial") in ModelChild (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068632 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:27:32 +00:00
Marco Risaliti fc0618e392 Remove unnecessary suppress of warnings in ModelEntity (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068631 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:27:10 +00:00
Marco Risaliti bbda8564c7 Add a @SuppressWarning("serial") in DatabaseUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068628 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:24:38 +00:00
Marco Risaliti abbd231d81 Add a @SuppressWarning("serial") in some Entity exception (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068625 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:23:28 +00:00
Marco Risaliti e986ee1d2e Remove an unused private method of EntityConfigUtil instead of suppress it as unused (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068508 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 18:31:48 +00:00
Marco Risaliti e66e04690e Remove compilation warnings of an unused private method in EntityConfigUtil (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068132 13f79535-47bb-0310-9956-ffa450edef68
2011-02-07 21:03:38 +00:00
David E. Jones 3502196c12 To avoid unnecessary synchronization for the fairly large number of calls that result in returning false instead of beginning a transaction moved the setTransactionTimeout and begin calls into a separate synchronized method and removed synchronized from the begin method
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1066327 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 05:07:54 +00:00
Jacques Le Roux c054c7ed6e Formatting, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062866 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 16:38:32 +00:00
Jacques Le Roux f28b0343e1 A patch from Deyan "Allow attributes enable-lock, no-auto-stamp, auto-clear-cache, never-cache and sequence-bank-size in <extend-entity> tag in entitydef.xml fields " (https://issues.apache.org/jira/browse/OFBIZ-3882) - OFBIZ-3882
Allow attributes
enable-lock
no-auto-stamp
auto-clear-cache
never-cache
sequence-bank-size

in <extend-entity> tag in entitydef.xml fiels

Example: <extend-entity entity-name="Person" enable-lock="true" sequence-bank-size="1" />

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062863 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 16:33:16 +00:00
Jacques Le Roux 1dab0c10f2 Update copyright from 2010 to 2011, BTW this closes "update files from 2009 to 2010" (https://issues.apache.org/jira/browse/OFBIZ-3783) - OFBIZ-3783
I have changed ModelInfo.getCopyright() in order to automatize (I believe the copyright is always valid so we don't care about the date really used, if you disagree please let me know, I have a doubt about this...)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1061886 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 16:33:22 +00:00
Jacques Le Roux 65ab7533f0 A patch from Jeroen van der Wal "When audit log is enabled it creates log transactions even when there are no changes" (https://issues.apache.org/jira/browse/OFBIZ-4076) - OFBIZ-4076
The createEntittyAuditLogSingle function creates a record in the AuditLog entity even when there's no change. This patch only logs new, changed and deleted values. Also, all changes in the same transaction will get the same change date.

After applying this patch the overhead of the AuditEntityLog is recuded from 32% to 25%.

There's even more room for performance increase: a findOne search for the previous entity is done for every field that's enabled.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1056973 13f79535-47bb-0310-9956-ffa450edef68
2011-01-09 16:36:40 +00:00
Andrew Zeneski ad997886c7 changed the sql generated from the table-type field (used to specify the table type in mysql) from TYPE (deprecated in 4.1 and removed in 5.5.8 (maybe prior) to use the ENGINE keyword instead; creating tables in mysql 5.5.8 now working again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1053722 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 20:00:36 +00:00
Scott Gray 2ecc4b2494 Removed unnecessary SuppressWarnings annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044932 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 21:31:51 +00:00
Scott Gray 47f43a302a Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044931 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 21:31:27 +00:00
Scott Gray 75b0b1c1e3 Remove unnecessary semicolons
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044917 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 20:43:03 +00:00
Scott Gray bdd23c22d5 Add missing override annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044913 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 20:41:27 +00:00
Andrew Zeneski 0c211fb4e9 implemented option to specific a specific entity should NOT be checked; no columns are to be updated and ignore any warning about fields, relations, keys, etc. This is useful when an entity is defined based on a database view; the view may not (or probably will not) appear in the table meta data and any attempt to auto-create the entity will (or should) fail.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042792 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 21:07:48 +00:00
Scott Gray f4159d4294 In GenericDAO.selectListIteratorByCondition(...) the order of the select fields wasn't being maintained. This causes problems later on if the EntityListIterator needs to perform a count query where the select field ordering is important for distinct queries (particularly for the likes of postgres which doesn't support SELECT COUNT(DISTINCT *) which can result if the first field is an aggregate).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042280 13f79535-47bb-0310-9956-ffa450edef68
2010-12-05 04:26:43 +00:00
Jacques Le Roux 183850ba5c Fix a typo (bad formatting) reported by Adam on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1041135 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 19:12:52 +00:00
Jacques Le Roux 9b75d04f7e A patch from Felice Romano "NPE when calling org.ofbiz.entity.model.ModelEntity.getTableName(null)" (https://issues.apache.org/jira/browse/OFBIZ-4040) - OFBIZ-4040
When "table name" is required to a "model entity" object, it throws a NPE if "datasource info" object is null. 

JLR: I'm not quite sure in which occasions this fix is needed OOTB, but anyway it's safer indeed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040890 13f79535-47bb-0310-9956-ffa450edef68
2010-12-01 08:29:21 +00:00
Adam Heath f6dc585134 Fix checking of combined schema.tableName; the schema needed to be
normalized.  This fixes oracle at startup, so that it doesn't wrongly
thing that no tables are defined in the database.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005628 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:45 +00:00
Adam Heath d0850f76d5 fix getSchemaName, to change the case of the defined schema, based on
the database metadata settings.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005627 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:39 +00:00
Adam Heath 1bfa9fffdb In getColumnInfo, getReferenceInfo, and getIndexInfo, replace all the
blocks that fetched the scheme name with the helper method
getSchemaName.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005626 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:33 +00:00
Adam Heath 0191592447 Optimize checkDb() call, to not continually recalculate the tableName.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005625 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:28 +00:00
Adam Heath 2f8aa04d7c Fix updateByCondition, it was converting the condition to sql without
passing any of the values thru the prepared statement; this meant that
toString() was being called, instead of the correct setFoo method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005624 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:22 +00:00
Adam Heath 5b99ca0b75 Replace 2 cases of string addition with StringBuilder.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005622 13f79535-47bb-0310-9956-ffa450edef68
2010-10-07 20:46:17 +00:00
Hans Bakker 29b0dcefc5 make message more meaningfull and allow backtracing to entity with whereclase
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1002056 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 08:55:29 +00:00
Scott Gray f79f17b18a Completed the fix reported in r989475 (and subsequently reverted in r989722) by Erwan.
The condition-object element used to have an attribute named "field-name" which was later replaced with "field" but the code was instead checking for "field-name" and then "name".
Fixed so that the code checks for "field" and then "field-name".

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@990347 13f79535-47bb-0310-9956-ffa450edef68
2010-08-28 11:35:24 +00:00
Erwan de Ferrieres 6d59cc8f25 reverting 989475 as it is generating too much backward compatibility issues
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@989772 13f79535-47bb-0310-9956-ffa450edef68
2010-08-26 15:41:49 +00:00
Erwan de Ferrieres d6564a8188 when using an entity-condition, the object's attribute name used in condition object parameter was not taken into account
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@989475 13f79535-47bb-0310-9956-ffa450edef68
2010-08-26 07:07:12 +00:00
Adam Heath a633201428 Different entity groups can point to the same helper. However, since
the entities defined in the group are what is passed to the helper for
checking, it makes no sense to have protection against a helper from
being checked multiple times.

Ideally, the proper fix would be to find all groups by helper, combine
all the entities together, then pass them to the helper in one shot.
However, with the new tenant system, this grouping needs to be done by
target database uri(and other parameters), not by helper name.  This
might get done later.

Before this commit, any ofbiz installation that put multiple entity
groups into the same helper would only have the entities from the first
group get created.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@985298 13f79535-47bb-0310-9956-ffa450edef68
2010-08-13 17:42:51 +00:00
Adam Heath d06f72f7f9 FEATURE: Start of union support; parsing isn't tested yet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981640 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:44:20 +00:00
Adam Heath 066b0716d8 Expose a helper method for parsing order by items.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981635 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 17:43:47 +00:00
Scott Gray 10a56ea013 Copied CommonWorkers.hasParentType(...) over to EntityTypeUtil and deprecated the method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981446 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 10:47:26 +00:00
Adam Heath 66b76faf4e The database check attempted to only check each helper once; however,
the Set used to track whether a helper had been checked was *inside* the
loop, so this optimization never actually did what was intended.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981123 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 03:08:07 +00:00
Jacopo Cappellato 2a7d97b45d Always close the stream of the xml file after the parsing is done: this fixes a bug where the file was not deleted when it was successfully imported at the second or third attempt.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981028 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 10:13:49 +00:00
Scott Gray 4448c4a866 No functional changes, just removing a whole bunch of unused imports and reorganizing them along the way.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981019 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 08:28:34 +00:00
Scott Gray e3d73f77ff Must have decided to finish the comments after adding the method to git's index, committing the rest of the comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981009 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 05:48:36 +00:00
Scott Gray ce96f755ac Add a range condition to EntityDateFilterCondition, useful for finding entities applicable to a given date range.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981008 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 05:31:17 +00:00