Roland Häder [Tue, 18 Oct 2022 13:58:50 +0000 (15:58 +0200)]
Continued:
- convention is to check parameters in the order they appear in method
- added missing productAvailability to hashCode() method (always add in both)
Roland Häder [Mon, 18 May 2020 22:12:49 +0000 (00:12 +0200)]
Continued:
- entry-created timestamps shall never be allowed being set in UPDATE queries
- entry-updated timestamps shall never be allowed being set in INSERT queries
Roland Häder [Sun, 26 Apr 2020 19:06:13 +0000 (21:06 +0200)]
Continued:
- "validate" all parameter of public, package and protected methods
- check on all (except created/updated) entity properties in equals()/hashCode()
methods
Roland Häder [Sat, 25 Apr 2020 18:10:15 +0000 (20:10 +0200)]
Continued:
- renamed event for added categories as admin <-> user should be distinguished
- added administrative event which can be fired when an administrator has
updated a product category
Roland Häder [Thu, 20 Dec 2018 11:04:03 +0000 (12:04 +0100)]
Continued:
- removed parentCategory from constructor as per definition this is an optional
field and these must always be set "manually" by invocing the setter
Roland Häder [Thu, 26 Apr 2018 21:29:33 +0000 (23:29 +0200)]
Continued:
- added event interface and class for updated product instances
- fixed documentation, was a leftover from older times
- implemented Products.copyAll()
Roland Häder [Mon, 19 Mar 2018 23:35:41 +0000 (00:35 +0100)]
Continued:
- implemented Comparable
- added utilities classes for both Category and Product instances
- added depdendency to jcore-utils.jar
- added depdendency to commons-lang3
Roland Häder [Sat, 18 Nov 2017 14:27:10 +0000 (15:27 +0100)]
Continued:
- added product size, like for shoes or clothing
- made combination of i18n key, age group and size unique
- added AgeGroup enumeration to product entity
Roland Häder [Sat, 4 Nov 2017 12:35:52 +0000 (13:35 +0100)]
Continued:
- changed non-localizable unit type to localizable unit's i18n key
- now unit amount and i18n key are no longer optional as they are really needed
- if you don't know it, like UNIT_TYPE_GRAMS, enter UNIT_TYPE_ITEM for i18n key
- added product number
Roland Häder [Wed, 1 Nov 2017 12:23:48 +0000 (13:23 +0100)]
Continued:
- the constructor is now first invoking other (default) constructor and then
validates all parameters on a low level so the data is basically valid (not
out-of-range or NULL)
Roland Häder [Tue, 31 Oct 2017 18:22:30 +0000 (19:22 +0100)]
Continued a bit:
- removed single quotes around {0}, it seems to confuse the parser?
- renamed productTitle -> productI18nKey (like PRODUCT_MILK for milk) to allow
internationalization/localization of products
Roland Häder [Sat, 28 Oct 2017 18:10:54 +0000 (20:10 +0200)]
Continued:
- cleared no longer used project JARs
- added new dependency as a product may have a manufacturing/producing company
assigned, if such data is available on the product itself
Roland Häder [Fri, 27 Oct 2017 21:05:00 +0000 (23:05 +0200)]
Continued:
- added entity property for currency code like EUR or USD which is suitable for
java.util.Currency
- that instance then may be stored anywhere where it is needed to be customized
like in JSF
- also entities like "branch_office" and "headquarters" may store the same
value as they are maybe country-dependent
Roland Häder [Thu, 26 Oct 2017 18:25:10 +0000 (20:25 +0200)]
Continued:
- added net/gross price and tax rate (0.00-1.00 again)
- let's not over-centralize data:
+ you may have to repeat these 3 fields in your entity when you want to record
changing prices in your e.g. receipt items like in jfinancials
+ you may have to wait until a product_price_history entity has been added
to have a generic price history of all products
Roland Häder [Mon, 23 Oct 2017 20:47:31 +0000 (22:47 +0200)]
Continued:
- added created timestamps for category and product
- removed deprecated copyAll() methods, as "complex" methods should be
implemented outside the entity's class
Roland Häder [Sun, 15 Oct 2017 20:01:01 +0000 (22:01 +0200)]
Continued:
- normalized exceptions, like when an entity has already been added (with same
title here) or when it was not found. Already added exceptions always indicate
problems with calling methods by "not-found" exceptions may be triggered by
invalid "show" links or such kinds (when a non-existing id number for example
was provided by parameter).
- added constructor with id number (common way)
Roland Häder [Sat, 14 Oct 2017 12:49:48 +0000 (14:49 +0200)]
Continued:
- removed categoryId from constructor as this should *NEVER* be set from outside
- @Deprecated added for noticing me to move out copyAll() methods to utility
classes as entities should not have "complex" logic (they are basically data
containers and equals/hashCode + some constructors is okay)