Skip to content

Commit

Permalink
Feature/release 1.0.0 (#139)
Browse files Browse the repository at this point in the history
* Feature/transient fields (#142)

* Fix null pointer if no enumerations are part of servcie

* Enable HAS and enumeration as return type of operations

* Allow Enumerations as operation parameter

* Provide java based operations converted enumeration

* Add SourceClear addon

* Delete SourceClean addon

* Enumerations at UDF functions

- Works for bound functions
- Works for functions with import

* Correct unit tests

* Enable multiple values for flags enumerations

* Switch detection default between Embedded and Entity type

* Allow collection attributes for metadata

* Enable query without collection attributes

* Rework query result conversion to reduce memory consumtion

* Missing Metadata pom

* First step entity with collections as return of function/action

* Bugfix: Expand on Parent with $filter on navigation path

* Enable the use of Join Tables

- Filter on navigation via Join Table generally not supported

* Create new query for inlinecount

* Enable Join Tables@Navigation Filter

- Not working mapped associations
- Not working $count

* Enable Join Tables@Navigation Filter

- With mapped associations
- With $count, know issue EclipsLink two sub types

* Increase Version --> 0.2.6

* Remove deprecated JPAExecutableQuery

* Bugfix: unidirectional join table based association

* Access collection properties via navigation

- New version

* Access collection properties w and w/o $select

* Access collection properties which are part of complex property

* CUD operations on collection properties

* Filter on collection properties pre optimization

* Filter on collection properties any/all

* Filter on collection w/o filter on $count and orderby $count

* Correct issue #29

- Correct /$count implementation in JPAJoinQuery
- Clean-up Hibernate differences
-- Subquery from clause
-- Id Class determination

* Increase Version to 0.2.7

* Enable [email protected] in case of odata.metadata=full

- links@complex types not yet working

* Preparation for solution of issue OLINGO-1143

* Correct NullPointer and some clean-ups

* Support order by $count

- Increase version to 0.2.8

* Intermediate merge clean-up

* Solve merge problem navigate complex collections

* Resolve merge conflict converter

* Correct error collection property and expand=*

* Enable filter $count on collection property

* Update version and url

* Create and use page provider

* Recreate change for solution of issue OLINGO-1143

* Finalize top level server driven paging

* Correct string handling error

* Correct link problem

* Enable skiptoken to have other type than String

* Move paging so next request injects old uriInfo correctly

* Enable deep insert via complex properties

* Ignore test for next commit

* Enable create of a new entity linked by a to one using PATCH

* Update to Olingo 4.5.0

- use new Olingo version
- adopt one test to changed @odata.context content

* Collection attributes rework. Issue #60

- Change processor pom  -> javax.servlet became provided

* Enable annotation for properties to mark them authorization relevant

* Enable multiple protected properties at complex attributes

* Rework EdmProtectedBy annotation to handle multiple claims at complex

* Process protection

* Rework handling of ignored protected

* Made inner class static

* Fixing issue #60

* $count query not working correctly on complex collection attributes

* Various small bugs

- Reorg.  pom.xml
- Correct http status on empty result
- Correct empty check for collection properties

* Correct typo in interface JPAODataPagingProvider

* Prepare JPAODataDatabaseTableFunction for paging

* Change to HSQLDB

* Remove function from sql-file to work around problems with Derby

* Correct NullPointerException EdmEntitySetResult

* Determine result of create dependent based on before image

* EntityType getAttribute did not return value for embedded id

* Provide CUD example and correct query status codes

* Correct query response

* Maven Archetype for Spring based service

* Upgrade to Junit5 to get support for Java > 1.8

* Extract interface for better unit test support

- Cleanup tests

* Clean-up interface implementation

* Add SQL function handling

* Complete DB function changes

* Clean-up test class

* Clean-up test class

* Update Version number

* Update Version number

* Additional test for API classes

* Enable suppress of wildcard in metadata

* Enable wildcards during query processing

* Increase information on error during filter

* Support of PUT on collection properties and primitive properties

* Fix Null Pointer on PATCH with return != minimal

* Claims where not respected by queries issue #69 part one

- /$count
- ?$count=true
- paging queries

* Claims where not respected by queries issue #69 part two

- $filter
- Update on Olingo 4.6.0

* Restrict the DISTINCT to protections only

* Increase test coverage

- New tests
- Rework vocabulary handling

* Cleanup Vocabularies II

- Add Action and Function
- Remove NavigationProperty and dependent

* Additional test and solution of issue #78

* Enable new annotation EdmVisibleFor at properties

* Introduction of Request Context

- Deprecation of two variants of JPAODataGetHandler.process
- Increase test coverage

* Restrict EdmVisiableFor to nullable non key attributes

* Skip properties from selection that do not belong to provided group

* Handle collection properties and navigation path

* Enable groups at complex collections

* Handle OrderBy clause

* Correct unit test

* Rework test containing images

* Rework context handling

- Move of cud handler to request context
- Move of DebugSupport to request context (is request specific because
of isUserAuthorized)
- Introduction of builder for Service Context to get a leaner creation
of handler

* Providing groups during modifying requests

* Re-enable old shortcut with late metadata provisioning

* Update pom for missing jackson dependency

* Update Archetype to version 0.3.4

* Update Version

* Extension of session context, so an emf can be provided

* Ignore annotation qualified if empty

* Go back to Olingo JSON deserializer

* Add qualifier to annotation

* Increase release

* Clean-up JPAEdmNameBuilder

* Preparation of custom name builder

- Create public interface
- replace class by new interface

* Revoke test adoption

* Providing custome name builder

* Update annotation EdmFunction

* Increase release

* Adopt archetype

- Simplify service
- Add integration test

* Modify example did not persist on create

* Deep Insert did not responded deep

* Always select ETag

* Complete ETag handling

* Missing Context Changes

* Reset unit test to current pushed state

* Increase test coverage

* Adopt test to real number of complex types

* Enable V4.01 JSON format as request and response

* Additional Integration tests support OData V4.01 JSON

* Allow usage of different types of transaction

* Increase Spring support

* Bugfix/issue83 (#120)

* Update Version

* Extension of session context, so an emf can be provided

* Preparation of custom name builder

- Create public interface
- replace class by new interface

* Revoke test adoption

* Providing custome name builder

* Update annotation EdmFunction

* Increase release

* Adopt archetype

- Simplify service
- Add integration test

* Modify example did not persist on create

* Deep Insert did not responded deep

* Always select ETag

* Complete ETag handling

* Missing Context Changes

* Reset unit test to current pushed state

* Increase test coverage

* Adopt test to real number of complex types

* Enable V4.01 JSON format as request and response

* Additional Integration tests support OData V4.01 JSON

* Allow usage of different types of transaction

* Increase Spring support

* Restrict $expand select by key range

* Support root with navigation like AdministrativeDivision(...)/Children

* Protect dilution of test coverage by test package (#133)

* Increase release

* Increase release (#136)

* Protect dilution of test coverage by test package (#135)

* Remove deprecated artifacts (#134)

* Remove deprecated artefacts

* Missing test adoptions

* Upgrade Olingo version and processor version

* Feature/transient fields (#137)

* Increase release

* Upgrade Olingo version and processor version

* Prevent NPE on expand empty result (#138)

* Correct SonarQube and SpotBug hints

* Feature/transient fields (#139)

* Increase release

* Upgrade Olingo version and processor version

* Correct SonarQube and SpotBug hints

* SpotBugs and clean-ups

* Build metadata I

* First draft of criteria builder and query implementation (#140)

* First draft of criteria builder and query implementation

* Add Transient

* First join version

* Correct structured type

* Test adoption was missing

* Update criteria builder

* Solve enum error

* Support aggregation function

* Correct buildInverseJoinColumns() error

* Add Test buildInverseJoinColumns() error

* Enable table join without entity type

* Correct Error table name

* Own test for JPAEdmProvider and correct name builder error

* Additional test

* Support parallel processing of batch requests

* Complete synchronized creation of metadata

* Enable transient field calculator

* Suppress transient fields at $filter and $orderby

* Enable transient collections and collections with transient attributes

* Additional tests for changing operations

* Enable absolute path in url

* Add sonar plugin (#144)

* Add sonar plugin

* Update pom with sonar plugin

* Feature/logging (#145)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Feature/logging (#147)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Feature/logging (#148)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Feature/logging (#150)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Feature/logging (#151)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Update README.md

* Update README.md

* Feature/logging (#152)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Clean-up sonar issues

* Create additional test for debugger

* Add tests for debugger

* Update README.md

* Replace database derby -> hsqldb

* Update README.md (#153)

* Feature/logging (#154)

* Add sonar plugin

* Update pom with sonar plugin

* Remove old xmake version

* Logging as part of standard debugger

* Generic authorization check for JPAExampleCUDRequestHandler

* Update xmake version

* Clean-up sonar issues

* Update build status on read.me

* New badges

* Clean-up sonar issues

* Create additional test for debugger

* Add tests for debugger

* Update README.md

* Replace database derby -> hsqldb

* Cleanup sonar issue

* Increase test coverage for criteria builder (#155)

* Feature/criteria builder (#156)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Update README.md (#157)

* Feature/criteria builder (#158)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Feature/criteria builder (#159)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Update README.md (#160)

* Update README.md

* Update README.md

* Remove potential null pointer (#161)

* Bugfix/sonar issues (#162)

* Remove potential null pointer

* Remove potential Null Pointer

* Bugfix/sonar issues (#163)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Bugfix/sonar issues (#164)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Additional clean-ups

* Work on soanr issues

* Bugfix/sonar issues (#165)

* Remove potential null pointer

* Remove potential Null Pointer

* Remove potential Null Pointer

* Additional clean-ups

* Work on soanr issues

* Additional cleanups

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors (#179)

* Feature/release 1.0.0 (#192)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/syntax errors (#181)

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors

* Correct syntax errors metadata

* Clean-up typos

* Rework build of OrderBy creation (#183)

* Bugfix/syntax errors (#185)

* Feature/release 1.0.0 (#170)

* Bugfix/typo package (#168)

* Update version to 1.0.0-RC

* Rename package to ...metadata.core.edm.mapper.extension

* Rename message constants

* Correct typos in method names

* Rollback change to Optional

* Support Include Annotation (#169)

* Feature/include annotation (#171)

* Support Include Annotation

* Increase test coverage transient properties

* Bugfix/issue98 (#173)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Bugfix/issue98 (#174)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* sonar issues (#175)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Bugfix/issue98 (#176)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Bugfix/issue98 (#177)

* Support java.time.Instant and BigInteger

* Correct issue #98

- Correct typo
- Make DatabaseProcessor public

* Enhance documentation of transient property calculator

* Clean-up sonar issue

* Clean-up sonar

* Clean-up author

* Meaningfull error message on $apply

* Service Context creates Emf Wrapper if present in class path

* Suppoprt of MappedSuperclass

* $top and $skip use order by primary key

* Clean-up sonar issues

* Clean-up sonar issues

* Delete intermediate code

* Feature/criteria builder (#178)

* Increase test coverage for criteria builder

* Replace double implementation by mocks

* Rework vocabulary read

* Add method to retrieve all claims

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors

* Add README.md and correct spelling errors (#179)

* Correct syntax errors metadata

* Clean-up typos

* Update Version -> 1.0.0

* Usage of builder to create external request context (#187)

* Bugfix/continue on error (#189)

* Move batch processor from API to PROCESSOR package

* Correct continue-on-error handling

* Support generated Id in example CUD handler (#190)

* Support generated Id in example CUD handler

* Correct failing test

* Adoption of archetype to 1.0.0 (#191)

* Adoption of archetype to 1.0.0

* Correct sql error

* Clean-up sonar issues

* Correct criteria builder implementation (#193)

* Feature/criteria builder (#194)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Feature/criteria builder (#195)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Feature/criteria builder (#196)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Feature/criteria builder (#197)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Feature/criteria builder (#198)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Feature/criteria builder (#199)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Intermediate state

* Enable next block of queries

* Expand with Join Tables

* Last unit test corrections

* Eliminate typos

* Finalize changes

* missing variable usage (#200)

* missing variable usage

* Increase processor version

* Clean-up Sonar issues (#201)

* Bugfix/no mapper for operations (#202)

* Clean-up Sonar issues

* Add test for type mapping for actions and java function

+ Cleanup test classes

* Feature/1.0.1 (#203)

* Correct criteria builder implementation

* Enable sub query as FROM

* Update tests

* Update sonar issues

* Update sonar issue

* Add mutation testing to processor and metadata

* Eliminate duplicate code

* Add Locale to request context, so it can be set from user data

* Correct request context copy

* Missing transient fields at $expand

* Add tests

* Fix GeneratedKey problem

* Change version to 1.0.1

* New version (#204)

* Bugfix/filter eq withdate (#205)

* New version

* Support filter on Date and DateTime

* Correct precision

* Change another test

* Us generated alias for column selection (#206)

* Upgrade Version (#207)

* Us generated alias for column selection

* Upgrade version

* Reduce complexity (#209)

* ALL did not work with functions like startswith (#210)

* Update version (#208)

* Entity Set Path @ DB Functions (#211)

* Feature/new archetype (#212)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Feature/new archetype (#213)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Allow Star for non string claim properties

* Add Equals method to DeepProtectedExample

* Feature/new archetype (#214)

* Clean-up folder name

* Create archetype repo

* Use copy of spring archetype as start

* Enable named queries

* Allow Star for non string claim properties

* Add Equals method to DeepProtectedExample

* Enable grant access to all for non string fields read

* Replace Reflections API by Reflections8 (#215)

* Support entitytypes singeltons (#216)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet
- Read not ready

* Update README.md (#218)

* Update README.md

* Update README.md

* Update README.md

* Solve issue 136 (#217)

* Solve issue 136

* Eliminate hyphen

* Eliminate WhiteSource detected vulnerabilities (#219)

* Eliminate WhiteSource detected vulnerabilities

* Add now required dependency

* Remove setExternalName from Metadata Post Processor (#220)

* Support entitytypes singeltons (#221)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Support entitytypes singeltons (#222)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Start documentation transient fields

* Query extension declaration (#223)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Support entity types and singletons (#224)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Clean-up sonar issues

* Support cast on navigations (#225)

* New annotation to make singletons and entity types

- Update to olingo 4.8.0
- Deprecate EdmAsEntitySet

* Wrong entity type on singleton only

* Add java doc to TopLevelElementRepresentation

* Finalize singleton metadata handling

* Clean-up test classes

* Add option to retrieve Singleton from SD

* Rename test class

* Add and clean-up unit tests

* Introduce query extension metadata

* Enable Singleton and Cast on subtypes

- clean-up sonar issues

* Clean-up sonar issues

* Cast within navigation path

* Add cast collections

* Add tests for EdmBoundCast

* Support Cast on $expand

* Update README.md (#226)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Bugfix/no constranis with ignored properties (#227)

* Suppress referential constraint for properties that shall be ignored

* No Referential Constraint in case one property shall be ignored

* Bugfix/no constranis with ignored properties (#228)

* Suppress referential constraint for properties that shall be ignored

* No Referential Constraint in case one property shall be ignored

* Bring back error on ignored

* Enable subtyping for complex types (#229)

* Support transient properties that require ignored properties (#231)

* Bugfix/multi level inheritance (#232)

* Adopt process-cb

* Correct type converter problem

* Use dbType for tuple result mapping

* Bugfix/multi level inheritance (#233)

* Adopt process-cb

* Correct type converter problem

* Use dbType for tuple result mapping

* Correct constructor test of extension

* Feature/release 1.0.3 (#234)

* Correct typos and replace deprecated method

* Set final Version

* Take code changes

* Small fixes

* Update travis and first step readme

* Update dependencies

* Clean-up archetype

* Set target release

* Feature/release 1.0.4 (#235)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Feature/release 1.0.4 (#236)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Small adoptions to test model

* Reset change

* Adopt project settings

* Clean-up

* Error correction (#237)

* Feature/release 1.0.5 (#238)

* Error corrections

- Debugger did not work
- Transaction Factory not forwarded

* Update release

* Make debugger runtime a List

* Small adoptions to test model

* Reset change

* Add test for criteria builder

* Error correction

* Correct version in pom

* Update version in archetype pom

* Update H2 version (#239)

* Update H2 version

* Update version and rework DataSourceHelper

* Feature/release 1.0.6 (#240)

* Update H2 version

* Update version and rework DataSourceHelper

* Let H2 run in Postges mode

* Set H2 mode

* Update archetype pom

* Create quick start tutorial

* Add github action for sonar check

* Adopt sonar.yaml

* Add cd to sonar.yml

* Update H2 versions

* Remove sonar path

* Clean up sonar issues

* Set xmlReportPath for sonar

* change to base dir for coverage

* Next 'path' try

* Next try with new 'path'

* Try multiple path

* Change coverage link

* Add tutorial link to quick start
  • Loading branch information
Oliver Grande authored Jan 30, 2022
1 parent 1e9e0b0 commit 753e1dc
Show file tree
Hide file tree
Showing 704 changed files with 41,408 additions and 14,638 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: SonarCloud
on:
push:
branches:
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: cd ./jpa && mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=SAP_olingo-jpa-processor-v4
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: "JDK: openjdk11"
jdk: openjdk11
script: cd ./jpa && mvn -q verify
- name: "JDK: openjdk14"
jdk: openjdk14
- name: "JDK: openjdk17"
jdk: openjdk17
script: cd ./jpa && mvn -q verify
- name: "JDK: oraclejdk8"
jdk: oraclejdk8
Expand Down
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Description

[![Build Status](https://travis-ci.org/SAP/olingo-jpa-processor-v4.svg?branch=develop)](https://travis-ci.org/github/SAP/olingo-jpa-processor-v4)
[![Coverage Status](https://coveralls.io/repos/github/SAP/olingo-jpa-processor-v4/badge.svg?branch=develop)](https://coveralls.io/github/SAP/olingo-jpa-processor-v4?branch=develop)
[![Build Status](https://app.travis-ci.com/SAP/olingo-jpa-processor-v4.svg?branch=develop)](https://app.travis-ci.com/github/SAP/olingo-jpa-processor-v4)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=SAP_olingo-jpa-processor-v4&metric=coverage)](https://sonarcloud.io/dashboard?id=SAP_olingo-jpa-processor-v4)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE.txt)
[![REUSE status](https://api.reuse.software/badge/github.com/SAP/olingo-jpa-processor-v4)](https://api.reuse.software/info/github.com/SAP/olingo-jpa-processor-v4)
![GitHub last commit (develop)](https://img.shields.io/github/last-commit/SAP/OLINGO-JPA-PROCESSOR-V4/develop.svg)
[![GitHub pre-release](https://img.shields.io/github/release-pre/sap/olingo-jpa-processor-v4.svg?color=orange&label=pre-release)](https://github.com/SAP/olingo-jpa-processor-v4/releases/)
[![REUSE status](https://api.reuse.software/badge/github.com/SAP/olingo-jpa-processor-v4)](https://api.reuse.software/info/github.com/SAP/olingo-jpa-processor-v4)

The JPA Processor shall fill the gap between [Olingo V4](https://olingo.apache.org/doc/odata4/index.html) and the database if [JPA](https://en.wikipedia.org/wiki/Java_Persistence_API) is used for object-relational mapping.

Expand All @@ -16,15 +15,17 @@ At the current state the JPA Processor provide support for:
2. Processing Get requests by converting them into Criteria Builder queries.
3. Supporting entity manipulations.

More details can be found in the [Tutorials](/jpa-tutorial/Tutorials/Introduction/Introduction.md).
To get started make use of the [Quicks Start](/jpa-tutorial/QuickStart/QuickStart.md) tutorial.

The tutorials from the previous major version is still available under: [Tutorials](/jpa-tutorial/Tutorials/Introduction/Introduction.md).

# Requirements
## Requirements

The JPA Processor requires,minimum Java version [1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). The current version comes with Olingo 4.8.0. If you want to be updated about Olingo changes subscribe to Olingos [user mailing list]([email protected]).
The JPA Processor requires, minimum Java version [1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). The current version comes with [Olingo 4.8.0](https://github.com/apache/olingo-odata4). If you want to be updated about Olingo changes subscribe to Olingo's [user mailing list]([email protected]).

Even so no JPA implementation is preferred, as long as it supports [JSR-338 Java Persistence 2.1](https://jcp.org/en/jsr/detail?id=317), it has to be stated that all test have been performed with [Eclipselink 2.7.1](http://www.eclipse.org/eclipselink/). If you have any problem e.g. with [Hibernate](http://hibernate.org) create an [issue](https://github.com/SAP/olingo-jpa-processor-v4/issues), but there is no guaranty that it can be solved, as Hibernate implements some JPA interfaces "differently" than EclipseLink.
Even so no JPA implementation is preferred, as long as it supports [JSR-338 Java Persistence 2.2](https://jcp.org/en/jsr/detail?id=338), it has to be stated that all test have been performed with [Eclipselink 2.7.9](http://www.eclipse.org/eclipselink/). If you have any problem e.g. with [Hibernate](http://hibernate.org) or [OpenJPA](https://openjpa.apache.org/), create an [issue](https://github.com/SAP/olingo-jpa-processor-v4/issues), but there is no guaranty that it can be solved, as e.g. Hibernate implements some JPA interfaces "differently" than EclipseLink.

# Download and Installation
## Download and Installation

The JPA Processor is a collection of [Maven](https://maven.apache.org) projects. To use it you need to
clone the repository, import the projects and declare a dependency to either the metadata generation only:
Expand All @@ -33,7 +34,7 @@ clone the repository, import the projects and declare a dependency to either the
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-metadata</artifactId>
<version>0.3.11-SNAPSHOT</version>
<version>1.0.6</version>
</dependency>
```

Expand All @@ -43,37 +44,38 @@ Or to the complete processor:
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-processor</artifactId>
<version>0.3.11-SNAPSHOT</version>
<version>1.0.6</version>
</dependency>
```

# Limitations
## Limitations

The project is still in the state of incubation, so some incompatible changes my come up, see To-Do. Nevertheless feel free to use the JPA processor where ever it helps.
The core of this project became stable. Some of the addons are still in the state of incubation, so some incompatible changes my come up. Nevertheless feel free to use the JPA processor and the addons where ever it helps.

# How to obtain support
## How to obtain support

For bugs, questions and ideas for enhancement please open an issue in github.

# To-Do (upcoming-changes)
## To-Do (upcoming-changes)

The flowing extensions/changes are planned:

* Transient fields
* Tenant depended metadata
* Enable hooks for retrieving data
* Support of $ref
* ETag on $metadata
* Support asynchronous requests
* Parallel processing for $expand
* Enable server side paging at $expand
* Overload Operations

# License
New versions will follow [Semantic Versioning](https://semver.org).

## License

Copyright (c) 2016-2021 SAP SE or an SAP affiliate company and olingo-jpa-processor-v4 contributors. Please see our [LICENSE.txt](LICENSE.txt) for copyright and license information.
Detailed information including third-party components and their licensing/copyright information is available via the [REUSE tool](https://api.reuse.software/info/github.com/SAP/olingo-jpa-processor-v4).

# Release Notes
## Release Notes

|Version|Changes|Incompatible Changes|
|-- |-- |-- |
Expand All @@ -87,10 +89,11 @@ Detailed information including third-party components and their licensing/copyri
|0.3.2|- Lift unit tests to JUnit 5<br> - Correction of http return codes on empty responses |No|
|0.3.3|- Support of PUT requests on collection properties and simple primitive properties<br> - Update to Olingo 4.6.0 <br> - Solution for issue [#69](https://github.com/SAP/olingo-jpa-processor-v4/issues/69) <br> - Solution for issue [#71](https://github.com/SAP/olingo-jpa-processor-v4/issues/71)<br>- Update tutorial [4.4](jpa-tutorial/Tutorials/SpecialTopics/4-4-InstanceBasedAuthorizations.md)|No
|0.3.4|- Support of $select as part of $expand<br> - Support of field groups<br> - Introduction of a request context, which includes deprecation of methods <br> - Etag now written into response e.g. @odata.etag when JSON was requested<br> - Solution for issue [#78](https://github.com/SAP/olingo-jpa-processor-v4/issues/78) <br> - Updated tutorials: [2.2](jpa-tutorial/Tutorials/RetrieveData/2-2-RetrievingData.md), [2.3](jpa-tutorial/Tutorials/RetrieveData/2-3-UsingFunctions.md), [3.1](jpa-tutorial/Tutorials/ChangeData/3-1-Preparation.md), [3.2](jpa-tutorial/Tutorials/ChangeData/3-2-CreatingEntities.md), [4.4](jpa-tutorial/Tutorials/SpecialTopics/4-4-InstanceBasedAuthorizations.md) |Yes|
|0.3.5|- Extension of session context, so an entity manager factory can be provided. This will allow creating Spring based services without `persistence.xml` file <br> - Solution for issue [#85](https://github.com/SAP/olingo-jpa-processor-v4/issues/85)<br> - Usage of Olingo JSON deserializer for CUD requests<br> - Extension of session context, so an non Edm Name Builder can be provided|Yes|
|0.3.5|- Extension of session context, so an entity manager factory can be provided. This will allow creating Spring based services without `persistence.xml` file <br> - Solution for issue [#85](https://github.com/SAP/olingo-jpa-processor-v4/issues/85)<br> - Usage of Olingo JSON deserializer for CUD requests<br> - Extension of session context, so an own Edm Name Builder can be provided|Yes|
|0.3.6|- Enable more flexible transaction handling<br> - Part solution for issue [#83](https://github.com/SAP/olingo-jpa-processor-v4/issues/83)<br> - Increase support of Spring by performing request mapping in case a mapping path is provided via the service context|No|
|0.3.7| - Update Olingo dependency to 4.7.0|No|
|0.3.8| - Update Olingo dependency to 4.7.1<br> - Support of `java.time` data types. Prerequisite is the usage of JPA 2.2. <br> - Support of Absolute Context URL. See issue [#103](https://github.com/SAP/olingo-jpa-processor-v4/issues/103)<br> - Temporal data types do not longer require a Precision [#98](https://github.com/SAP/olingo-jpa-processor-v4/issues/98)<br>Support of MappedSuperclass|No|
|0.3.9| - Solutions for issue [#112](https://github.com/SAP/olingo-jpa-processor-v4/issues/112) <br> - Solutions for issue [#114](https://github.com/SAP/olingo-jpa-processor-v4/issues/114)|No|
|0.3.10| - Update Olingo dependency to 4.8.0<br> - Deprecation of ```setExternalName``` in ```IntermediateModelItemAccess```<br>- Solutions for issue [#134](https://github.com/SAP/olingo-jpa-processor-v4/issues/136)<br>- Solutions for issue [#136](https://github.com/SAP/olingo-jpa-processor-v4/issues/136) |No|
|0.3.11| - - Solutions for issue [#138](https://github.com/SAP/olingo-jpa-processor-v4/issues/138)|No|
|0.3.10| - Update Olingo dependency to 4.8.0<br> - Deprecation of ```setExternalName``` in ```IntermediateModelItemAccess```<br>- Solutions for issue [#134](https://github.com/SAP/olingo-jpa-processor-v4/issues/136)<br>- Solution for issue [#136](https://github.com/SAP/olingo-jpa-processor-v4/issues/136) |No|
|0.3.11| - Solutions for issue [#138](https://github.com/SAP/olingo-jpa-processor-v4/issues/138)|No|
|1.0.6|- Transient Properties<br> - Singletons<br> - Entity Types without Entity Set<br> - Rework Request Context<br> - Deprecation of annotation EdmAsEntitySet |Yes|

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>0.3.11</version>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-archetype</artifactId>
<version>1.0.6</version>
</parent>
<artifactId>odata-jpa-archetype-spring</artifactId>
<name>Archetype - odata-jpa-archetype-spring</name>

<url>https://github.com/SAP/olingo-jpa-processor-v4</url>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@
<version>${version}</version>
<packaging>jar</packaging>


<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.5</version>
<version>2.6.2</version>
<relativePath />
</parent>

<properties>
<jpa-processor>0.3.11-SNAPSHOT</jpa-processor>
<processor.version>1.0.6</processor.version>
<java.version>1.8</java.version>
<eclipselink.version>2.7.9</eclipselink.version>
<jpa.version>2.2.1</jpa.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -57,23 +60,28 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.1.1</version>
<version>${jpa.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.7.1</version>
<version>${eclipselink.version}</version>
</dependency>
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-processor</artifactId>
<version>${jpa-processor}</version>
<version>${processor.version}</version>
</dependency>
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-processor-cb</artifactId>
<version>${processor.version}</version>
</dependency>
<dependency>
<groupId>com.sap.olingo</groupId>
<artifactId>odata-jpa-spring-support</artifactId>
<version>${jpa-processor}</version>
<version>${processor.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -83,12 +91,19 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>8.4.0</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.210</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
Expand Down Expand Up @@ -121,4 +136,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import javax.sql.DataSource;

import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.eclipse.persistence.logging.SessionLog;
import ${package}.model.EntityTemplate;
import org.springframework.beans.factory.ObjectProvider;
Expand All @@ -33,9 +32,9 @@ public class EclipseLinkJpaConfiguration extends JpaBaseConfiguration {
@Value("${odata.jpa.punit_name}")
private String punit;

protected EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties,
protected EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties,
ObjectProvider<JtaTransactionManager> jtaTransactionManager) {
super(dataSource, properties, jtaTransactionManager);
super(dataSource, properties, jtaTransactionManager);
}

@Override
Expand Down Expand Up @@ -71,4 +70,4 @@ public LocalContainerEntityManagerFactoryBean customerEntityManagerFactory(
.jta(false)
.build();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ${package}.config;

import static org.springframework.web.context.WebApplicationContext.SCOPE_REQUEST;

import javax.persistence.EntityManagerFactory;

import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.server.api.debug.DefaultDebugSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

import com.sap.olingo.jpa.processor.core.api.JPAODataRequestContext;
import com.sap.olingo.jpa.processor.core.api.JPAODataServiceContext;
import com.sap.olingo.jpa.processor.core.api.JPAODataSessionContextAccess;
import com.sap.olingo.jpa.processor.core.api.example.JPAExampleCUDRequestHandler;

@Configuration
public class ProcessorConfiguration {
@Value("${odata.jpa.punit_name}")
private String punit;
@Value("${odata.jpa.root_packages}")
private String rootPackages;

@Bean
public JPAODataSessionContextAccess sessionContext(@Autowired final EntityManagerFactory emf) throws ODataException {

return JPAODataServiceContext.with()
.setPUnit(punit)
.setEntityManagerFactory(emf)
.setTypePackage(rootPackages)
.setRequestMappingPath("${punit}/v1")
.build();
}

@Bean
@Scope(scopeName = SCOPE_REQUEST)
public JPAODataRequestContext requestContext() {

return JPAODataRequestContext.with()
.setCUDRequestHandler(new JPAExampleCUDRequestHandler())
.setDebugSupport(new DefaultDebugSupport())
.build();
}
}
Loading

0 comments on commit 753e1dc

Please sign in to comment.