Roland Haeder [Fri, 14 Aug 2015 21:05:09 +0000 (23:05 +0200)]
Long story, short purpose. Short story, long purpose ...
Well, String is stored in database, but some getter require Long or Float which cannot be casted. So a hard-code "casting" needs to be added ...
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 14 Aug 2015 18:28:50 +0000 (20:28 +0200)]
Continued with jcore: (refacturing)
- Added Apache commons jar
- Added missing license files
- getValueFromColumn() and setValueFromColumn() are now moved to Storeable (that they are in BaseFrameworkSystem and then needs to be overwritten again was bad OOP-ed style anyway).
- Also for this work, the type-hint for (mostly) instance must be changed to Storeable
- Added new exception CorruptedDatabaseFileException. This is thrown when the file is damaged
- Removed CorruptedDatabaseFileException() as StoreableCsv is now removed, too
-
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 14 Aug 2015 10:00:47 +0000 (12:00 +0200)]
Continued with jcore:
- Improved handling of null values in doInsertDataSet()
- Added emptyStringToNull() to DatabaseFrontend interface
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 14 Aug 2015 08:49:44 +0000 (10:49 +0200)]
Continued with jcore:
- Added method doInsertDataSet()
- Introduced getPreparedStatement()
- Added new constructor in DatabaseResult for status code and SQL warnings from previous executeQuery() call
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Thu, 13 Aug 2015 12:22:51 +0000 (14:22 +0200)]
Some additions to jcore:
- renamed isValueEqual() to isFieldValueEqual() as this method does check a class field (aka. attribute)
- now search criteria can be limit and skip found matches
- added support for string criteria
Roland Haeder [Thu, 13 Aug 2015 10:07:33 +0000 (12:07 +0200)]
A lot changes on jcore:
- Implemented doSelectByCriteria() in MySQL backend
- Close only connection in same backend if it is still open
- Added method size() to Result/DatabaseResult
- Moved member entrySet() in BaseCriteria to proper location
- Fixed comments of interface Criteria and SearchableCriteria
- Some trace/debug messages added
- Now database frontends have a new method getResultFromSet() which transforms a ResultSet (SQL) to a Result (jcore)
- Sorted class/interface imports
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Wed, 12 Aug 2015 12:34:02 +0000 (14:34 +0200)]
Added more data-gateway pattern classes + more rewrites for better usability in web-based applications:
- Added methods values() and entrySet() to Criteria instances
- Added method add() to Result instances
- Added method matchesAnd() which does a boolean check on all criteria on each Storeable instance
- Added DatabaseResult class with no implemented methods (will follow)
- Method doSelectByCriteria() in Base64 database backend is now "basicly finished"
- Added more thrown exceptions to not exit application servers on any thrown exception
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Mon, 10 Aug 2015 13:37:05 +0000 (15:37 +0200)]
Reverted a bit back because the ConsoleClient has enterChar() which requires an array of chars + renamed + changed type of attribute
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Mon, 10 Aug 2015 09:32:19 +0000 (11:32 +0200)]
Fixes for factory class, you need to take DatabaseFrontend.class as parameter type (sure) because it is used there
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Mon, 10 Aug 2015 09:22:19 +0000 (11:22 +0200)]
Introduced BackendFactory which does now instance the database backend class. You only need to implement DatabaseBackend and have the class' name set in property org.mxchange.jcore.database.backend.class
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 7 Aug 2015 11:41:56 +0000 (13:41 +0200)]
Better return an iterator of Map.Entry<Field, Object>. This is really generic, it may be fine for first "demo"
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 7 Aug 2015 06:31:14 +0000 (08:31 +0200)]
Added new interface for managers that need to access database, maybe later this will be changed, if more classes need same methods (remember DRY). But for now, this is fine.
Signed-off-by:Roland Häder <roland@mxchange.org>