With the difficulty to test, I create a new test-suite performfindtests with five junit :
* testPerformFindConditionFieldEquals
* testPerformFindConditionFieldLike
* testPerformFindConditionDistinct
* testPerformFindFilterByDate
* testPerformFindFilterByDateWithDedicateDateField
I also improve TestNodeMember with two fields extendFromDate and extendThruDate to realize filter on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1655499 13f79535-47bb-0310-9956-ffa450edef68
When using the queryCount() method of EntityQuery with a DinamicViewEntity, I get an error message about the EntityListIterator not being closed.
This properly closes the EntityListIterator
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647275 13f79535-47bb-0310-9956-ffa450edef68
The framework/sql was an attempt to create a specialized SQL parser for the OFBiz entity engine. The idea was to use a standardized SQL string that the parser would convert to entity conditions and Delegator calls. So, you could use the same SQL string on any database. The component was never finished.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644469 13f79535-47bb-0310-9956-ffa450edef68
They are mapped to the Standard SQL:2011 EXTRACT function that is already supported by several DBMS including PostgreSQL and MySQL (but not yet Derby).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644348 13f79535-47bb-0310-9956-ffa450edef68
The help gives you:
c:\projectsASF\ofbiz>java -jar ofbiz.jar -help
Usage: java -jar ofbiz.jar [command] [arguments]
-both -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard
-help, -? ----> This screen
-install -----> Run install (create tables/load data)
-pos -----> Run the POS (Point of Sales) application
-setup -------> Run external application server setup
-start -------> Start the server
-status ------> Status of the server
-shutdown ----> Shutdown the server
-test --------> Run the JUnit test script
[no config] --> Use default config
[no command] -> Start the server w/ default config
But actually only the -help, -status and -shutdown command need a dash.
For now we decided to change the documentation generated by the help command to remove dashes when they are not needed.
To change
-install -----> Run install (create tables/load data)
by
-load-data -----> Create tables/load data
To comment out the
-setup -------> Run external application server setup
line
When done, we will try to have things consistent and re-add the missing dashes to the commands and in the help. Then the "Technical production setup guide" should be updated, pfew...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640588 13f79535-47bb-0310-9956-ffa450edef68
* moved the json-lib jar (json-lib-2.2.3-jdk15.jar) from the framework/webapp to the framework/base component
* removed the SQL select Parser.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code
* removed the JSON.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code apart from the JSON Converters (now migrated to json-lib, see next items in this list) some utility methods in UtilIO.java (that have been removed too because they have never been used in OFBiz)
* removed the JavaCC jar and related ant scripts because no more needed after the removal of Parser.jj and JSON.jj
* converted the JSONConverter code that was based on JSON.jj to Jackson
* added a new class org.ofbiz.base.lang.JSON that have been contributed by Adrian Crum that is a facade for simplifying the client code and for hiding the specific JSON library being used
* removed an unused method: ImageManagementServices.toJsonObject(...)
* added TestBooleanConverters to the list of tests
* new unit tests for the new JSON converters
* refactored Ajax code in applications to use the common request json response rather than a custom method
* OFBIZ-5790 Implemented ability to call a service event by passing its input parameters in the request body as JSON data. These classes provide a simple mechanism, based on the request's content type, that can be extended to support other formats (e.g. XML).
This commit resolves OFBIZ-4572, OFBIZ-3365, OFBIZ-5751, OFBIZ-5790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635901 13f79535-47bb-0310-9956-ffa450edef68
============================================
As we have Entity Query Builder implemented in trunk (OFBIZ-4053) and now we should add Junit tests for its methods.
As per initial analyses, we can write Junit tests for following methods of Entity Query Builder:
1. queryList()
2. queryFirst()
3. queryCount()
4. queryOne()
5. distinct()
6. filterByDate()
7. orderBy()
8. select()
9. cursorForwardOnly()
10. cursorScrollSensitive()
11. cursorScrollInSensitive()
12. fetchSize()
13. maxRows()
14. cache()
15. queryIterator()
=============================================
Thanks Arun for the contribution.
Thanks Scott, Jacopo and Adrian for your help in reviewing the patch content.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635894 13f79535-47bb-0310-9956-ffa450edef68
Entry point is the static EntityQuery.use(Delegator) method which will then return an EntityQuery instance whose methods support method chaining to set query options.
The query can then be executed using the first(), list(), iterator() and one() methods which respectively return:
- The first result from a result set
- The full list of results from a result set
- An EntityListIterator to iterate over a result set
- The single record from a query that will return only one record (such as a lookup by primary key)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1627940 13f79535-47bb-0310-9956-ffa450edef68
This fix should be the right way to go but please review this commit because the syntax of these custom ant tasks is rather cryptic to me.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1627818 13f79535-47bb-0310-9956-ffa450edef68
This new implementation should be slightly more flexible but with default setup will end up with the same behavior as before 1627092.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1627489 13f79535-47bb-0310-9956-ffa450edef68
Provided better settings for the thread pools to avoid to keep alive threads that are only needed at startup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1626977 13f79535-47bb-0310-9956-ffa450edef68
Junit tests are included. The two custom classloaders could be merged into one but this will be addressed in a second phase because it will require some changes to the bootstrap componenr and process.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1624549 13f79535-47bb-0310-9956-ffa450edef68
A failed insert due to duplicated pk will generate an SQLException rather than returning 0 from executeStatement(), so changed the code to reflect this.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622170 13f79535-47bb-0310-9956-ffa450edef68