OZP-76 Basic groundwork for storing a person in Mongodb
OZP-76: Declared interfaces for Unit of Work, Identity Map, Document Mapper, Document Mapper Registry, and consolidated these patterns into a MongoSession which will orchestrate the process of finding and persisting Entities in MongoDB. Implemented Identity Map with tests. Removed javax.persistence from Domain model and removed the Groovy @ToString since it was generating extra fields that are incompatible with JPA byte code enhancement
OZP-76 Implemented DocumentMapperRegistry for MongoDB document to object mappers
OZP-76
* Implemented integration testing for Mongo project with embedmongo maven plugin. Plugin will retrieve and start a mongod process for the duration of the integration tests. Maven Surefire runs unit tests and FailSafe runs integration tests
* Implemented Unit of Work for Mongo DB.
OZP-76 Mongo implementation will need proxy classes for each domain model it will persist so that every time a persisted property is affected, the Entity will be marked 'dirty' with the unit of work. These proxies behave the same across all the domain models and require a lot of repeated code. We can use Groovy AST Transforms to add the repetetive code during a compilation phase thus remaining DRY.

Groovy AST transforms must be compiled before they are used so I've added a new project called mongo-proxy-transforms to make this UnitOfWorkAware transformation
OZP-76 Proxy Transformation supports the ability to exclude properties from the syntax tree transformation
OZP-76 The Groovy AST which generates proxy code can now reach into the proxy's subclass to find method and properties. Refactored AST Transformation classes because the transformation code smelled like procedural programming
Merge remote-tracking branch 'origin/feature/ozp-73-persistence-api' into feature/ozp-76-mongodb-impl

Conflicts:
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/Dashboard.groovy
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/DashboardInstance.groovy
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/DashboardTemplate.groovy
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/Entity.groovy
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/Person.groovy
	bundles/server/persistence/pom.xml
OZP-76
* Instead of using a 'type' field, use a document collection per aggregate type
* Added 'commit' to MongoSession which will commit the unit of work and clear the identity map cache
* Integrated EntityListener into the Unit of Work so that it updates timestamps and IDs on save and update
* Implemented document has many and many to many associations with lazy loading pattern
OZP-76: Added to DocumentMapper base and added mappers for Entity and Principal base types. Groovy AST Transformation now overrides fields from more than the immediate super class; it overrides fields from all superclasses in the hierarchy until it finds an ancestor that is not 'org.ozonplatform' package.
Merge branch 'feature/ozp-73-persistence-api' into feature/ozp-76-mongodb-impl

Need the latest infrastructure from the persistence api branch

Conflicts:
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/DashboardInstance.groovy
	bundles/server/persistence/pom.xml
Merge branch 'feature/ozp-73-persistence-api' into feature/ozp-76-mongodb-impl
OZP-76 Implemented wiring for MongoSession per request
OZP-76 MongoDB Implementation
* Added Proxies, Mappers for all Entities
* Added Repositories for all Entities
* Added integration tests for all aggregates which verifies that all Entities can be persisted and retrieved in Mongo DB. Verifies that all Has-Many, Many-To-Many, and Has-One relationships can be traversed lazily. Verifies that uni-directional and bi-directional relationships are maintained and persisted
* Added separate registration methods in Mongo UnitOfWork for aggregates and non-aggregate entities. This allows all modified and new Entities to receive onUpdate and onSave handlers but only aggregates are mapped to documents. Aggregate mappers are reponsible for mapping nested documents.
* Added an isAggregate property to the UnitOfWorkAware AST Transformation so that code generation is aware of which unit of work registration method to use
* Added a findNewChildEntities method to DocumentMapper. This method allows each aggregate mapper to make the unit of work aware of new child entities upon insert so these new entities can receive onSave handlers
SMALLER CHANGES
* Modified private collections in domain classes to be protected so that the proxies may access them without reflection. Added a protected setter to PersonalWidgetDefinition to set the WidgetDefinition for the same reason. This field was final and that didn't work well for proxies.
* Removed the "is same class" check from value objects' equals method because this produces false negatives when comparing domain objects to domain object proxies
* Removed unnecessary add/remove person methods from GroupRepository because these are not needed now that unit of work per request is working and these violate the repository pattern
* Modified DashboardInstance domain model to have a removeTemplate method instead of a public setter for its DashboardTemplate property. This is truer to the domain because a DashboardInstance may not have its DashboardTemplate changed - only removed. The template is removed when an admin deletes the DashboardTemplate from which the DashboardInstance was constructed
OZP-76 MongoDB
* Implemented queries in Repository implementations
* Fixed bug in MongoSession preventing it from mapping document collection results
* Fixed bug in integration tests preventing Spock from loading assertions
* Fixed has-one lazy load relationships
* Mongo integration tests add/drop database before/after each spec to prevent side effects between tests
* Refactored
OZP-76 MongoDB
Introduced an optimization to the UnitOfWorkAware AST Transformation. Proxy classes will now cache the boolean value isDirty so that they only try to register as "dirty" with the unit of work at most 1 times
OZP-76 MongoDB
* Added Blueprint configuration for MongoDB services
* Added OSGI header configuration and feature for MongoDB
Merge branch 'feature/ozp-76-mongodb-impl' into feature/ozp-73-persistence-api

Conflicts:
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/DashboardInstance.groovy
	bundles/server/domain/src/main/groovy/org/ozoneplatform/commons/server/domain/model/Entity.groovy
OZP-76 Provided OSGI Configuration Admin services for configuring the connection to MongoDB. Config file with defaults will be installed in /etc with the feature
Merge branch 'feature/ozp-73-persistence-api' of github.com:ozoneplatform/ozp-commons into feature/ozp-73-persistence-api

Conflicts:
	bundles/server/persistence/debug-commands/src/main/resources/create.sql
	features/src/main/feature/features.xml