Roland Häder [Fri, 21 Dec 2018 14:10:12 +0000 (15:10 +0100)]
Please cherry-pick:
- companyShortName is now mandatory, while companyName (full name) is optional
- but if companyName is set, check it as well, if it doesn't exist
Roland Häder [Sun, 18 Mar 2018 21:25:50 +0000 (22:25 +0100)]
Please cherry-pick:
- ContactUtils was renamed to Contacts to follow naming-convention
- fixed copy-paste mistake for headquarters instance, was BasicData
- also employeePosition was renamed to employeeJobPosition
Roland Häder [Tue, 13 Mar 2018 22:21:16 +0000 (23:21 +0100)]
Don't cherry-pick:
- updated persistence.xml with new entities (bonus cards and such)
- added (not done with with this commit) new project dependencies, like
juser-activity-lib, jcustomer-core and jcustomer-lib
- implemented protected methodsfor creating managed instances of Product
- receipt items now reference an "item manufacturer" which is a BasicData
instance
- discounts may be added multiple times, so never consider them as being added
- ignore more string for internationalization
- changed copyright to Free Software Foundation
Roland Häder [Tue, 13 Mar 2018 22:05:44 +0000 (23:05 +0100)]
Please cherry-pick/rename:
- Headquarter is enough for bean name (please rename)
- removed some no longer recommended business methods
- removed no longer used private methods
- made some local variables final which helps the Java compiler in optimization
of resulting byte-code
- added session EJB for user activity
- other improvements (?)
- changed copyright to Free Software Foundation
Roland Häder [Wed, 1 Nov 2017 21:35:35 +0000 (22:35 +0100)]
Please cherry-pick:
- added EJBs for headquarters entity, general and administrative
- added method for updating all "phone created" timestamps in above entity
- renamed entity class name in persistence.xml
Roland Häder [Sat, 28 Oct 2017 18:25:39 +0000 (20:25 +0200)]
Maybe cherry-pick:
- added check for product's manufacturer/producer instance which is a BasicData
implementation
- if it is set, it will be turned into a managed instance for preventing
double-persisting
Roland Häder [Mon, 23 Oct 2017 21:11:35 +0000 (23:11 +0200)]
Maybe cherry-pick:
- added EJBs for product categories and generic products, each with general and
administrative purposes
- implemented all methods
- added generic jproduct-core specific, abstract class with first method
"createManaged(category)"
Roland Häder [Tue, 17 Oct 2017 20:30:29 +0000 (22:30 +0200)]
Please cherry-pick:
- renamed employee as there will be no other employees
- added administrative country EJB due to remote interface separation
- removed find*ById() as this was causing load on EJB container which can be
prevented by application's JCache
- fixed persistence unit as entities have been moved
Roland Häder [Sat, 14 Oct 2017 13:32:51 +0000 (15:32 +0200)]
Please cherry-pick:
- added createManaged() methods for BranchOffice and HeadquartersData entities
- added helper method setAllOpeningTimesCreated() which sets "created" entity
property of all opening times
- renamed EJB [admin]companyEmployee to only plain [admin]employee (enough),
remember to write the "e" upper-case in adminEmployee
- added EJB for opening times
- added EJB for departments
- updated persistence unit with new entity class' name
Roland Häder [Sun, 24 Sep 2017 13:34:12 +0000 (15:34 +0200)]
Please cherry-pick:
- renamed setAllContactPhoneEntriesCreated() -> setAllPhoneEntriesCreated()
- added similar methods for company basic data and branch offices
- also their phone number's created timestamps must be set prior persisting
Roland Häder [Sat, 23 Sep 2017 12:09:37 +0000 (14:09 +0200)]
Don't cherry-pick:
- added lookup attribute to @EJB annotation as some lookup did not work as
expected and this is "guranteed" to work (if you have the right JNDI name,
of course)
- plus all these EJBs can now be more distributed over separate EJB modules
allowing a distributed operation over several data centers, awsome words,
right? ;-)
Roland Häder [Sat, 23 Sep 2017 12:06:24 +0000 (14:06 +0200)]
Please repeat/cherry-pick:
- added lookup attribute to @EJB annotation as some lookup did not work as
expected and this is "guranteed" to work (if you have the right JNDI name,
of course)
- plus all these EJBs can now be more distributed over separate EJB modules
allowing a distributed operation over several data centers, awsome words,
right? ;-)
- sorted members in base database bean
Roland Häder [Sat, 9 Sep 2017 12:49:54 +0000 (14:49 +0200)]
Please cherry-pick:
- re-package season has started: now all core project's entity packages do
always have following format: tld.domain.project.model.foo.SomeFoo;
- also fixed persistence unit
Roland Häder [Sat, 9 Sep 2017 12:18:10 +0000 (14:18 +0200)]
Please cherry-pick:
- introduced isSameCompanyNameAdded() which encapsulates checking for if a
company name has already been used. This is, together with the thrown checked
exception a last effort to prevent bad bad SqlException or any other
"low-level" exception as they are more severage than this.
- thumb of a rule: always pre-validate if all conditions are met (return "okay")
prior doing risky things where uncontrolled exceptions may be thrown.
- make company-owner (User), founder (Employee) and contact person (dito)
managed before persisting the whole BasicData instance as this makes sure that
no duplicates will end up in database
Roland Häder [Sat, 9 Sep 2017 11:35:31 +0000 (13:35 +0200)]
Please cherry-pick:
- removed explicit flush() on entity manager as this hurts performance + may
cause trouble when other entities (concurrently) are not "ready to be flushed)
- implemented addBranchOffice() + added missing public constructor
- added private method isBranchOfficeFound() which uses the general EJB for
retrieving whole branch office list
- added protected getManaged() for Contact and Country instances
- renamed companyDataId -> basicDataId
Roland Häder [Tue, 5 Sep 2017 20:03:36 +0000 (22:03 +0200)]
Please cherry-pick:
- added new stateless session beans for administrative and general purposes for
branch office data and implemented business methods
- moved allCompanyBasicData() to general bean as this is a general business method
- also had to switch EJB references (maybe one day lookup="" is required again?)
- added private method isContactFound() to check if contact is already registered
or not there
- this method is now used to throw proper checked exceptions (which in turn your
application must catch)
- implemented business method allCompanyBasicData()
- renamed getAllContacts() -> allContacts() as this is actually no getter
following naming-convention
- renamed getUserNameList() -> allUserNames() for same reason
- in fillUserData() added more checks on parameter 'user' as usual in many
places, including ifUserExists() and throw checked (wanted) exception if not
found in persistence provider
- added 'final' whereever possible, better optimization
- used not NULL when not needed, allowing more 'final' to be set
- updated persistence unit (new namespace for branch office entity)
- relicensed under Affero GPLv3 (no change to e.g. MIT will happen)
- added TODOs
Roland Häder [Sat, 26 Aug 2017 22:02:17 +0000 (00:02 +0200)]
Please cherry-pick/rename:
- added admin/general company employee session bean and implemented all methods
- implemented isCompanyNameUsed() and used dependency injection for injecting
other EJB
Roland Häder [Thu, 27 Jul 2017 21:12:48 +0000 (23:12 +0200)]
Please cherry-pick (when needed):
- duplicated BusinessDataSessionBean as (correctly) AdminBusinessDataSessionBean
- implemented generic business data EJB with first method which returns an
entity for given id number or throws a proper exception if not found
Roland Häder [Sat, 15 Jul 2017 17:12:57 +0000 (19:12 +0200)]
The primary development system for me is my Linux box at home. I don't know
what Sun was thinking here, to have differences in naming JARs between OSes
because as you can see here, it maks things lesser universal (difference
between OSes in naming JARs) which means on your Windows(/MacOS) box you may
have to ignore these properties files unless you want to add another lib and
then you have to be careful.
Well, not 100% universal after all which needs improvement. Let's hope, Apache
is ruling this out, at least for NetBeans IDE.
Roland Häder [Sun, 9 Jul 2017 08:35:33 +0000 (10:35 +0200)]
Please cherry-pick:
- returned managed instance so the web controller (backing bean in your web
application) can continue to use it (mostly fire an event)
Roland Häder [Sat, 8 Jul 2017 17:15:04 +0000 (19:15 +0200)]
Please cherry-pick:
- this message-driven bean has been moved to new project
- also the mailer's initialization and config properties
- removed genfiles.properties which is being regenerated anyway