This application takes in part of the code from Ektorp and other NOSQL ORM, integrating with Xpages document datasource. Objective is creating a lightweight java annotation based persistent layer (customized JPA for Domino). Frankly, I would not even dare mentioning the word JPA, because this experimental idea is going to be lightweight, just something better than what we already got. Even DomSQL might be the future, I guess it will take 4 years before it gets out of the market? So having a light weight ORM before it comes out might be good. At a higher abstract level, what this project is trying to

  1. Hide the document read/write operations from developer, any modern framework does offer usage of ORM to skip the need of DAO layer implemention. Loading objects from model layer you are loading the table rows from database, submitting the objects and object relations from model layer you are automatically submitting the update to database as well.     
  2. To have a datasource maintaining a set of objects’ state and the object relations instead of having document datasource for form proceeding and viewdatasource for presentation display. If you have ever used compositeData to send over a datasource to somewhere else, you are already experiencing the difficulty building relations between the objects.

 

        Three annotations has been built so far:

        @DominoEntity  - define the form

        @DominoProperty  - map object property to document iteam name.

        @DocumentReferences - one-to-many relation

       What needs to be done

  1. All CascadeType need to be implemented
  2. Unidirectional/bidirectional, one-one/one-many/many-one/many-many  need to be implemented
  3. A potential new dataContainer needs to be written to handle Java Object lifecycle (ex. restoring dominoDocument, reconstruct the interception/lazy loading mechanism after deserialization)/publishing objects as resolved variables
  4. Code structure needs to be changed, (ex.  entitymanager needs to be made/ code refactoring)