From 973ddf96b74dc28a1aaf74e4edcb0495383a04dd Mon Sep 17 00:00:00 2001 From: Oliver Grande Date: Tue, 24 Oct 2023 13:21:58 +0200 Subject: [PATCH] New version (#234) * Correct last commit link (#204) * Feature/switch to asciidoc (#208) * As asciidoc * Update reference * Adopt readme * Add URL to sonar cloud * Add sonar org and project * Feature/release 1.1.1 (#224) * 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 ..@odata.navigationLink 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 * 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 * 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 * 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 * 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 * Upgrade version and additional tests (#241) * Upgrade version and additional tests * Remove session context from queries * Remove session context from processors * New version an sonar clean-up (#242) * Release 1.1.0 (#243) * New version an sonar clean-up * New path property fro sonar * Release 1.1.0 (#244) * New version an sonar clean-up * New path property fro sonar * Test usage of SNAPSHOT version * Update version -> 1.0.8 (#245) * Update version -> 1.0.8 * Count queries support Integer as result * Update archetype to support PATCH * Feature/release 1.0.0 (#247) * New version an sonar clean-up * New path property fro sonar * Test usage of SNAPSHOT version * Adopt archetype * Clean-up sonar issues * Resolve more sonar issues * Introducing virtual property * Clean-up associations and enable default columns when using ...-cb * Generate metadata for overloaded action (#248) * Generate metadata for overloaded action * Process action * Feature/action overload (#249) * Generate metadata for overloaded action * Process action * Use constructor of entity type an action is called for not of binding * Fix claims in collections where (#250) * Fix claims in collections where * Missed interface definition * Missed test renaming * Use dbtype to build key pair in case a conversion exists (#251) * Enable more constructors for binding parameter (#252) * Feature/more flexable constructor determination operations (#253) * Enable more constructors for binding parameter * Clean-up sonar errors * New type cast added - they have possible data lost (#254) * Collection not longer retrieves transient (#255) * Collection not longer retrieves transient * Skip unit test * Enhance partner determination (#256) * Bugfix/reuse navigation as partner (#257) * Enhance partner determination * Remove one sonar issue * Bugfix/reuse navigation as partner (#258) * Enhance partner determination * Remove one sonar issue * Correct partner determination * No fallback to server locale in case bundle requested local not found (#259) * Replace file reader (#260) * Replace fixed values by variables (#261) * Bugfix/error in controller test (#262) * Replace fixed values by variables * Update pom * Update archetype pom (#265) * Defect/archetype pom (#266) * Update archetype pom * Check older version of sonar plugin * Update test constants (#267) * Correct count behavior (#268) * Change to Java 11 (#269) * Change to Java 11 * Revert Java 11 * Update README.md (#270) * Defect/count not working on hana (#271) * Correct count behavior * Ignore sonar check. Equal methods are generated * Defect/java function parameter name (#272) * Raise meaningful exception on empty function parameter name * Meaningful exception if action parameter name empty * Raise message in case of Void as return type for functions (#273) * Raise message in case of Void as return type for functions * Add extenstion * Error in if clause * Extension of visitor for java functions (#274) * Update version to 1.1.1 (#275) * Feature/predefined annotations (#276) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Add page to order by builder (#277) * Feature/predefined annotations (#278) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Feature/predefined annotations (#279) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Feature/predefined annotations (#280) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Update .xmake.cfg (#283) * Update .xmake.cfg * Update .xmake.cfg * Correct spelling (#281) * Feature/predefined annotations (#282) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Update .xmake.cfg (#284) * Update .xmake.cfg * Update .xmake.cfg * Feature/predefined annotations (#286) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Support sorting restrictions by annotation * Build annotation based expand check * Expand star via path reads only requested from database * Check countability * Support collection property count * Annotations@Singeltons * Provide AnnotationProvider to all model elements * Enable annotations at properties * Feature/predefined annotations (#287) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Support sorting restrictions by annotation * Build annotation based expand check * Expand star via path reads only requested from database * Check countability * Support collection property count * Annotations@Singeltons * Provide AnnotationProvider to all model elements * Enable annotations at properties * Enable access to annotations via JPARequestEntity * Watch filtering * Clean-up pom and typo correction (#288) * Solve issue 212 and fix permission check issue with join tables (#289) * Solve issue 212 and fix permission check issue with join tables * $count for collection join as well * Clean-up code * Fix issue, converting type (#290) * Fix issue, converting type * Fix unit test * Correct type determination * Multi step Mapped Superclass (#291) * Upgrade H2 to 2.2.220 (#293) * Correct navigation to one is null (#294) * Add missing test * Add check for One To Many * Cleanup sonar issues * Update dependencies * First version of additional docu * Update docu * Update docu * Remove incomplete docu * docs: reference README.md to appropriate repository map (#227) Adding a link to the high-level diagrams including module, library dependency and others (https://sourcespy.com/github/sapolingojpaprocessorv4/). Built directly from source and updated on schedule. Intended to simplify developer's introduction to the project. In the spirit of transparency - I am the author of the diagrams. Hope contributors find it useful. * Update release to be used * Update build.yml and sonar.yml (#231) * Update build.yml and sonar.yml * Update sonar.yml * remove java 21 * Update build.yml * Feature/release 2.0.0 (#230) * 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 ..@odata.navigationLink 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 * 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 * 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 * 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 * 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 * Upgrade version and additional tests (#241) * Upgrade version and additional tests * Remove session context from queries * Remove session context from processors * New version an sonar clean-up (#242) * Release 1.1.0 (#243) * New version an sonar clean-up * New path property fro sonar * Release 1.1.0 (#244) * New version an sonar clean-up * New path property fro sonar * Test usage of SNAPSHOT version * Update version -> 1.0.8 (#245) * Update version -> 1.0.8 * Count queries support Integer as result * Update archetype to support PATCH * Feature/release 1.0.0 (#247) * New version an sonar clean-up * New path property fro sonar * Test usage of SNAPSHOT version * Adopt archetype * Clean-up sonar issues * Resolve more sonar issues * Introducing virtual property * Clean-up associations and enable default columns when using ...-cb * Generate metadata for overloaded action (#248) * Generate metadata for overloaded action * Process action * Feature/action overload (#249) * Generate metadata for overloaded action * Process action * Use constructor of entity type an action is called for not of binding * Fix claims in collections where (#250) * Fix claims in collections where * Missed interface definition * Missed test renaming * Use dbtype to build key pair in case a conversion exists (#251) * Enable more constructors for binding parameter (#252) * Feature/more flexable constructor determination operations (#253) * Enable more constructors for binding parameter * Clean-up sonar errors * New type cast added - they have possible data lost (#254) * Collection not longer retrieves transient (#255) * Collection not longer retrieves transient * Skip unit test * Enhance partner determination (#256) * Bugfix/reuse navigation as partner (#257) * Enhance partner determination * Remove one sonar issue * Bugfix/reuse navigation as partner (#258) * Enhance partner determination * Remove one sonar issue * Correct partner determination * No fallback to server locale in case bundle requested local not found (#259) * Replace file reader (#260) * Replace fixed values by variables (#261) * Bugfix/error in controller test (#262) * Replace fixed values by variables * Update pom * Update archetype pom (#265) * Defect/archetype pom (#266) * Update archetype pom * Check older version of sonar plugin * Update test constants (#267) * Correct count behavior (#268) * Change to Java 11 (#269) * Change to Java 11 * Revert Java 11 * Update README.md (#270) * Defect/count not working on hana (#271) * Correct count behavior * Ignore sonar check. Equal methods are generated * Defect/java function parameter name (#272) * Raise meaningful exception on empty function parameter name * Meaningful exception if action parameter name empty * Raise message in case of Void as return type for functions (#273) * Raise message in case of Void as return type for functions * Add extenstion * Error in if clause * Extension of visitor for java functions (#274) * Update version to 1.1.1 (#275) * Feature/predefined annotations (#276) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Add page to order by builder (#277) * Feature/predefined annotations (#278) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Feature/predefined annotations (#279) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Feature/predefined annotations (#280) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Update .xmake.cfg (#283) * Update .xmake.cfg * Update .xmake.cfg * Correct spelling (#281) * Feature/predefined annotations (#282) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Update .xmake.cfg (#284) * Update .xmake.cfg * Update .xmake.cfg * Feature/predefined annotations (#286) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Support sorting restrictions by annotation * Build annotation based expand check * Expand star via path reads only requested from database * Check countability * Support collection property count * Annotations@Singeltons * Provide AnnotationProvider to all model elements * Enable annotations at properties * Feature/predefined annotations (#287) * First list of predefined OData annotations * Update capabilities annotations * Sonar issues * Update dependencies * Adopt layer test * Intermediate state * Clean-up basic mapping and introduce annotation * Finalize annotation mapper * Update dependency * Adopt HSQLDB * Rename package for vocabulary parser * Move OData vocabularies to new module * Merge tests * Annotations in metadata * Finalize annotations within metadata * Support sorting restrictions by annotation * Build annotation based expand check * Expand star via path reads only requested from database * Check countability * Support collection property count * Annotations@Singeltons * Provide AnnotationProvider to all model elements * Enable annotations at properties * Enable access to annotations via JPARequestEntity * Watch filtering * Clean-up pom and typo correction (#288) * Solve issue 212 and fix permission check issue with join tables (#289) * Solve issue 212 and fix permission check issue with join tables * $count for collection join as well * Clean-up code * Fix issue, converting type (#290) * Fix issue, converting type * Fix unit test * Correct type determination * Multi step Mapped Superclass (#291) * Upgrade H2 to 2.2.220 (#293) * Correct navigation to one is null (#294) * Fix join column determination with cyclic dependency (#295) * Fix join column determination with cyclic dependency * Additional test for navigation with mapped join table * Make OneToOne required and handle non JPA Processor errors in metadata (#296) * Defect/issue214 (#297) * Make OneToOne required and handle non JPA Processor errors in metadata * Clean-up warnings * Defect/issue214 (#298) * Make OneToOne required and handle non JPA Processor errors in metadata * Clean-up warnings * Add check for OneToMany * Clean-up sonar issues * Update .xmake.cfg (#300) * Update version to 2.0.0 (#299) * Update version to 2.0.0 * Unify junit version * Make use of Jakarta * Clean-up sonar issues created by switching to Java 17 * Update dependencies * Update dependencies and clean-up typos * Add unit tests * Increase test coverage * Additional correction * Update github workflow * Correct parent pom * Sonar and missed merge-conflicts * Jakarta also in java doc * Update archetype controller * Support of Java 21 * Find archetype test error * Remove import for LocalServerPort * Remove flyway dependency and use spring boot provided * Adopt EclipseLinkJpaConfiguration to Spring Boot 3.x * Add missing imports * Set package name * Bring back flyway to artifact pom * Update README * Update README.md * JPAEdmMetadataPostProcessor as interface * Update README * Fix sonar issue * Fix another issue --------- Co-authored-by: Alex Karezin --- .github/workflows/archetype.yml | 4 +- .github/workflows/build.yml | 2 +- .github/workflows/sonar.yml | 9 +- LICENSE.txt | 2 +- README.md | 51 +- additionalWords.directory | 60 + .../odata-jpa-archetype-spring/pom.xml | 12 +- .../resources/archetype-resources/pom.xml | 64 +- .../config/EclipseLinkJpaConfiguration.java | 27 +- .../java/config/ProcessorConfiguration.java | 2 +- .../main/java/controller/ODataController.java | 4 +- .../src/main/java/model/EntityTemplate.java | 20 +- .../main/java/model/ValueObjectTemplate.java | 16 +- .../java/model/ValueObjectTemplateKey.java | 2 +- .../src/main/resources/application-test.yml | 4 + .../java/integrationtest/ControllerTest.java | 5 +- jpa-archetype/pom.xml | 8 +- ...ASingleton.md => HowToMakeASingleton.adoc} | 47 +- ...owToUpgradeTo1.md => HowToUpgradeTo1.adoc} | 19 +- .../{NameBuilding.md => NameBuilding.adoc} | 30 +- .../{Preparation.md => Preparation.adoc} | 27 +- jpa-tutorial/Questions/Questions.adoc | 11 + jpa-tutorial/Questions/Questions.md | 11 - .../Questions/WhyGeZeroNotSupported.adoc | 86 ++ .../{QuickStart.md => QuickStart.adoc} | 187 +-- jpa/.settings/org.eclipse.jdt.core.prefs | 12 + jpa/odata-jpa-annotation/.gitignore | 3 - .../org.eclipse.core.resources.prefs | 1 + .../.settings/org.eclipse.jdt.core.prefs | 6 +- ....eclipse.wst.common.project.facet.core.xml | 2 +- jpa/odata-jpa-annotation/pom.xml | 19 +- .../converter/OffsetDateTimeConverter.java | 4 +- .../converter/TimeInstantLongConverter.java | 4 +- .../core/edm/annotation/EdmAction.java | 28 +- .../core/edm/annotation/EdmAsEntitySet.java | 21 - .../core/edm/annotation/EdmEntityType.java | 5 +- .../core/edm/annotation/EdmEnumeration.java | 9 +- .../core/edm/annotation/EdmFunctionType.java | 4 +- .../core/edm/annotation/EdmParameter.java | 14 +- .../core/edm/annotation/EdmProtectedBy.java | 2 +- .../annotation/EdmQueryExtensionProvider.java | 13 +- .../core/edm/annotation/EdmTransient.java | 6 +- .../EdmTransientPropertyCalculator.java | 17 +- .../TimeInstantLongConverterTest.java | 2 +- .../edm/annotation/EdmEnumerationTest.java | 6 +- .../EdmTransientPropertyCalculatorTest.java | 6 +- jpa/odata-jpa-coverage/pom.xml | 31 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- ....eclipse.wst.common.project.facet.core.xml | 2 +- jpa/odata-jpa-metadata/pom.xml | 213 ++- .../api/JPAEdmMetadataPostProcessor.java | 24 +- .../jpa/metadata/api/JPAEdmProvider.java | 29 +- .../metadata/api/JPAEntityManagerFactory.java | 9 +- .../jpa/metadata/api/JPAJoinColumn.java | 13 +- .../metadata/api/JPAODataQueryContext.java | 15 + .../edm/mapper/annotation/Annotation.java | 26 - .../core/edm/mapper/annotation/AppliesTo.java | 102 -- .../core/edm/mapper/api/JPAAction.java | 5 - .../core/edm/mapper/api/JPAAnnotatable.java | 29 + .../edm/mapper/api/JPAAssociationPath.java | 3 +- .../core/edm/mapper/api/JPAAttribute.java | 16 +- .../edm/mapper/api/JPAEdmNameBuilder.java | 22 +- .../core/edm/mapper/api/JPAEntityType.java | 13 +- .../core/edm/mapper/api/JPAJavaOperation.java | 12 + .../core/edm/mapper/api/JPAJoinTable.java | 14 +- .../core/edm/mapper/api/JPAOperation.java | 4 +- .../metadata/core/edm/mapper/api/JPAPath.java | 8 +- .../edm/mapper/api/JPAServiceDocument.java | 33 +- .../edm/mapper/api/JPAStructuredType.java | 48 +- .../edm/mapper/api/JPATopLevelEntity.java | 2 +- .../mapper/exception/ODataJPAException.java | 2 +- .../exception/ODataJPAMessageBufferRead.java | 4 +- .../exception/ODataJPAMessageTextBuffer.java | 10 +- .../exception/ODataJPAModelException.java | 10 +- .../ODataJPAModelIgnoreException.java | 2 + .../extension/IntermediateReferenceList.java | 26 +- .../edm/mapper/extension/ODataAction.java | 9 +- .../edm/mapper/extension/ODataFunction.java | 14 +- .../mapper/impl/DefaultEdmPostProcessor.java | 2 +- .../impl/IntermediateActionFactory.java | 43 +- .../IntermediateAnnotationInformation.java | 55 + .../impl/IntermediateCollectionProperty.java | 681 ++++----- .../mapper/impl/IntermediateComplexType.java | 32 +- .../impl/IntermediateDataBaseFunction.java | 59 +- .../impl/IntermediateDescriptionProperty.java | 35 +- .../impl/IntermediateEmbeddedIdProperty.java | 7 +- .../impl/IntermediateEntityContainer.java | 48 +- .../mapper/impl/IntermediateEntitySet.java | 16 +- .../mapper/impl/IntermediateEntityType.java | 210 +-- .../impl/IntermediateEnumerationType.java | 66 +- .../edm/mapper/impl/IntermediateFunction.java | 69 +- .../impl/IntermediateFunctionFactory.java | 29 +- .../mapper/impl/IntermediateJavaAction.java | 36 +- .../mapper/impl/IntermediateJavaFunction.java | 30 +- .../mapper/impl/IntermediateJoinColumn.java | 6 +- .../mapper/impl/IntermediateJoinTable.java | 55 +- .../mapper/impl/IntermediateModelElement.java | 88 +- .../impl/IntermediateNavigationProperty.java | 1273 +++++++++-------- .../mapper/impl/IntermediateOperation.java | 5 +- .../impl/IntermediateOperationFactory.java | 44 +- .../impl/IntermediateOperationHelper.java | 73 +- .../impl/IntermediateOperationParameter.java | 5 +- .../edm/mapper/impl/IntermediateProperty.java | 138 +- .../mapper/impl/IntermediateReferences.java | 147 +- .../edm/mapper/impl/IntermediateSchema.java | 146 +- .../impl/IntermediateServiceDocument.java | 108 +- .../impl/IntermediateSimpleProperty.java | 15 +- .../mapper/impl/IntermediateSingleton.java | 16 +- .../impl/IntermediateStructuredType.java | 668 ++++++--- .../impl/IntermediateTopLevelEntity.java | 48 +- .../impl/IntermediateVirtualProperty.java | 118 ++ .../mapper/impl/JPAAssociationPathImpl.java | 64 +- .../mapper/impl/JPADefaultEdmNameBuilder.java | 36 +- .../core/edm/mapper/impl/JPANameBuilder.java | 2 +- .../core/edm/mapper/impl/JPAPathImpl.java | 44 +- .../impl/JPAServiceDocumentFactory.java | 12 +- .../edm/mapper/impl/JPATypeConverter.java | 31 +- .../core/edm/mapper/impl/ODataActionKey.java | 67 + .../reuse/OffsetDateTimeConverter.java | 27 - .../metadata-exceptions-i18n.properties | 11 +- ...mProvider.java => JPAEdmProviderTest.java} | 22 +- .../edm/mapper/impl/CustomJPANameBuilder.java | 8 +- .../mapper/impl/ExampleJavaOneFunction.java | 6 +- ...ava => IntermediateActionFactoryTest.java} | 28 +- .../IntermediateCollectionPropertyTest.java | 97 +- .../impl/IntermediateComplexTypeTest.java | 72 +- ...er.java => IntermediateContainerTest.java} | 103 +- ... => IntermediateDataBaseFunctionTest.java} | 195 +-- ... IntermediateDescriptionPropertyTest.java} | 22 +- ...> IntermediateEmbeddedIdPropertyTest.java} | 6 +- .../impl/IntermediateEntitySetTest.java | 140 +- .../impl/IntermediateEntityTypeTest.java | 422 +++++- ...a => IntermediateEnumerationTypeTest.java} | 67 +- ...a => IntermediateFunctionFactoryTest.java} | 2 +- ...n.java => IntermediateJavaActionTest.java} | 103 +- .../impl/IntermediateJavaFunctionTest.java | 109 +- .../impl/IntermediateJoinTableTest.java | 80 ++ ...java => IntermediateModelElementTest.java} | 14 +- .../IntermediateNavigationPropertyTest.java | 996 +++++++++++++ .../impl/IntermediateOperationHelperTest.java | 32 + ...s.java => IntermediateReferencesTest.java} | 122 +- .../mapper/impl/IntermediateSchemaTest.java | 160 +++ .../impl/IntermediateServiceDocumentTest.java | 79 +- .../impl/IntermediateSimplePropertyTest.java | 224 ++- .../impl/IntermediateSingletonTest.java | 101 +- ...turedTypeTransientPluralAttributeTest.java | 63 + ...ateStructuredTypeVirtualAttributeTest.java | 60 + .../impl/IntermediateTopLevelEntityTest.java | 13 +- .../impl/IntermediateVirtualPropertyTest.java | 112 ++ ...a => IntermediateWrongAnnotationTest.java} | 22 +- .../{TestJPAPath.java => JPAPathTest.java} | 14 +- .../impl/JPAQueryExtensionProviderTest.java | 6 +- ...nvertor.java => JPATypeConverterTest.java} | 10 +- .../edm/mapper/impl/ODataActionKeyTest.java | 101 ++ .../core/edm/mapper/impl/TestHelper.java | 33 +- .../impl/TestIntermediateJavaFunction.java | 270 ---- .../TestIntermediateNavigationProperty.java | 690 --------- .../mapper/impl/TestIntermediateSchema.java | 89 -- .../core/edm/mapper/impl/TestMappingRoot.java | 4 +- ...java => TimeInstantLongConverterTest.java} | 2 +- .../mapper/testaction/ActionWithOverload.java | 35 + .../core/edm/mapper/testaction/Actions.java | 10 +- .../ConverterWithConstructorError.java | 24 + .../testobjects/EnumWithConverterError.java | 8 + .../testobjects/ExampleFunctionForFilter.java | 30 + .../testobjects/ExampleJavaActions.java | 5 + .../testobjects/ExampleJavaEmConstructor.java | 10 +- .../testobjects/ExampleJavaFunctions.java | 18 +- .../testobjects/ExampleJavaOneFunction.java | 6 +- .../ExampleJavaPrivateConstructor.java | 10 +- .../ExampleJavaTwoParameterConstructor.java | 10 +- .../testobjects/FileAccessConverter.java | 8 +- .../testobjects/TestActionCollection.java | 7 + .../testobjects/TestCollectionInterface.java | 8 + .../testobjects/WrongFunctionConstructor.java | 22 + .../testobjects/WrongMemberConverter.java | 8 +- .../testobjects/WrongTypeConverter.java | 6 +- .../reuse/TestOffsetDateTimeConverter.java | 53 - .../annotations/Org.OData.Capabilities.V1.xml | 408 ------ .../annotations/Org.OData.Core.V1.xml | 462 ++++-- jpa/odata-jpa-odata-vocabularies/pom.xml | 52 + .../capabilities/terms/CountRestrictions.java | 52 + .../capabilities/terms/DeepInsertSupport.java | 42 + .../capabilities/terms/DeepUpdateSupport.java | 41 + .../terms/DeleteRestrictions.java | 75 + .../terms/ExpandRestrictions.java | 57 + .../terms/FilterExpressionType.java | 63 + .../terms/FilterRestrictions.java | 66 + .../terms/InsertRestrictions.java | 96 ++ .../capabilities/terms/SortRestrictions.java | 61 + .../v4/capabilities/terms/UpdateMethod.java | 30 + .../terms/UpdateRestrictions.java | 104 ++ .../odata/v4/core/terms/Computed.java | 26 + .../v4/core/terms/ComputedDefaultValue.java | 27 + .../odata/v4/core/terms/Immutable.java | 26 + .../metadata/odata/v4/general/Vocabulary.java | 33 + .../v4/provider/JavaAnnotationConverter.java | 343 +++++ ...aBasedCapabilitiesAnnotationsProvider.java | 43 + .../JavaBasedCoreAnnotationsProvider.java | 43 + .../JavaBasedODataAnnotationsProvider.java | 66 + .../Org.OData.Capabilities.V1.xml | 1052 ++++++++++++++ .../vocabularies/Org.OData.Core.V1.xml | 544 +++++++ .../provider/JavaAnnotationConverterTest.java | 254 ++++ ...edCapabilitiesAnnotationsProviderTest.java | 49 + .../JavaBasedCoreAnnotationsProviderTest.java | 49 + .../JavaBasedODataAnnotaionsProviderTest.java | 149 ++ .../odata/v4/provider/References.java | 74 + jpa/odata-jpa-processor-cb/README.md | 2 +- jpa/odata-jpa-processor-cb/pom.xml | 11 +- .../cb/api/EntityManagerFactoryWrapper.java | 26 +- .../processor/cb/impl/AbstractJoinImp.java | 11 +- .../processor/cb/impl/CollectionJoinImpl.java | 35 +- .../cb/impl/CompoundSelectionImpl.java | 65 +- .../cb/impl/CriteriaBuilderImpl.java | 106 +- .../processor/cb/impl/CriteriaQueryImpl.java | 37 +- .../cb/impl/EntityManagerWrapper.java | 62 +- .../jpa/processor/cb/impl/ExpressionImpl.java | 62 +- .../jpa/processor/cb/impl/FromImpl.java | 136 +- .../processor/cb/impl/InheritanceInfo.java | 9 +- .../cb/impl/JPAAttributeWrapper.java | 21 +- .../jpa/processor/cb/impl/JPAPathWrapper.java | 7 +- .../jpa/processor/cb/impl/JoinTableJoin.java | 31 +- .../jpa/processor/cb/impl/OrderImpl.java | 4 +- .../processor/cb/impl/ParameterBuffer.java | 30 +- .../jpa/processor/cb/impl/PathImpl.java | 40 +- .../jpa/processor/cb/impl/PathJoin.java | 9 +- .../jpa/processor/cb/impl/PredicateImpl.java | 43 +- .../jpa/processor/cb/impl/RootImpl.java | 10 +- .../jpa/processor/cb/impl/SelectionImpl.java | 5 +- .../jpa/processor/cb/impl/SelectionPath.java | 29 +- .../jpa/processor/cb/impl/SimpleJoin.java | 29 +- .../jpa/processor/cb/impl/SqlJoinType.java | 2 +- .../jpa/processor/cb/impl/SqlSelection.java | 2 +- .../jpa/processor/cb/impl/SubqueryImpl.java | 35 +- .../processor/cb/impl/SubqueryRootImpl.java | 39 +- .../jpa/processor/cb/impl/TupleImpl.java | 14 +- .../jpa/processor/cb/impl/TypeConverter.java | 34 +- .../jpa/processor/cb/impl/TypedQueryImpl.java | 129 +- .../cb/joiner/ExpressionCollector.java | 7 +- .../processor/cb/joiner/ExpressionJoiner.java | 7 +- .../cb/joiner/StringBuilderCollector.java | 7 +- .../jpa/processor/cb/ArchitectureTest.java | 1 + .../api/EntityManagerFactoryWrapperTest.java | 18 +- .../cb/impl/AggregationExpressionTest.java | 6 +- .../cb/impl/ArithmeticExpressionTest.java | 4 +- .../processor/cb/impl/BuilderBaseTest.java | 29 +- .../cb/impl/CollectionJoinImplTest.java | 2 +- .../cb/impl/CompoundSelectionImplTest.java | 4 +- .../cb/impl/CriteriaBuilderDerbyTest.java | 3 +- .../cb/impl/CriteriaBuilderH2Test.java | 11 +- .../cb/impl/CriteriaBuilderHSQLDBTest.java | 3 +- .../cb/impl/CriteriaBuilderImplTest.java | 450 +++--- .../cb/impl/CriteriaBuilderOverallTest.java | 22 +- .../cb/impl/CriteriaQueryImplTest.java | 46 +- .../cb/impl/EntityManagerWrapperTest.java | 29 +- .../processor/cb/impl/ExpressionImplTest.java | 29 +- .../processor/cb/impl/ExpressionPathTest.java | 6 +- .../jpa/processor/cb/impl/FromImplTest.java | 57 +- .../cb/impl/InheritanceInfoTest.java | 2 +- .../cb/impl/JPAAttributeWrapperTest.java | 2 +- .../processor/cb/impl/JPAPathWrapperTest.java | 8 +- .../processor/cb/impl/JoinTableJoinTest.java | 77 + .../jpa/processor/cb/impl/OrderImplTest.java | 4 +- .../cb/impl/ParameterExpressionImplTest.java | 65 +- .../jpa/processor/cb/impl/PathImplTest.java | 12 +- .../processor/cb/impl/PrerdicateImplTest.java | 18 +- .../jpa/processor/cb/impl/SimpleJoinTest.java | 19 +- .../processor/cb/impl/SqlJoinTypeTest.java | 2 +- .../processor/cb/impl/SubqueryImplTest.java | 39 +- .../cb/impl/SubqueryRootImplTest.java | 55 + .../jpa/processor/cb/impl/TupleImplTest.java | 8 +- .../processor/cb/impl/TypeConverterTest.java | 26 +- .../processor/cb/impl/TypedQueryImplTest.java | 16 +- .../cb/joiner/ExpressionJoinerTest.java | 16 +- .../processor/cb/testobjects/SubJoined.java | 4 +- .../processor/cb/testobjects/SuperJoined.java | 8 +- .../cb/testobjects/SuperTablePerClass.java | 8 +- jpa/odata-jpa-processor-ext/pom.xml | 18 +- .../cb/ProcessorCriteriaBuilder.java | 15 +- .../processor/cb/ProcessorCriteriaQuery.java | 6 +- .../jpa/processor/cb/ProcessorSelection.java | 24 +- .../jpa/processor/cb/ProcessorSubquery.java | 11 +- ...cessorSelectionSelectionAttributeTest.java | 39 + .../ProcessorSelectionSelectionItemTest.java | 39 + jpa/odata-jpa-processor-parallel/README.md | 8 +- jpa/odata-jpa-processor-parallel/pom.xml | 90 +- .../JPAODataBatchParallelRequestGroup.java | 7 +- .../JPAODataBatchSequentialRequestGroup.java | 3 +- .../JPAODataParallelBatchProcessor.java | 14 +- ...JPAODataBatchAbstractRequestGroupTest.java | 5 +- ...ParallelBatchProcessorIntegrationTest.java | 3 +- .../JPAODataParallelBatchProcessorTest.java | 4 +- .../test/util/IntegrationTestHelper.java | 32 +- .../test/util/JakartaRequestMapper.java | 380 +++++ .../test/util/JakartaResponseMapper.java | 200 +++ .../test/util/JakartaServletInputStream.java | 24 + .../test/util/JakartaServletOutputStream.java | 24 + jpa/odata-jpa-processor/.project | 4 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- .../org.eclipse.wst.common.component | 16 +- ....eclipse.wst.common.project.facet.core.xml | 2 +- jpa/odata-jpa-processor/pom.xml | 254 ++-- .../api/JPAAbstractCUDRequestHandler.java | 2 +- .../core/api/JPACUDRequestHandler.java | 5 +- .../core/api/JPAODataBatchProcessor.java | 60 +- .../core/api/JPAODataClaimProvider.java | 17 +- .../core/api/JPAODataClaimsProvider.java | 5 +- .../JPAODataDefaultTransactionFactory.java | 7 +- .../api/JPAODataExternalRequestContext.java | 7 +- .../jpa/processor/core/api/JPAODataPage.java | 31 +- .../core/api/JPAODataPagingProvider.java | 4 +- .../core/api/JPAODataRequestContext.java | 2 +- .../api/JPAODataRequestContextAccess.java | 5 +- .../core/api/JPAODataRequestHandler.java | 15 +- .../core/api/JPAODataRequestProcessor.java | 185 ++- .../core/api/JPAODataServiceContext.java | 43 +- .../api/JPAODataSessionContextAccess.java | 8 +- .../core/api/JPAODataTransactionFactory.java | 23 +- .../core/api/JPAServiceDebugger.java | 11 +- .../example/JPAExampleCUDRequestHandler.java | 72 +- .../api/example/JPAExamplePagingProvider.java | 20 +- .../core/api/mapper/JakartaRequestMapper.java | 395 +++++ .../api/mapper/JakartaResponseMapper.java | 211 +++ .../api/mapper/JakartaServletInputStream.java | 24 + .../mapper/JakartaServletOutputStream.java | 24 + .../core/converter/JPAExpandResult.java | 3 +- .../JPAStructuredResultConverter.java | 2 +- .../processor/core/converter/JPATuple.java | 22 +- .../converter/JPATupleChildConverter.java | 26 +- .../JPATupleCollectionConverter.java | 15 +- .../converter/JPATupleResultConverter.java | 7 +- .../JPAAbstractDatabaseProcessor.java | 4 +- .../database/JPADefaultDatabaseProcessor.java | 12 +- .../database/JPAODataDatabaseOperations.java | 4 +- .../core/database/JPAODataDatabaseSearch.java | 14 +- .../JPAODataDatabaseTableFunction.java | 2 +- .../database/JPA_DERBY_DatabaseProcessor.java | 10 +- .../JPA_HSQLDB_DatabaseProcessor.java | 10 +- .../JPA_POSTSQL_DatabaseProcessor.java | 12 +- .../exception/ODataJPAFilterException.java | 12 +- .../exception/ODataJPAKeyPairException.java | 1 - .../exception/ODataJPAProcessorException.java | 17 +- .../exception/ODataJPAQueryException.java | 8 +- .../filter/JPAAggregationOperationImp.java | 11 +- .../core/filter/JPAArithmeticOperator.java | 4 +- .../core/filter/JPAArithmeticOperatorImp.java | 28 +- .../core/filter/JPABooleanOperator.java | 2 +- .../core/filter/JPABooleanOperatorImp.java | 10 +- .../core/filter/JPAComparisonOperator.java | 2 +- .../core/filter/JPAComparisonOperatorImp.java | 2 +- .../core/filter/JPACountExpression.java | 53 + ...erator.java => JPADBFunctionOperator.java} | 27 +- .../core/filter/JPAExistsOperation.java | 36 +- .../processor/core/filter/JPAExpression.java | 2 +- .../core/filter/JPAExpressionVisitor.java | 8 +- .../core/filter/JPAFilterComplier.java | 2 +- .../core/filter/JPAFilterComplierAccess.java | 10 +- .../core/filter/JPAFilterCrossComplier.java | 60 +- .../core/filter/JPAFilterElementComplier.java | 31 +- .../core/filter/JPAFilterExpression.java | 9 +- .../filter/JPAFilterRestrictionsWatchDog.java | 139 ++ .../JPAInvertibleVisitableExpression.java | 65 + .../core/filter/JPAJavaFunctionOperator.java | 46 + .../core/filter/JPALambdaAllOperation.java | 12 +- .../core/filter/JPALambdaOperation.java | 39 +- .../core/filter/JPALiteralOperator.java | 12 +- .../core/filter/JPAMemberOperator.java | 28 +- .../core/filter/JPAMemberVisitor.java | 17 +- .../core/filter/JPAMethodBasedExpression.java | 6 +- .../core/filter/JPAMethodCallImp.java | 18 +- .../core/filter/JPAMethodExpression.java | 4 + .../core/filter/JPANavigationOperation.java | 89 +- .../core/filter/JPANullExpression.java | 39 + .../core/filter/JPAOperationConverter.java | 41 +- .../core/filter/JPAUnaryBooleanOperator.java | 2 +- .../filter/JPAUnaryBooleanOperatorImp.java | 2 +- .../core/filter/JPAVisitableExpression.java | 3 + .../jpa/processor/core/filter/JPAVisitor.java | 162 ++- .../core/filter/ODataJPAQueryContext.java | 36 + .../core/helper/AbstractWatchDog.java | 68 + .../core/modify/JPAConversionHelper.java | 31 +- .../core/modify/JPACreateResult.java | 39 +- .../core/modify/JPAEntityBasedResult.java | 2 +- .../modify/JPAEntityCollectionResult.java | 6 +- .../modify/JPAEntityNavigationLinkResult.java | 11 +- .../core/modify/JPAEntityResult.java | 16 +- .../core/modify/JPAMapBaseResult.java | 10 +- .../core/modify/JPAMapCollectionResult.java | 7 +- .../modify/JPAMapNavigationLinkResult.java | 12 +- .../processor/core/modify/JPAMapResult.java | 24 +- .../core/modify/JPAUpdateResult.java | 18 +- .../JPAAbstractRequestProcessor.java | 4 +- .../processor/JPAActionRequestProcessor.java | 70 +- .../processor/JPACUDRequestProcessor.java | 429 +++--- .../core/processor/JPACoreDebugger.java | 167 ++- .../processor/JPACountRequestProcessor.java | 9 +- .../core/processor/JPAEmptyDebugger.java | 17 +- .../core/processor/JPAExpandWatchDog.java | 199 +++ .../JPAFunctionRequestProcessor.java | 105 +- .../core/processor/JPAHookFactory.java | 3 +- .../core/processor/JPAInstanceCreator.java | 133 ++ .../processor/JPAJavaFunctionProcessor.java | 127 ++ .../core/processor/JPAModifyUtil.java | 79 +- .../JPANavigationRequestProcessor.java | 255 ++-- .../JPAODataInternalRequestContext.java | 17 +- .../JPAOperationRequestProcessor.java | 21 +- .../core/processor/JPAProcessorFactory.java | 15 +- .../core/processor/JPARequestEntity.java | 13 +- .../core/processor/JPARequestEntityImpl.java | 17 +- .../core/processor/JPARequestLinkImpl.java | 92 +- .../core/processor/JPARequestProcessor.java | 4 +- .../core/query/ComparableByteArray.java | 15 +- .../core/query/EdmEntitySetInfo.java | 19 - .../core/query/EdmEntitySetResult.java | 61 - ...essionUtil.java => ExpressionUtility.java} | 33 +- .../core/query/JPAAbstractExpandQuery.java | 21 +- .../core/query/JPAAbstractJoinQuery.java | 271 ++-- .../core/query/JPAAbstractQuery.java | 212 ++- .../core/query/JPAAbstractSubQuery.java | 186 ++- .../core/query/JPACollectionFilterQuery.java | 51 +- .../core/query/JPACollectionJoinQuery.java | 146 +- .../core/query/JPACollectionQueryResult.java | 8 +- .../core/query/JPAConvertibleResult.java | 4 +- .../core/query/JPACountWatchDog.java | 160 +++ .../core/query/JPAExpandFilterQuery.java | 136 +- .../core/query/JPAExpandItemInfo.java | 2 +- .../core/query/JPAExpandItemInfoFactory.java | 42 +- .../core/query/JPAExpandItemWrapper.java | 4 +- .../core/query/JPAExpandJoinCountQuery.java | 76 +- .../core/query/JPAExpandJoinQuery.java | 107 +- .../core/query/JPAExpandLevelWrapper.java | 132 +- .../core/query/JPAExpandQueryFactory.java | 2 +- .../core/query/JPAExpandQueryResult.java | 5 +- .../core/query/JPAExpandSubCountQuery.java | 66 +- .../core/query/JPAExpandSubQuery.java | 140 +- .../processor/core/query/JPAJoinQuery.java | 77 +- .../jpa/processor/core/query/JPAKeyPair.java | 9 +- .../core/query/JPANavigationCountQuery.java | 125 ++ .../core/query/JPANavigationFilterQuery.java | 144 +- .../JPANavigationFilterQueryBuilder.java | 159 ++ .../core/query/JPANavigationNullQuery.java | 116 ++ .../core/query/JPANavigationPropertyInfo.java | 42 +- .../core/query/JPANavigationSubQuery.java | 108 ++ .../core/query/JPAOrderByBuilder.java | 78 +- .../core/query/JPAOrderByBuilderWatchDog.java | 133 ++ .../core/query/JPAQueryCreationResult.java | 21 +- .../processor/core/query/JPAQueryPair.java | 17 +- .../core/query/JPARowNumberFilterQuery.java | 73 +- .../core/query/{Util.java => Utility.java} | 255 ++-- .../serializer/JPAPrimitivePropertyInfo.java | 19 +- .../core/serializer/JPASerializeComplex.java | 22 +- .../core/serializer/JPASerializeCreate.java | 4 +- .../core/serializer/JPASerializeEntity.java | 4 +- .../JPASerializeEntityCollection.java | 4 +- .../core/serializer/JPASerializeFunction.java | 6 +- .../serializer/JPASerializePrimitive.java | 10 +- .../JPASerializePrimitiveAbstract.java | 4 +- .../core/serializer/JPASerializeValue.java | 10 +- .../core/serializer/JPASerializerFactory.java | 11 +- .../example-exceptions-i18n.properties | 2 +- .../processor-exceptions-i18n.properties | 13 + .../api/JPAErrorProcessorWrapperTest.java | 45 + .../core/api/JPAODataBatchProcessorTest.java | 36 +- .../core/api/JPAODataClaimProviderTest.java | 27 + .../core/api/JPAODataClaimsProviderTest.java | 4 + .../core/api/JPAODataContextAccessDouble.java | 13 +- ...JPAODataDefaultTransactionFactoryTest.java | 4 +- .../JPAODataExternalRequestContextTest.java | 12 +- .../core/api/JPAODataRequestHandlerTest.java | 45 +- .../api/JPAODataRequestProcessorTest.java | 21 +- .../JPAODataServiceContextBuilderTest.java | 33 +- .../JPAExampleCUDRequestHandlerTest.java | 178 ++- .../example/JPAExamplePagingProviderTest.java | 124 +- .../api/mapper/JakartaRequestMapperTest.java | 491 +++++++ .../api/mapper/JakartaResponseMapperTest.java | 292 ++++ .../JPADefaultDatabaseProcessorTest.java | 34 +- .../JPA_DERBY_DatabaseProcessorTest.java | 6 +- .../JPA_HSQLDB_DatabaseProcessorTest.java | 6 +- .../JPA_POSTSQL_DatabaseProcessorTest.java | 6 +- .../JPA_XXX_DatabaseProcessorTest.java | 4 +- .../TestJPADefaultDatabaseProcessor.java | 122 -- .../TestJPA_DERBY_DatabaseProcessor.java | 44 - .../TestJPA_HSQLDB_DatabaseProcessor.java | 44 - .../TestJPA_POSTSQL_DatabaseProcessor.java | 43 - .../TestJPA_XXX_DatabaseProcessor.java | 396 ----- .../core/filter/JPACountExpressionTest.java | 127 ++ ...or.java => JPADBFunctionOperatorTest.java} | 38 +- .../JPAFilterRestrictionsWatchDogTest.java | 230 +++ .../filter/JPAJavaFunctionOperatorTest.java | 103 ++ .../core/filter/JPANullExpressionTest.java | 75 + ...estJPAVisitor.java => JPAVisitorTest.java} | 56 +- .../core/filter/ODataJPAQueryContextTest.java | 50 + .../filter/TestJPAArithmeticOperator.java | 8 +- .../filter/TestJPACustomScalarFunctions.java | 9 +- .../filter/TestJPAOperationConverter.java | 6 +- .../core/filter/TestJPAQueryWhereClause.java | 964 ++++--------- .../core/filter/TestJavaFunctions.java | 63 + ...ava => JPAConversionHelperEntityTest.java} | 2 +- ...p.java => JPAConversionHelperMapTest.java} | 2 +- ...lper.java => JPAConversionHelperTest.java} | 4 +- .../core/modify/TestJPACUDRequestHelper.java | 8 +- .../core/modify/TestJPACreateResult.java | 4 +- .../core/modify/TestJPAEntityResult.java | 4 +- ...ava => JPAActionRequestProcessorTest.java} | 45 +- .../core/processor/JPAClearProcessorTest.java | 14 +- ...Debugger.java => JPACoreDebuggerTest.java} | 346 +++-- .../processor/JPADebugSupportWrapperTest.java | 74 + .../core/processor/JPAEmptyDebuggerTest.java | 27 + .../core/processor/JPAExpandWatchDogTest.java | 407 ++++++ .../JPAFunctionRequestProcessorTest.java | 208 +++ .../core/processor/JPAHookFactoryTest.java | 8 +- .../processor/JPAInstanceCreatorTest.java | 371 +++++ .../JPAJavaFunctionProcessorTest.java | 310 ++++ ...ModifyUtil.java => JPAModifyUtilTest.java} | 47 +- .../JPAODataInternalRequestContextTest.java | 5 +- .../JPAODataRequestContextBuilderTest.java | 2 +- .../processor/JPARequestLinkImplTest.java | 120 +- .../processor/TestCreateDeltaBasedResult.java | 2 +- .../processor/TestCreateRequestEntity.java | 92 +- .../processor/TestJPACreateProcessor.java | 2 +- .../processor/TestJPADeleteProcessor.java | 4 +- .../processor/TestJPAModifyProcessor.java | 14 +- .../TestJPAODataRequestContextImpl.java | 10 +- .../processor/TestJPAUpdateProcessor.java | 6 +- .../core/query/ComparableByteArrayTest.java | 38 +- .../core/query/JPAAbstractQueryTest.java | 106 ++ .../core/query/JPACountWatchDogTest.java | 261 ++++ .../query/JPAExpandJoinCountQueryTest.java | 4 +- ...Query.java => JPAExpandJoinQueryTest.java} | 6 +- .../core/query/JPAExpandLevelWrapperTest.java | 249 ++++ ...ult.java => JPAExpandQueryResultTest.java} | 512 +++---- .../query/JPAExpandSubCountQueryTest.java | 2 +- .../core/query/JPAJoinQueryTest.java | 16 +- ...estJPAKeyPair.java => JPAKeyPairTest.java} | 670 ++++----- .../query/JPANavigationCountQueryTest.java | 177 +++ .../JPANavigationFilterQueryBuilderTest.java | 238 +++ .../query/JPANavigationFilterQueryTest.java | 142 ++ .../query/JPANavigationNullQueryTest.java | 154 ++ .../query/JPAOrderByBuilderWatchDogTest.java | 303 ++++ .../core/query/TestEdmEntitySetResult.java | 88 -- .../query/TestJPAExpandJoinCountQuery.java | 7 - .../query/TestJPAExpandQueryCreateResult.java | 66 +- .../processor/core/query/TestJPAFunction.java | 13 +- .../core/query/TestJPAFunctionDB.java | 7 +- .../core/query/TestJPAFunctionJava.java | 9 +- .../core/query/TestJPAFunctionSerializer.java | 23 +- .../core/query/TestJPAOrderByBuilder.java | 39 +- .../core/query/TestJPAProcessorExpand.java | 496 ++++--- .../TestJPAQueryBuildSelectionPathList.java | 8 +- .../core/query/TestJPAQueryCollection.java | 47 +- .../core/query/TestJPAQueryFromClause.java | 14 +- .../core/query/TestJPAQueryNavigation.java | 136 +- .../query/TestJPAQueryNavigationCount.java | 14 +- .../core/query/TestJPAQueryOrderByClause.java | 5 +- .../core/query/TestJPAQueryPair.java | 4 +- .../core/query/TestJPAQuerySelectClause.java | 80 +- .../TestJPAQuerySelectWithGroupClause.java | 2 +- .../query/TestJPAQueryWithProtection.java | 22 +- .../core/query/TestJPAServerDrivenPaging.java | 13 +- .../query/TestJPATupleChildConverter.java | 2 +- ...TestJPATupleChildConverterCompoundKey.java | 2 +- .../query/{UtilTest.java => UtilityTest.java} | 130 +- .../ClassWithIdClassConstructor.java | 23 + .../ClassWithIdClassWithoutConstructor.java | 10 + .../ClassWithMultipleKeysConstructor.java | 39 + .../ClassWithMultipleKeysNoConstructor.java | 33 + .../ClassWithMultipleKeysSetter.java | 51 + .../ClassWithOneKeyAndEmptyConstructor.java | 23 + .../ClassWithOneKeyConstructor.java | 23 + .../core/testobjects/FileAccessConverter.java | 8 +- .../testobjects/OrganizationWithAudit.java | 4 +- .../TestFunctionActionConstructor.java | 45 + .../testobjects/TestFunctionForFilter.java | 35 + .../testobjects/TestFunctionParameter.java | 24 +- .../testobjects/TestFunctionReturnType.java | 69 +- .../TestJavaActionNoParameter.java | 19 +- .../core/testobjects/TestJavaActions.java | 20 +- ...eeParameterTransientPropertyConverter.java | 2 +- ...woParameterTransientPropertyConverter.java | 2 +- .../core/util/AbstractWatchDogTest.java | 58 + .../core/util/IntegrationTestHelper.java | 129 +- .../core/util/JPAEntityTypeDouble.java | 12 + .../jpa/processor/core/util/TestBase.java | 9 +- .../processor/core/util/TestGroupBase.java | 19 +- .../jpa/processor/core/util/TestHelper.java | 32 +- .../processor/core/util/TestQueryBase.java | 13 +- .../jpa/processor/core/util/TupleDouble.java | 20 +- .../core/util/TupleElementDouble.java | 4 +- jpa/odata-jpa-spring-support/pom.xml | 4 +- .../.settings/org.eclipse.jdt.core.prefs | 9 +- ....eclipse.wst.common.project.facet.core.xml | 3 +- jpa/odata-jpa-test/pom.xml | 294 ++-- .../errormodel/AdministrativeInformation.java | 12 +- .../core/errormodel/ChangeInformation.java | 8 +- .../CollectionAttributeProtected.java | 26 +- .../errormodel/ComplexProtectedNoPath.java | 22 +- .../errormodel/ComplexProtectedWrongPath.java | 22 +- .../core/errormodel/CompoundKey.java | 6 +- .../errormodel/DummyPropertyCalculator.java | 12 +- .../errormodel/EmbeddedKeyPartOfGroup.java | 10 +- .../core/errormodel/KeyPartOfGroup.java | 15 +- .../core/errormodel/MandatoryPartOfGroup.java | 18 +- .../MissingCardinalityAnnotation.java | 26 + .../NavigationAttributeProtected.java | 18 +- .../NavigationPropertyPartOfGroup.java | 16 +- .../PersonDeepCollectionProtected.java | 16 +- .../core/errormodel/SingletonAsEntitySet.java | 21 - .../jpa/processor/core/errormodel/Team.java | 10 +- ...thTransientCalculatorConstructorError.java | 8 +- .../TeamWithTransientCalculatorError.java | 8 +- .../TeamWithTransientEmbeddableKey.java | 6 +- .../errormodel/TeamWithTransientError.java | 8 +- .../core/errormodel/TeamWithTransientKey.java | 12 +- ...ientPropertyCalculatorTwoConstructors.java | 6 +- ...entPropertyCalculatorWrongConstructor.java | 8 +- .../core/test_udf/UserDefinedFunctions.java | 14 - .../core/testmodel/AbstractGroup.java | 52 + .../core/testmodel/AccessRights.java | 2 +- .../core/testmodel/AccessRightsConverter.java | 4 +- .../core/testmodel/AddressDeepProtected.java | 6 +- .../AddressDeepThreeProtections.java | 6 +- .../testmodel/AdministrativeDivision.java | 77 +- .../AdministrativeDivisionDescription.java | 12 +- .../AdministrativeDivisionDescriptionKey.java | 18 +- .../testmodel/AdministrativeDivisionKey.java | 16 +- .../testmodel/AdministrativeInformation.java | 16 +- .../core/testmodel/AnnotationsParent.java | 91 ++ .../core/testmodel/AnnotationsSingleton.java | 35 + .../testmodel/AssociationOneToManySource.java | 44 + .../testmodel/AssociationOneToManyTarget.java | 43 + .../testmodel/AssociationOneToOneSource.java | 32 + .../testmodel/AssociationOneToOneTarget.java | 21 + .../core/testmodel/BestOrganization.java | 11 +- .../core/testmodel/BusinessPartner.java | 31 +- .../testmodel/BusinessPartnerProtected.java | 51 +- .../core/testmodel/BusinessPartnerRole.java | 24 +- .../testmodel/BusinessPartnerRoleKey.java | 12 +- .../BusinessPartnerRoleProtected.java | 22 +- .../BusinessPartnerRoleWithGroup.java | 22 +- .../testmodel/BusinessPartnerWithGroups.java | 48 +- .../core/testmodel/ByteConverter.java | 8 +- .../core/testmodel/ChangeInformation.java | 14 +- .../processor/core/testmodel/Collection.java | 29 +- .../core/testmodel/CollectionDeep.java | 18 +- .../CollectionFirstLevelComplex.java | 14 +- .../testmodel/CollectionInnerComplex.java | 9 +- .../testmodel/CollectionNestedComplex.java | 6 +- .../CollectionNestedComplexWithTransient.java | 8 +- .../testmodel/CollectionPartOfComplex.java | 22 +- .../CollectionSecondLevelComplex.java | 24 +- .../testmodel/CollectionWithTransient.java | 32 +- .../jpa/processor/core/testmodel/Comment.java | 28 +- .../core/testmodel/CommunicationData.java | 12 +- .../core/testmodel/ComplexBaseType.java | 4 +- .../core/testmodel/ComplexSubType.java | 4 +- ...ComplexWithTransientComplexCollection.java | 10 +- .../jpa/processor/core/testmodel/Country.java | 21 +- .../processor/core/testmodel/CountryKey.java | 14 +- .../core/testmodel/CountryRestriction.java | 14 +- .../processor/core/testmodel/CurrentUser.java | 6 +- .../testmodel/CurrentUserQueryExtension.java | 8 +- .../core/testmodel/DataSourceHelper.java | 1 + .../core/testmodel/DateConverter.java | 10 +- .../core/testmodel/DateTimeConverter.java | 8 +- .../core/testmodel/DateTimeTest.java | 14 +- .../core/testmodel/DeepProtectedExample.java | 14 +- .../core/testmodel/DetailSettings.java | 21 + .../core/testmodel/DummyEmbeddedToIgnore.java | 10 +- .../core/testmodel/DummyToBeIgnored.java | 49 +- .../EmptyQueryExtensionProvider.java | 8 +- .../core/testmodel/EntityTypeOnly.java | 16 +- .../core/testmodel/FullNameCalculator.java | 6 +- .../jpa/processor/core/testmodel/Group.java | 36 +- .../core/testmodel/GroupNameCalculator.java | 4 +- .../processor/core/testmodel/ImageLoader.java | 39 +- .../core/testmodel/InhouseAddress.java | 12 +- .../core/testmodel/InhouseAddressTable.java | 18 +- .../testmodel/InhouseAddressWithGroup.java | 12 +- .../InhouseAddressWithProtection.java | 4 +- .../InhouseAddressWithThreeProtections.java | 4 +- .../testmodel/InstanceRestrictionKey.java | 4 +- .../processor/core/testmodel/JoinComplex.java | 10 +- .../testmodel/JoinPartnerRoleRelation.java | 16 + .../testmodel/JoinPartnerRoleRelationKey.java | 49 + .../core/testmodel/JoinRelation.java | 6 +- .../core/testmodel/JoinRelationKey.java | 14 +- .../processor/core/testmodel/JoinSource.java | 16 +- .../processor/core/testmodel/JoinTarget.java | 17 +- .../processor/core/testmodel/LauFilter.java | 19 + .../testmodel/LocalDateTimeConverter.java | 28 + .../core/testmodel/LogarithmCalculator.java | 6 +- .../processor/core/testmodel/Membership.java | 10 +- .../core/testmodel/MembershipKey.java | 10 +- .../core/testmodel/Organization.java | 28 +- .../core/testmodel/OrganizationImage.java | 10 +- .../jpa/processor/core/testmodel/Person.java | 46 +- .../core/testmodel/PersonDeepProtected.java | 34 +- .../testmodel/PersonDeepProtectedHidden.java | 10 +- .../processor/core/testmodel/PersonImage.java | 10 +- .../core/testmodel/PostalAddressData.java | 42 +- .../testmodel/PostalAddressDataWithGroup.java | 40 +- .../processor/core/testmodel/SalesTeam.java | 18 +- .../processor/core/testmodel/Singleton.java | 14 +- .../testmodel/StreetPropertyCalculator.java | 6 +- .../core/testmodel/StringConverter.java | 8 +- .../core/testmodel/SupportRelationship.java | 8 +- .../jpa/processor/core/testmodel/Team.java | 22 +- .../testmodel/TemporalWithValidityPeriod.java | 76 + .../TemporalWithValidityPeriodKey.java | 61 + .../core/testmodel/TestDataConstants.java | 16 - .../core/testmodel/TransientRefComplex.java | 16 +- .../core/testmodel/TransientRefIgnore.java | 38 + .../core/testmodel/UUIDToBinaryConverter.java | 19 +- .../core/testmodel/UUIDToStringConverter.java | 8 +- .../jpa/processor/core/testmodel/User.java | 9 +- .../jpa/processor/core/util/Assertions.java | 1 + .../core/util/HttpRequestHeaderDouble.java | 31 +- .../core/util/ServletInputStreamDouble.java | 20 +- .../core/util/TestDataConstants.java | 25 + .../main/resources/META-INF/persistence.xml | 24 +- .../resources/db/migration/V1_0__olingo.sql | 97 +- .../processor/test/AbstractConverterTest.java | 29 + .../test/LocalDateTimeConverterTest.java | 18 + .../jpa/processor/test/TestAssociations.java | 18 +- .../processor/test/TestCriteriaBuilder.java | 34 +- .../test/TestEqualHashCodeMethods.java | 15 +- .../TestEqualHashCodeMethodsErrorModel.java | 9 +- .../TestEqualHashCodeMethodsTestModel.java | 91 +- .../jpa/processor/test/TestFunctions.java | 27 +- .../processor/test/TestFunctionsHSQLDB.java | 23 +- .../test/TestStandardMethodsOfTestModel.java | 26 +- ...PropertyCalculatorTwoConstructorsTest.java | 30 + ...ropertyCalculatorWrongConstructorTest.java | 26 + .../test/UUIDToBinaryConverterTest.java | 16 + .../test/UUIDToStringConverterTest.java | 16 + jpa/odata-jpa-vocabularies/pom.xml | 54 + .../vocabularies/AnnotationProvider.java | 16 + .../extension/vocabularies/Applicability.java | 166 +++ .../extension/vocabularies/JPAReferences.java | 22 + .../vocabularies/ODataAnnotatable.java | 42 + .../vocabularies/ODataNavigationPath.java | 18 + .../ODataPathNotFoundException.java | 39 + .../vocabularies/ODataPropertyPath.java | 18 + .../ODataVocabularyReadException.java | 38 + .../vocabularies/ReferenceAccess.java | 24 + .../extension/vocabularies/ReferenceList.java | 26 + .../core/edm/mapper/vocabularies}/Action.java | 86 +- .../edm/mapper/vocabularies}/ComplexType.java | 6 +- .../mapper/vocabularies}/CsdlDocument.java | 2 +- .../vocabularies}/CsdlDocumentReader.java | 174 +-- .../vocabularies}/EdmxDataServices.java | 2 +- .../mapper/vocabularies}/EdmxReference.java | 58 +- .../vocabularies}/EdmxReferenceInclude.java | 50 +- .../edm/mapper/vocabularies}/EnumType.java | 2 +- .../edm/mapper/vocabularies}/Function.java | 106 +- .../core/edm/mapper/vocabularies}/Member.java | 2 +- .../core/edm/mapper/vocabularies/Named.java | 9 + .../ODataJPAVocabulariesException.java | 65 + .../edm/mapper/vocabularies}/Parameter.java | 124 +- .../edm/mapper/vocabularies}/Property.java | 2 +- .../edm/mapper/vocabularies}/ReturnType.java | 112 +- .../core/edm/mapper/vocabularies}/Schema.java | 30 +- .../core/edm/mapper/vocabularies}/Term.java | 17 +- .../mapper/vocabularies}/TypeDefinition.java | 2 +- .../vocabularies-exceptions-i18n.properties | 20 + .../ODataPathNotFoundExceptionTest.java | 32 + .../ODataVocabularyReadExceptionTest.java | 38 + .../vocabularies/ApplicabilityTest.java} | 46 +- .../ODataJPAVocabulariesExceptionTest.java | 33 + .../edm/mapper/vocabularies}/TermTest.java | 233 ++- .../vocabularies}/TestAnnotationPOJO.java | 2 +- .../vocabularies}/TestAnnotationSchema.java | 778 +++++----- .../vocabularies}/TestCsdlDocumentReader.java | 207 ++- .../annotations/Org.OData.Aggregation.V1.xml | 202 +++ .../annotations/Org.OData.Capabilities.V1.xml | 1052 ++++++++++++++ .../annotations/Org.OData.Core.V1.xml | 544 +++++++ .../annotations/Org.OData.Measures.V1.xml | 90 ++ .../Org.OData.Repeatability.V1.xml | 85 ++ .../annotations/Org.Olingo.Test.V1.xml | 114 ++ .../src/test/resources/annotations/empty.xml | 0 jpa/pom.xml | 266 ++-- 781 files changed, 32040 insertions(+), 13898 deletions(-) create mode 100644 additionalWords.directory rename jpa-tutorial/Questions/{HowToMakeASingleton.md => HowToMakeASingleton.adoc} (79%) rename jpa-tutorial/Questions/{HowToUpgradeTo1.md => HowToUpgradeTo1.adoc} (91%) rename jpa-tutorial/Questions/{NameBuilding.md => NameBuilding.adoc} (80%) rename jpa-tutorial/Questions/{Preparation.md => Preparation.adoc} (95%) create mode 100644 jpa-tutorial/Questions/Questions.adoc delete mode 100644 jpa-tutorial/Questions/Questions.md create mode 100644 jpa-tutorial/Questions/WhyGeZeroNotSupported.adoc rename jpa-tutorial/QuickStart/{QuickStart.md => QuickStart.adoc} (51%) delete mode 100644 jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAsEntitySet.java create mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/api/JPAODataQueryContext.java delete mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation/Annotation.java delete mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation/AppliesTo.java create mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/api/JPAAnnotatable.java create mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateAnnotationInformation.java create mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateVirtualProperty.java create mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/ODataActionKey.java delete mode 100644 jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/reuse/OffsetDateTimeConverter.java rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/api/{TestJPAEdmProvider.java => JPAEdmProviderTest.java} (91%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateActionFactory.java => IntermediateActionFactoryTest.java} (61%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateContainer.java => IntermediateContainerTest.java} (80%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateDataBaseFunction.java => IntermediateDataBaseFunctionTest.java} (51%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateDescriptionProperty.java => IntermediateDescriptionPropertyTest.java} (96%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateEmbeddedIdProperty.java => IntermediateEmbeddedIdPropertyTest.java} (91%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateEnumerationType.java => IntermediateEnumerationTypeTest.java} (70%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateFunctionFactory.java => IntermediateFunctionFactoryTest.java} (95%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateJavaAction.java => IntermediateJavaActionTest.java} (85%) create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateJoinTableTest.java rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateModelElement.java => IntermediateModelElementTest.java} (78%) create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateNavigationPropertyTest.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateOperationHelperTest.java rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateReferences.java => IntermediateReferencesTest.java} (61%) create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateSchemaTest.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateStructuredTypeTransientPluralAttributeTest.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateStructuredTypeVirtualAttributeTest.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/IntermediateVirtualPropertyTest.java rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestIntermediateWrongAnnotation.java => IntermediateWrongAnnotationTest.java} (89%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestJPAPath.java => JPAPathTest.java} (93%) rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestJPATypeConvertor.java => JPATypeConverterTest.java} (96%) create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/ODataActionKeyTest.java delete mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/TestIntermediateJavaFunction.java delete mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/TestIntermediateNavigationProperty.java delete mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/TestIntermediateSchema.java rename jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/impl/{TestTimeInstantLongConverter.java => TimeInstantLongConverterTest.java} (93%) create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testaction/ActionWithOverload.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/ConverterWithConstructorError.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/EnumWithConverterError.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/ExampleFunctionForFilter.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/TestActionCollection.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/TestCollectionInterface.java create mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/testobjects/WrongFunctionConstructor.java delete mode 100644 jpa/odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/reuse/TestOffsetDateTimeConverter.java delete mode 100644 jpa/odata-jpa-metadata/src/test/resources/annotations/Org.OData.Capabilities.V1.xml create mode 100644 jpa/odata-jpa-odata-vocabularies/pom.xml create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/CountRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/DeepInsertSupport.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/DeepUpdateSupport.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/DeleteRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/ExpandRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/FilterExpressionType.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/FilterRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/InsertRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/SortRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/UpdateMethod.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/capabilities/terms/UpdateRestrictions.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/core/terms/Computed.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/core/terms/ComputedDefaultValue.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/core/terms/Immutable.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/general/Vocabulary.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaAnnotationConverter.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedCapabilitiesAnnotationsProvider.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedCoreAnnotationsProvider.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedODataAnnotationsProvider.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/resources/vocabularies/Org.OData.Capabilities.V1.xml create mode 100644 jpa/odata-jpa-odata-vocabularies/src/main/resources/vocabularies/Org.OData.Core.V1.xml create mode 100644 jpa/odata-jpa-odata-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaAnnotationConverterTest.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedCapabilitiesAnnotationsProviderTest.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedCoreAnnotationsProviderTest.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/odata/v4/provider/JavaBasedODataAnnotaionsProviderTest.java create mode 100644 jpa/odata-jpa-odata-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/odata/v4/provider/References.java create mode 100644 jpa/odata-jpa-processor-cb/src/test/java/com/sap/olingo/jpa/processor/cb/impl/JoinTableJoinTest.java create mode 100644 jpa/odata-jpa-processor-cb/src/test/java/com/sap/olingo/jpa/processor/cb/impl/SubqueryRootImplTest.java create mode 100644 jpa/odata-jpa-processor-ext/src/test/java/com/sap/olingo/jpa/processor/cb/ProcessorSelectionSelectionAttributeTest.java create mode 100644 jpa/odata-jpa-processor-ext/src/test/java/com/sap/olingo/jpa/processor/cb/ProcessorSelectionSelectionItemTest.java create mode 100644 jpa/odata-jpa-processor-parallel/src/test/java/com/sap/olingo/jpa/processor/test/util/JakartaRequestMapper.java create mode 100644 jpa/odata-jpa-processor-parallel/src/test/java/com/sap/olingo/jpa/processor/test/util/JakartaResponseMapper.java create mode 100644 jpa/odata-jpa-processor-parallel/src/test/java/com/sap/olingo/jpa/processor/test/util/JakartaServletInputStream.java create mode 100644 jpa/odata-jpa-processor-parallel/src/test/java/com/sap/olingo/jpa/processor/test/util/JakartaServletOutputStream.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaRequestMapper.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaResponseMapper.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaServletInputStream.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaServletOutputStream.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/JPACountExpression.java rename jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/{JPAFunctionOperator.java => JPADBFunctionOperator.java} (83%) create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/JPAFilterRestrictionsWatchDog.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/JPAInvertibleVisitableExpression.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/JPAJavaFunctionOperator.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/JPANullExpression.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/filter/ODataJPAQueryContext.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/helper/AbstractWatchDog.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/processor/JPAExpandWatchDog.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/processor/JPAInstanceCreator.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/processor/JPAJavaFunctionProcessor.java delete mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/EdmEntitySetInfo.java delete mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/EdmEntitySetResult.java rename jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/{ExpressionUtil.java => ExpressionUtility.java} (86%) create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPACountWatchDog.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPANavigationCountQuery.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPANavigationFilterQueryBuilder.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPANavigationNullQuery.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPANavigationSubQuery.java create mode 100644 jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/JPAOrderByBuilderWatchDog.java rename jpa/odata-jpa-processor/src/main/java/com/sap/olingo/jpa/processor/core/query/{Util.java => Utility.java} (61%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/api/JPAErrorProcessorWrapperTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/api/JPAODataClaimProviderTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaRequestMapperTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/api/mapper/JakartaResponseMapperTest.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/database/TestJPADefaultDatabaseProcessor.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/database/TestJPA_DERBY_DatabaseProcessor.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/database/TestJPA_HSQLDB_DatabaseProcessor.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/database/TestJPA_POSTSQL_DatabaseProcessor.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/database/TestJPA_XXX_DatabaseProcessor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/JPACountExpressionTest.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/{TestJPAFunctionOperator.java => JPADBFunctionOperatorTest.java} (69%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/JPAFilterRestrictionsWatchDogTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/JPAJavaFunctionOperatorTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/JPANullExpressionTest.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/{TestJPAVisitor.java => JPAVisitorTest.java} (61%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/ODataJPAQueryContextTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/filter/TestJavaFunctions.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/modify/{TestJPAConversionHelperEntity.java => JPAConversionHelperEntityTest.java} (94%) rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/modify/{TestJPAConversionHelperMap.java => JPAConversionHelperMapTest.java} (94%) rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/modify/{TestJPAConversionHelper.java => JPAConversionHelperTest.java} (96%) rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/{JPAActionProcessorTest.java => JPAActionRequestProcessorTest.java} (89%) rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/{TestJPACoreDebugger.java => JPACoreDebuggerTest.java} (65%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPADebugSupportWrapperTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPAEmptyDebuggerTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPAExpandWatchDogTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPAFunctionRequestProcessorTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPAInstanceCreatorTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/JPAJavaFunctionProcessorTest.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/processor/{TestModifyUtil.java => JPAModifyUtilTest.java} (86%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPAAbstractQueryTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPACountWatchDogTest.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/{TestJPAExpandJoinQuery.java => JPAExpandJoinQueryTest.java} (98%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPAExpandLevelWrapperTest.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/{TestJPAExpandQueryResult.java => JPAExpandQueryResultTest.java} (95%) rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/{TestJPAKeyPair.java => JPAKeyPairTest.java} (91%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPANavigationCountQueryTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPANavigationFilterQueryBuilderTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPANavigationFilterQueryTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPANavigationNullQueryTest.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/JPAOrderByBuilderWatchDogTest.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/TestEdmEntitySetResult.java delete mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/TestJPAExpandJoinCountQuery.java rename jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/query/{UtilTest.java => UtilityTest.java} (58%) create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithIdClassConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithIdClassWithoutConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithMultipleKeysConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithMultipleKeysNoConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithMultipleKeysSetter.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithOneKeyAndEmptyConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/ClassWithOneKeyConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/TestFunctionActionConstructor.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/testobjects/TestFunctionForFilter.java create mode 100644 jpa/odata-jpa-processor/src/test/java/com/sap/olingo/jpa/processor/core/util/AbstractWatchDogTest.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/errormodel/MissingCardinalityAnnotation.java delete mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/errormodel/SingletonAsEntitySet.java delete mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/test_udf/UserDefinedFunctions.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AbstractGroup.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AnnotationsParent.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AnnotationsSingleton.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AssociationOneToManySource.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AssociationOneToManyTarget.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AssociationOneToOneSource.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AssociationOneToOneTarget.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/DetailSettings.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/JoinPartnerRoleRelation.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/JoinPartnerRoleRelationKey.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/LauFilter.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/LocalDateTimeConverter.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/TemporalWithValidityPeriod.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/TemporalWithValidityPeriodKey.java delete mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/TestDataConstants.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/TransientRefIgnore.java create mode 100644 jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/util/TestDataConstants.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/AbstractConverterTest.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/LocalDateTimeConverterTest.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/TransientPropertyCalculatorTwoConstructorsTest.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/TransientPropertyCalculatorWrongConstructorTest.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/UUIDToBinaryConverterTest.java create mode 100644 jpa/odata-jpa-test/src/test/java/com/sap/olingo/jpa/processor/test/UUIDToStringConverterTest.java create mode 100644 jpa/odata-jpa-vocabularies/pom.xml create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/AnnotationProvider.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/Applicability.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/JPAReferences.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataAnnotatable.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataNavigationPath.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataPathNotFoundException.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataPropertyPath.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataVocabularyReadException.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ReferenceAccess.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ReferenceList.java rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Action.java (91%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/ComplexType.java (87%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/CsdlDocument.java (95%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/CsdlDocumentReader.java (69%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/EdmxDataServices.java (89%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/EdmxReference.java (88%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/EdmxReferenceInclude.java (87%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/EnumType.java (93%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Function.java (92%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Member.java (90%) create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies/Named.java create mode 100644 jpa/odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies/ODataJPAVocabulariesException.java rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Parameter.java (93%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Property.java (97%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/ReturnType.java (93%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Schema.java (77%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/Term.java (90%) rename jpa/{odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/TypeDefinition.java (96%) create mode 100644 jpa/odata-jpa-vocabularies/src/main/resources/vocabularies-exceptions-i18n.properties create mode 100644 jpa/odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataPathNotFoundExceptionTest.java create mode 100644 jpa/odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/extension/vocabularies/ODataVocabularyReadExceptionTest.java rename jpa/{odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation/AppliesToTest.java => odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies/ApplicabilityTest.java} (69%) create mode 100644 jpa/odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies/ODataJPAVocabulariesExceptionTest.java rename jpa/{odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/TermTest.java (85%) rename jpa/{odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/TestAnnotationPOJO.java (97%) rename jpa/{odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/TestAnnotationSchema.java (85%) rename jpa/{odata-jpa-metadata/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/annotation => odata-jpa-vocabularies/src/test/java/com/sap/olingo/jpa/metadata/core/edm/mapper/vocabularies}/TestCsdlDocumentReader.java (86%) create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.OData.Aggregation.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.OData.Capabilities.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.OData.Core.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.OData.Measures.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.OData.Repeatability.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/Org.Olingo.Test.V1.xml create mode 100644 jpa/odata-jpa-vocabularies/src/test/resources/annotations/empty.xml diff --git a/.github/workflows/archetype.yml b/.github/workflows/archetype.yml index cfb5b2f00..b8e147a3d 100644 --- a/.github/workflows/archetype.yml +++ b/.github/workflows/archetype.yml @@ -20,5 +20,7 @@ jobs: java-version: ${{ matrix.java-version }} distribution: 'temurin' cache: maven - - name: Build with Maven + - name: 1. Build JPA + run: cd ./jpa && mvn clean -Dmaven.test.skip + - name: 2. Build and test archetype run: cd ./jpa-archetype && mvn clean install archetype:integration-test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7018f460d..3858fa2ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java-version: [ 8, 17, 19 ] + java-version: [ 17, 21 ] name: Build with Java ${{ matrix.java-version }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 7aa6d6328..f98b839ca 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: 'temurin' cache: maven - name: Cache SonarCloud packages @@ -37,4 +37,7 @@ jobs: 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 -Dsonar.login=${SONAR_TOKEN} + SONAR_PROJECT: ${{secrets.SONAR_PROJECT}} + SONAR_ORG: ${{secrets.SONAR_ORG}} + SONAR_URL: https://sonarcloud.io + run: cd ./jpa && mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.organization=${SONAR_ORG} -Dsonar.projectKey=${SONAR_PROJECT} -Dsonar.host.url=${SONAR_URL} -Dsonar.projectKey=SAP_olingo-jpa-processor-v4 -Dsonar.login=${SONAR_TOKEN} diff --git a/LICENSE.txt b/LICENSE.txt index f6b599de5..826b70214 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2021 SAP SE or an SAP affiliate company and olingo-jpa-processor-v4 contributors + Copyright 2016-2023 SAP SE or an SAP affiliate company and olingo-jpa-processor-v4 contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 7943f193d..fd0b6589f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ [![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/master.svg) +![GitHub last commit (develop)](https://img.shields.io/github/last-commit/SAP/OLINGO-JPA-PROCESSOR-V4/main.svg) [![GitHub release](https://img.shields.io/github/release-pre/sap/olingo-jpa-processor-v4.svg?color=orange&label=release)](https://github.com/SAP/olingo-jpa-processor-v4/releases/) +[![Project Map](https://sourcespy.com/shield.svg)](https://sourcespy.com/github/sapolingojpaprocessorv4/) -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. +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. If you want to be updated about Olingo changes subscribe to Olingo's [user mailing list](user-subscribe@olingo.apache.org). At the current state the JPA Processor provide support for: @@ -15,16 +16,28 @@ 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. -To get started make use of the [Quicks Start](/jpa-tutorial/QuickStart/QuickStart.md) tutorial. +To get started make use of the [Quicks Start](/jpa-tutorial/QuickStart/QuickStart.adoc) tutorial. The tutorials from the previous major version is still available under: [Tutorials](/jpa-tutorial/Tutorials/Introduction/Introduction.md). ## 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.9.0](https://github.com/apache/olingo-odata4). If you want to be updated about Olingo changes subscribe to Olingo's [user mailing list](user-subscribe@olingo.apache.org). +As of now, the JPA Processor has two major versions 1.1.x and 2.x.x. + +### 1.1.x + +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.9.0](https://github.com/apache/olingo-odata4). 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. +There is no father development for this major version. + +### 2.x.x + +The current version is based on [Jakarta 10](https://projects.eclipse.org/releases/jakarta-10), so [JPA 3.1.0](https://projects.eclipse.org/projects/ee4j.jpa/releases/3.1) or [Jakarta Persistence Specification](https://github.com/jakartaee/persistence), receptively and [Jakarta Servlet 6.0](https://projects.eclipse.org/projects/ee4j.servlet/releases/6.0). Test are performed using [Eclipselink 4.0.2](https://projects.eclipse.org/projects/ee4j.eclipselink/releases/4.0.2), but there is no real dependency to a JPA implementation. This versions require Java [17](https://sap.github.io/SapMachine/#download). + +The current version comes with [Olingo 4.9.0](https://github.com/apache/olingo-odata4), which does not support Jakarta. Till Olingo supports Jakarta, requests get mapped by the JPA Processor. + ## Download and Installation The JPA Processor is a collection of [Maven](https://maven.apache.org) projects. To use it you need to @@ -34,7 +47,7 @@ clone the repository, import the projects and declare a dependency to either the com.sap.olingo odata-jpa-metadata - 1.0.9 + 2.0.0 ``` @@ -44,7 +57,7 @@ Or to the complete processor: com.sap.olingo odata-jpa-processor - 1.0.9 + 2.0.0 ``` @@ -52,7 +65,6 @@ Or to the complete processor: 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. - ## Contributing If you want to report a bug or have suggestions to improve the JPA Processor, read up on our [guidelines for contributing](./CONTRIBUTING.md) to learn about our submission process, coding rules and more. @@ -63,42 +75,27 @@ We'd love all and any contributions. The flowing extensions/changes are planned: +* Support of method call at $orderby * Tenant depended metadata * Enable hooks for retrieving data * Support of $ref * ETag on $metadata * Support asynchronous requests * Parallel processing for $expand -* Overload Operations New versions will follow [Semantic Versioning](https://semver.org). ## License -Copyright (c) 2016-2022 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. +Copyright (c) 2016-2023 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 |Version|Changes|Incompatible Changes| |-- |-- |-- | -|0.2.4|- Switch to Olingo version 4.4.0
- Support of Enumeration Types
- Support of $count at $expand|Yes| -|0.2.6|- Solution for issue [#21](https://github.com/SAP/olingo-jpa-processor-v4/issues/21)
- JPA Join tables can be used e.g. for Many To Many relationship (issue [#22](https://github.com/SAP/olingo-jpa-processor-v4/issues/22)). If such relation shall be used in a filter a corresponding JPA entity is required, which can be hidden from the API using @EdmIgnore. Please be aware that in case both source and target are subtypes Eclipselink (version 2.7.1 used) may get confused when generating a subquery for filtering, see [Bug 529565](https://bugs.eclipse.org/bugs/show_bug.cgi?id=529565) | No| -|0.2.7|- Solution for issue [#29](https://github.com/SAP/olingo-jpa-processor-v4/issues/29)
- Solution for issue [#35](https://github.com/SAP/olingo-jpa-processor-v4/issues/35)
- Solution for issue [#37](https://github.com/SAP/olingo-jpa-processor-v4/issues/37)
|No| -|0.2.8|- Support of Collection Properties
- New tutorials 1.7 Suppressing Elements and 1.13 Collection Properties |No| -|0.2.9|- Support on top level server driven paging
- New tutorial 4.3 Server Driven Paging |No| -|0.2.10|- Handling of Content-Id in batch requests
- Update to Olingo 4.5.0
- Update tutorial 1.6, 3.3, 3.5 and 3.6 |No| -|0.3.1|- Support of instance based authorizations
- Solution for issue [#60](https://github.com/SAP/olingo-jpa-processor-v4/issues/60)
- Solution for issue [#49](https://github.com/SAP/olingo-jpa-processor-v4/issues/49)
- Correct typo in interface JPAODataPagingProvider
- New tutorials 2.3, 4.4 |Yes| -|0.3.2|- Lift unit tests to JUnit 5
- Correction of http return codes on empty responses |No| -|0.3.3|- Support of PUT requests on collection properties and simple primitive properties
- Update to Olingo 4.6.0
- Solution for issue [#69](https://github.com/SAP/olingo-jpa-processor-v4/issues/69)
- Solution for issue [#71](https://github.com/SAP/olingo-jpa-processor-v4/issues/71)
- Update tutorial [4.4](jpa-tutorial/Tutorials/SpecialTopics/4-4-InstanceBasedAuthorizations.md)|No -|0.3.4|- Support of $select as part of $expand
- Support of field groups
- Introduction of a request context, which includes deprecation of methods
- Etag now written into response e.g. @odata.etag when JSON was requested
- Solution for issue [#78](https://github.com/SAP/olingo-jpa-processor-v4/issues/78)
- 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
- Solution for issue [#85](https://github.com/SAP/olingo-jpa-processor-v4/issues/85)
- Usage of Olingo JSON deserializer for CUD requests
- Extension of session context, so an own Edm Name Builder can be provided|Yes| -|0.3.6|- Enable more flexible transaction handling
- Part solution for issue [#83](https://github.com/SAP/olingo-jpa-processor-v4/issues/83)
- 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
- Support of `java.time` data types. Prerequisite is the usage of JPA 2.2.
- Support of Absolute Context URL. See issue [#103](https://github.com/SAP/olingo-jpa-processor-v4/issues/103)
- Temporal data types do not longer require a Precision [#98](https://github.com/SAP/olingo-jpa-processor-v4/issues/98)
Support of MappedSuperclass|No| -|0.3.9| - Solutions for issue [#112](https://github.com/SAP/olingo-jpa-processor-v4/issues/112)
- 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
- Deprecation of ```setExternalName``` in ```IntermediateModelItemAccess```
- Solutions for issue [#134](https://github.com/SAP/olingo-jpa-processor-v4/issues/136)
- 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
- Singletons
- Entity Types without Entity Set
- Rework Request Context
- Deprecation of annotation EdmAsEntitySet |Yes| |1.0.8|- Solution for issue [#145](https://github.com/SAP/olingo-jpa-processor-v4/issues/145) |No| -|1.0.9|- Update Olingo dependency to 4.9.0
- Solutions for issues [#164](https://github.com/SAP/olingo-jpa-processor-v4/issues/164), [#155](https://github.com/SAP/olingo-jpa-processor-v4/issues/155), [#191](https://github.com/SAP/olingo-jpa-processor-v4/issues/191), [#156](https://github.com/SAP/olingo-jpa-processor-v4/issues/156)
|No| \ No newline at end of file +|1.0.9|- Update Olingo dependency to 4.9.0
- Solutions for issues [#164](https://github.com/SAP/olingo-jpa-processor-v4/issues/164), [#155](https://github.com/SAP/olingo-jpa-processor-v4/issues/155), [#191](https://github.com/SAP/olingo-jpa-processor-v4/issues/191), [#156](https://github.com/SAP/olingo-jpa-processor-v4/issues/156)
|No| +|1.1.1|- Enable action overload
- Basic support of OData annotations
- Solution of issues [#207](https://github.com/SAP/olingo-jpa-processor-v4/issues/207), [#211](https://github.com/SAP/olingo-jpa-processor-v4/issues/211), [#212](https://github.com/SAP/olingo-jpa-processor-v4/issues/212), [#213](https://github.com/SAP/olingo-jpa-processor-v4/issues/213), [#214](https://github.com/SAP/olingo-jpa-processor-v4/issues/214),[#218](https://github.com/SAP/olingo-jpa-processor-v4/issues/218)|No| +|2.0.0|- Minimum Java release now 17
- Switch to Jakarta Persistency
- Support of Spring Boot 3.x
- JPAEdmMetadataPostProcessor became an interface|Yes| diff --git a/additionalWords.directory b/additionalWords.directory new file mode 100644 index 000000000..4cb830223 --- /dev/null +++ b/additionalWords.directory @@ -0,0 +1,60 @@ +Sortable +Annotatable +Metadata +serializer +es +et +sd +edm +cb +FQN +mime +O +punit +emf +csdl +mapper +Metamodel +Etag +namespace +Rollback +em +st +Bindable +Searchable +db +Subtype +params +Wildcards +wildcard +SRID +Nullable +Timestamp +Embeddable +ct +geospatial +param +Rethrows +bupa +Inline +Http +POJO +Deserializer +postfix +filterable +selectable +api +apis +SQL +Visitable +Rethrow +Unboxed +UUID +JSON +Impl +Servlet +Jakarta +CUD +JPAO +subquery + diff --git a/jpa-archetype/odata-jpa-archetype-spring/pom.xml b/jpa-archetype/odata-jpa-archetype-spring/pom.xml index 655fa6463..755f25edd 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/pom.xml +++ b/jpa-archetype/odata-jpa-archetype-spring/pom.xml @@ -4,10 +4,11 @@ com.sap.olingo odata-jpa-archetype - 1.0.9 + 2.0.0 odata-jpa-archetype-spring - Archetype - odata-jpa-archetype-spring + Archetype - odata-jpa-archetype-spring + https://github.com/SAP/olingo-jpa-processor-v4 maven-archetype @@ -16,7 +17,7 @@ org.apache.maven.archetype archetype-packaging - 3.1.1 + 3.2.1 @@ -25,8 +26,11 @@ org.apache.maven.plugins maven-archetype-plugin 3.2.1 + + true + - + diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/pom.xml b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/pom.xml index ccb95bc42..9b6567b28 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/pom.xml +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/pom.xml @@ -1,7 +1,7 @@ - + 4.0.0 ${groupId} ${artifactId} @@ -12,15 +12,15 @@ org.springframework.boot spring-boot-starter-parent - 2.6.2 + 3.1.3 - - 1.0.9 - 1.8 - 2.7.9 - 2.2.1 + + 2.0.0 + 17 + 4.0.2 + 3.1.0 @@ -37,7 +37,7 @@ junit junit - + org.springframework.boot @@ -58,8 +58,8 @@ - org.eclipse.persistence - javax.persistence + jakarta.persistence + jakarta.persistence-api ${jpa.version} compile @@ -73,37 +73,37 @@ odata-jpa-processor ${processor.version} - - com.sap.olingo - odata-jpa-processor-cb - ${processor.version} - + + com.sap.olingo + odata-jpa-processor-cb + ${processor.version} + com.sap.olingo odata-jpa-spring-support ${processor.version} - + org.springframework.boot spring-boot-configuration-processor true + + com.h2database + h2 + 2.2.222 + runtime + org.flywaydb flyway-core - 8.4.0 - - - com.h2database - h2 - 2.1.210 - runtime - - - org.hsqldb - hsqldb - runtime - + 9.22.0 + + + org.hsqldb + hsqldb + runtime + org.springframework.boot spring-boot-devtools @@ -117,15 +117,15 @@ org.junit.jupiter junit-jupiter - 5.8.1 + 5.9.1 test org.junit.platform junit-platform-launcher - 1.8.1 + 1.9.1 test - + diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/EclipseLinkJpaConfiguration.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/EclipseLinkJpaConfiguration.java index 43a6aa5c9..083f2ab13 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/EclipseLinkJpaConfiguration.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/EclipseLinkJpaConfiguration.java @@ -8,6 +8,7 @@ import static org.eclipse.persistence.config.PersistenceUnitProperties.WEAVING; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.sql.DataSource; @@ -15,17 +16,18 @@ import org.eclipse.persistence.logging.SessionLog; import ${package}.model.EntityTemplate; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.persistenceunit.PersistenceManagedTypes; import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; import org.springframework.transaction.jta.JtaTransactionManager; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; @Configuration public class EclipseLinkJpaConfiguration extends JpaBaseConfiguration { @@ -59,15 +61,22 @@ protected Map getVendorProperties() { return jpaProperties; } - @Bean - public LocalContainerEntityManagerFactoryBean customerEntityManagerFactory( - final EntityManagerFactoryBuilder builder, @Autowired final DataSource ds) { - - return builder - .dataSource(ds) + @Override + public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder, + PersistenceManagedTypes persistenceManagedTypes) { + Map vendorProperties = getVendorProperties(); + customizeVendorProperties(vendorProperties); + return factoryBuilder + .dataSource(this.getDataSource()) + .properties(vendorProperties) + .mappingResources(getMapping()) .packages(EntityTemplate.class) - .properties(getVendorProperties()) .jta(false) .build(); } + + private String[] getMapping() { + List mappingResources = this.getProperties().getMappingResources(); + return (!ObjectUtils.isEmpty(mappingResources) ? StringUtils.toStringArray(mappingResources) : null); + } } \ No newline at end of file diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/ProcessorConfiguration.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/ProcessorConfiguration.java index 0b11836d2..c37bc7ace 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/ProcessorConfiguration.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/config/ProcessorConfiguration.java @@ -2,7 +2,7 @@ import static org.springframework.web.context.WebApplicationContext.SCOPE_REQUEST; -import javax.persistence.EntityManagerFactory; +import jakarta.persistence.EntityManagerFactory; import org.apache.olingo.commons.api.ex.ODataException; import org.apache.olingo.server.api.debug.DefaultDebugSupport; diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/controller/ODataController.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/controller/ODataController.java index 1c3940666..35c78caa2 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/controller/ODataController.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/controller/ODataController.java @@ -1,7 +1,7 @@ package ${package}.controller; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.olingo.commons.api.ex.ODataException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/EntityTemplate.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/EntityTemplate.java index 4f1d7acea..c08b9dee3 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/EntityTemplate.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/EntityTemplate.java @@ -3,16 +3,16 @@ import java.util.ArrayList; import java.util.Collection; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.SequenceGenerator; -import javax.persistence.Table; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "${entity-table}") @Table(schema = "\"${schema}\"", name = "\"${entity-table}\"") diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplate.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplate.java index 2f0d3ac4b..c9e03f9d8 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplate.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplate.java @@ -1,13 +1,13 @@ package ${package}.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; @IdClass(ValueObjectTemplateKey.class) @Entity(name = "${value-object-table}") diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplateKey.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplateKey.java index 8090c1e6c..8df40eaa1 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplateKey.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/java/model/ValueObjectTemplateKey.java @@ -2,7 +2,7 @@ import java.io.Serializable; -import javax.persistence.Id; +import jakarta.persistence.Id; public class ValueObjectTemplateKey implements Serializable { diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/resources/application-test.yml b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/resources/application-test.yml index d23a25925..ca3706a28 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/resources/application-test.yml +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/main/resources/application-test.yml @@ -2,6 +2,10 @@ logging: level: org: springframework: INFO + com: + sap: + olingo: + jpa: TRACE odata: jpa: punit_name: ${punit} diff --git a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/test/java/integrationtest/ControllerTest.java b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/test/java/integrationtest/ControllerTest.java index 453e810a8..68fc27e45 100644 --- a/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/test/java/integrationtest/ControllerTest.java +++ b/jpa-archetype/odata-jpa-archetype-spring/src/main/resources/archetype-resources/src/test/java/integrationtest/ControllerTest.java @@ -21,7 +21,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.web.context.WebApplicationContext; @@ -38,8 +37,6 @@ class ControllerTest { @Autowired private WebApplicationContext context; - @LocalServerPort - private int port; @BeforeEach void setup() { @@ -132,7 +129,7 @@ void testCreateInstanceWithBatch() throws URISyntaxException { void testCreateInstanceDeep() { given() .contentType(ContentType.JSON) - .accept(ContentType.JSON) + .accept(ContentType.JSON) .body("{ \"Data\" : \"Hello World\", \"ValueObjects\" : [{\"Id\" : \"1\"}, {\"Id\" : \"2\"}] }") .when() .post("/${punit}/v1/${entity-table}s") diff --git a/jpa-archetype/pom.xml b/jpa-archetype/pom.xml index b6d79a4a1..fca039962 100644 --- a/jpa-archetype/pom.xml +++ b/jpa-archetype/pom.xml @@ -4,14 +4,14 @@ 4.0.0 com.sap.olingo odata-jpa-archetype - 1.0.9 + 2.0.0 pom https://github.com/SAP/olingo-jpa-processor-v4 - UTF-8 - 1.8 - 1.0.9 + UTF-8 + 17 + 2.0.0 diff --git a/jpa-tutorial/Questions/HowToMakeASingleton.md b/jpa-tutorial/Questions/HowToMakeASingleton.adoc similarity index 79% rename from jpa-tutorial/Questions/HowToMakeASingleton.md rename to jpa-tutorial/Questions/HowToMakeASingleton.adoc index 94b1b9de5..24fc7f7e7 100644 --- a/jpa-tutorial/Questions/HowToMakeASingleton.md +++ b/jpa-tutorial/Questions/HowToMakeASingleton.adoc @@ -1,4 +1,4 @@ -# How to create a Singleton? += How to create a Singleton? OdataV4 offers the ability to state that an Entity Set has only one element. This is called a Singleton. @@ -6,12 +6,13 @@ We designed our service in a way that every user is represented by a Person. Now The JPA Processor provides an annotation to describe how a JPA entity should be converted: `@EdmEntityType`. In case the annotation is missing, the JPA entity is converted into an OData Entity Type and an Entity Set. To state that a singleton shall be created, two options are provided: -1. An option to trigger a generation of an OData Entity Type and a Singleton: `@EdmEntityType(as = EdmTopLevelElementRepresentation.AS_SINGLETON)` -2. An option to create a Singleton on top of an existing OData Entity Type: `@EdmEntityType(as = EdmTopLevelElementRepresentation.AS_SINGLETON_ONLY)` +. An option to trigger a generation of an OData Entity Type and a Singleton: `@EdmEntityType(as = EdmTopLevelElementRepresentation.AS_SINGLETON)` +. An option to create a Singleton on top of an existing OData Entity Type: `@EdmEntityType(as = EdmTopLevelElementRepresentation.AS_SINGLETON_ONLY)` As we want to put our singleton on top of the Person, we choose the second option and create a subclass of `Person`: -```Java +[source,java] +---- import javax.persistence.Entity; import javax.persistence.Table; @@ -25,21 +26,23 @@ import com.sap.olingo.jpa.metadata.core.edm.annotation.EdmTopLevelElementReprese public class CurrentUser extends Person { } -``` +---- As the Person can have multiple entries, there has to be a way to define how to select the correct record. As it is not possible to do this on the database by creating a view, another option is needed. `@EdmEntityType` has the parameter `extensionProvider` that takes an implementation of `EdmQueryExtensionProvider`. With this we are able to provide an JPA Expression, which is used to extend the WHERE condition to select the singleton. As a first step we add a constant to `Person` that provides the name of the attribute that we need to select the current user: -```Java +[source,java] +---- public class Person { public static final String USER_NAME_ATTRIBUTE = "userName"; -``` +---- Having done this we can use it in our implementation of `EdmQueryExtensionProvider`, which we place also in our model package: -```Java +[source,java] +---- import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.Expression; import javax.persistence.criteria.From; @@ -58,18 +61,24 @@ public class CurrentUserQueryExtension implements EdmQueryExtensionProvider { @Override public Expression getFilterExtension(final CriteriaBuilder cb, final From from) { - final String userName = (String) parameter.get(USER_NAME); + final String userName = (String) parameter.get(USER_NAME); //<1> if (userName == null) - return cb.isNull(from.get(Person.USER_NAME_ATTRIBUTE)); - return cb.equal(from.get(Person.USER_NAME_ATTRIBUTE), userName); + return cb.isNull(from.get(Person.USER_NAME_ATTRIBUTE)); //<3> + return cb.equal(from.get(Person.USER_NAME_ATTRIBUTE), userName); //<2> } } -``` +---- +<1> Getting the user name from the request parameter. +<2> Create an equal expression to select the row of the current user. +<3> As a fallback, if no user name is provided, for a row with user name null is searched. -Unfortunately we are still not done. One thing is missing. If we want ot filter on the current user, we need to know the user currently logged on. To keep it simple, we use the Authentication header for this. We have to extract the user name from the header and provide it to `CurrentUserQueryExtension`. This is done in the service configuration, in class `ProcessorConfiguration`: -```Java +Unfortunately we are still not done. One thing is missing. If we want to filter on the current user, we need to know the user currently logged on. To keep it simple, we use the Authentication header for this. We have to extract the user name from the header and make it available for `CurrentUserQueryExtension`. This is done in the service configuration, in class `ProcessorConfiguration`: + + +[source,java] +---- @Bean @Scope(scopeName = SCOPE_REQUEST) public JPAODataRequestContext requestContext(final EntityManagerFactory emf) { @@ -93,7 +102,7 @@ Unfortunately we are still not done. One thing is missing. If we want ot filter } return ""; } -``` +---- Now that we have everything together, we can start our service. First step is, to have a look at the metadata: @@ -101,18 +110,20 @@ http://localhost:9010/Trippin/v1/$metadata The Entity Container should look like this: -```XML +[source,xml] +---- - + -``` +---- +<1> Metadata of the singleton. Now we can retrieve the current user: diff --git a/jpa-tutorial/Questions/HowToUpgradeTo1.md b/jpa-tutorial/Questions/HowToUpgradeTo1.adoc similarity index 91% rename from jpa-tutorial/Questions/HowToUpgradeTo1.md rename to jpa-tutorial/Questions/HowToUpgradeTo1.adoc index 92e5bc8ad..1ed72e036 100644 --- a/jpa-tutorial/Questions/HowToUpgradeTo1.md +++ b/jpa-tutorial/Questions/HowToUpgradeTo1.adoc @@ -1,10 +1,13 @@ -# What needs to be done to come from 0.3.x to 1.x? += What needs to be done to come from 0.3.x to 1.x? +:source-highlighter: highlight.js +:highlightjs-languages: java During the implementation of release 1.0.x, beside some additional functionality, some incompatible changes where introduced. The most important change is the introduction of the Request Context in analogy to the Session Context. If we look at a Spring controller class, how it was in 0.3.9: -```Java +[source,java] +---- @RestController @RequestMapping("bp/v1/**") @RequestScope @@ -22,11 +25,12 @@ public class ODataController { handler.process(req, resp); } } -``` +---- We can see that an instance of JPAODataCRUDHandler is created. Afterward the request context is requested. The request context is filled with all the necessary information. In opposite to that in 1.x, like below in an example created with 1.0.8, the controller contains only the creation of the handler instance and the request context is injected: -```Java +[source,java] +---- @RestController @RequestMapping("bp/v1/") @RequestScope @@ -44,11 +48,12 @@ public class ODataController { new JPAODataRequestHandler(serviceContext, requestContext).process(req, resp); } } -``` +---- As the session context, the request context is created in a spring configuration: -```Java +[source,java] +---- @Bean @Scope(scopeName = SCOPE_REQUEST) public JPAODataRequestContext requestContext() { @@ -58,7 +63,7 @@ As the session context, the request context is created in a spring configuration .setDebugSupport(new DefaultDebugSupport()) .build(); } -``` +---- In case you have read the code snippets carefully, you have noticed that a class and an interface have been renamed. The former JPAODataCRUDContextAccess became JPAODataSessionContextAccess and the former JPAODataCRUDHandler is now called JPAODataRequestHandler. diff --git a/jpa-tutorial/Questions/NameBuilding.md b/jpa-tutorial/Questions/NameBuilding.adoc similarity index 80% rename from jpa-tutorial/Questions/NameBuilding.md rename to jpa-tutorial/Questions/NameBuilding.adoc index 25a9b986b..9d716ae0b 100644 --- a/jpa-tutorial/Questions/NameBuilding.md +++ b/jpa-tutorial/Questions/NameBuilding.adoc @@ -1,14 +1,15 @@ -# How to get own names for the OData artifacts? += How to get own names for the OData artifacts? The JPA Processor generates out of the JPA annotations or metadata the corresponding OData metadata. This includes also the generation of the names. By default e.g. all OData artifacts start with an upper case character and entity sets are in plural. There are multiple reasons to have another naming. E.g. different naming conventions, like properties shall be in lower case, or a noun used as entity name has no plural. Our service has an entity set _Persons_, which shall be named _People_ instead. -The names of the artifacts are created by a class implementing interface [JPAEdmNameBuilder](https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/api/JPAEdmNameBuilder.java). As mentioned, for our service, we just want to override _Persons_. For the rest we take the default names. +The names of the artifacts are created by a class implementing interface https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/odata-jpa-metadata/src/main/java/com/sap/olingo/jpa/metadata/core/edm/mapper/api/JPAEdmNameBuilder.java[JPAEdmNameBuilder]. As mentioned, for our service, we just want to override _Persons_. For the rest we take the default names. As a first step we create an implementation of `JPAEdmNameBuilder` called `APINameBuilder`. It creates an instance of `JPADefaultEdmNameBuilder` to fallback to the default names and returns `People` as entity set name for entity type `Person`: -```Java +[source,java] +---- import javax.persistence.metamodel.Attribute; import javax.persistence.metamodel.EmbeddableType; import javax.persistence.metamodel.EntityType; @@ -20,7 +21,7 @@ class APINameBuilder implements JPAEdmNameBuilder { private final JPAEdmNameBuilder defaultNameBuilder; APINameBuilder(final String punit) { - defaultNameBuilder = new JPADefaultEdmNameBuilder(punit); + defaultNameBuilder = new JPADefaultEdmNameBuilder(punit); //<1> } @Override @@ -35,7 +36,7 @@ class APINameBuilder implements JPAEdmNameBuilder { @Override public String buildEntitySetName(final String entityTypeName) { - return "Person".equals(entityTypeName) ? "People" : defaultNameBuilder.buildEntitySetName(entityTypeName); + return "Person".equals(entityTypeName) ? "People" : defaultNameBuilder.buildEntitySetName(entityTypeName); //<2> } @Override @@ -68,11 +69,15 @@ class APINameBuilder implements JPAEdmNameBuilder { return defaultNameBuilder.getNamespace(); } } -``` +---- + +<1> Create an instance of the default name builder. +<2> Override the name of the entity set for person. The second step is to hand over the name builder to the session context. The session context is created in class `ProcessorConfiguration` by method `sessionContext`. We add `.setEdmNameBuilder(new APINameBuilder(punit))`: -```Java +[source,java] +---- @Bean public JPAODataSessionContextAccess sessionContext(@Autowired final EntityManagerFactory emf) throws ODataException { @@ -81,14 +86,17 @@ The second step is to hand over the name builder to the session context. The ses .setEntityManagerFactory(emf) .setTypePackage(rootPackages) .setRequestMappingPath("Trippin/v1") - .setEdmNameBuilder(new APINameBuilder(punit)) + .setEdmNameBuilder(new APINameBuilder(punit)) //<1> .build(); } -``` +---- + +<1> Provide the name builder to the session context. Starting the service and executing http://localhost:9010/Trippin/v1/$metadata will return: -```XML +[source,XML] +---- ... @@ -97,4 +105,4 @@ Starting the service and executing http://localhost:9010/Trippin/v1/$metadata wi ... -``` +---- diff --git a/jpa-tutorial/Questions/Preparation.md b/jpa-tutorial/Questions/Preparation.adoc similarity index 95% rename from jpa-tutorial/Questions/Preparation.md rename to jpa-tutorial/Questions/Preparation.adoc index 0535f67c7..38f0b45e1 100644 --- a/jpa-tutorial/Questions/Preparation.md +++ b/jpa-tutorial/Questions/Preparation.adoc @@ -4,15 +4,16 @@ Before we go ahead we want to do some changes to the current state of the servic When you build a service step by step, it is easier for testing to have a in-memory database and use some demo data created with the migration script. Otherwise we would need to create additional migration scripts for each change we make, which does not make sense and would be a lot a work . Therefore we change `application.yml`, so that H2 in-memory is used: -```yml +[source,yml] +---- logging: level: org: - springframework: INFO + springframework: INFO com: sap: olingo: - jpa: TRACE + jpa: TRACE odata: jpa: punit_name: Trippin @@ -34,11 +35,12 @@ spring: servlet: multipart: enabled: false -``` +---- -Next we rename class `EntityTemplate` to `Person` and add a list of attributes, which let a this entity look more like a person: +Next we rename class `EntityTemplate` to `Person` and add a list of attributes, which let this entity look more like a person: -```Java +[source,java] +---- import java.util.Collection; import java.util.Objects; @@ -141,13 +143,14 @@ public class Person { } } -``` +---- Next we delete `ValueObjectTemplateKey`. The service becomes consistent after we renamed `ValueObjectTemplate` to `Trip`, clean it up and also add some new attributes: -```Java +[source,java] +---- import java.time.ZonedDateTime; import java.util.UUID; @@ -257,11 +260,12 @@ public class Trip { } } -``` +---- To get the service running again, we have to update the migration script `V1_0__jpa.sql` as well: -```SQL +[source,sql] +---- SET schema "Trippin"; CREATE SEQUENCE "TripId"; @@ -331,8 +335,7 @@ insert into "Trip" values (20, 'sandyosborn', 'a88f675d-9199-4392-9656-b08e3b46d insert into "Trip" values (21, 'ursulabright', 'a88f675d-9199-4392-9656-b08e3b46df8a', 'Study trip', 1550.3, 'This is a 2 weeks study trip', '2014-01-01T00:00:00Z', '2014-01-14T00:00:00Z'); insert into "Trip" values (22, 'genevievereeves', 'a88f675d-9199-4392-9656-b08e3b46df8a', 'Study trip', 1550.3, 'This is a 2 weeks study trip', '2014-01-01T00:00:00Z', '2014-01-14T00:00:00Z'); insert into "Trip" values (23, 'kristakemp', 'a88f675d-9199-4392-9656-b08e3b46df8a', 'Study trip', 1550.3, 'This is a 2 weeks study trip', '2014-01-01T00:00:00Z', '2014-01-14T00:00:00Z'); - -``` +---- We can start the service and perform some requests like: diff --git a/jpa-tutorial/Questions/Questions.adoc b/jpa-tutorial/Questions/Questions.adoc new file mode 100644 index 000000000..6b5432595 --- /dev/null +++ b/jpa-tutorial/Questions/Questions.adoc @@ -0,0 +1,11 @@ += Tutorials + +The tutorials are arranged along a number of questions. The example service will grow by each answer, but it should not be necessary to follow each question to understand a certain tutorial. + +Before starting, we need to xref:Preparation.adoc[prepare the next steps]. + +Having done that, we are ready to go ahead: + +. xref:HowToUpgradeTo1.adoc[What needs to be done to come from 0.3.x to 1.x?] +. xref:NameBuilding.adoc[How to get own names for the OData artifacts?] +. xref:HowToMakeASingleton.adoc[How to create a Singleton?] \ No newline at end of file diff --git a/jpa-tutorial/Questions/Questions.md b/jpa-tutorial/Questions/Questions.md deleted file mode 100644 index 8f5fe8709..000000000 --- a/jpa-tutorial/Questions/Questions.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tutorials - -The tutorials are arranged along a number of questions. The example service will grow by each answer, but it should not be necessary to follow each question to understand a certain tutorial. - -Before starting we need to perform some [preparing next steps](Preparation.md). - -Now we are ready to go ahead: - -1. [What needs to be done to come from 0.3.x to 1.x?](HowToUpgradeTo1.md) -1. [How to get own names for the OData artifacts?](NameBuilding.md) -1. [How to create a Singleton?])(HowToMakeASingleton.md) diff --git a/jpa-tutorial/Questions/WhyGeZeroNotSupported.adoc b/jpa-tutorial/Questions/WhyGeZeroNotSupported.adoc new file mode 100644 index 000000000..483accd29 --- /dev/null +++ b/jpa-tutorial/Questions/WhyGeZeroNotSupported.adoc @@ -0,0 +1,86 @@ += Why are navigation count queries using greater or equal not supported? + +In OData queries a client can make use of the $count segment within a $filter expression to limit the items returned based on the exact count of related entities at collection-valued property. + +A small example shall demonstrate this. The example uses an entity, https://github.com/SAP/olingo-jpa-processor-v4/blob/main/jpa/odata-jpa-test/src/main/java/com/sap/olingo/jpa/processor/core/testmodel/AdministrativeDivision.java[AdministrativeDivision], from the test model. AdministrativeDivisions is a hierarchy of subnational entities. + +To find all the divisions that have two sub-divisions, the following GET request can be used: +[source,url] +---- +.../AdministrativeDivisions?$filter=Children/$count eq 2 +---- +This leads to the following SQL query: +[source,sql] +---- +SELECT + DISTINCT t0."Population", + t0."Area", + t0."DivisionCode", + t0."ParentCodeID", + t0."AlternativeCode", + t0."CountryISOCode", + t0."CodePublisher", + t0."ParentDivisionCode", + t0."CodeID" + FROM "OLINGO"."AdministrativeDivision" t0 + WHERE (EXISTS ( --<1> + SELECT t1."CodePublisher" --<2> + FROM "OLINGO"."AdministrativeDivision" t1 + WHERE (((t1."CodePublisher" = t0."CodePublisher") + AND (t1."ParentCodeID" = t0."CodeID")) + AND (t1."ParentDivisionCode" = t0."DivisionCode")) + GROUP BY t1."CodePublisher", t1."ParentCodeID", t1."ParentDivisionCode" + HAVING (COUNT(t1."DivisionCode") = 2))) --<3> +---- +The rows having 2 children are those where a sub-query (2) result EXISTS (1). The restriction of the sub-query is done by a HAVING clause (3). Unfortunately this construct is not able to compare with 0. E.g. to find all leaves of the division hierarchy, lowest level of divisions, the following GET request can be used: +[source,url] +---- +.../AdministrativeDivisions?$filter=Children/$count eq 0 +---- +In case the request would be converted into the following SQL: +[source,sql] +---- +SELECT + DISTINCT t0."Population", + t0."Area", + t0."DivisionCode", + t0."ParentCodeID", + t0."AlternativeCode", + t0."CountryISOCode", + t0."CodePublisher", + t0."ParentDivisionCode", + t0."CodeID" + FROM "OLINGO"."AdministrativeDivision" t0 + WHERE (EXISTS ( + SELECT t1."CodePublisher" + FROM "OLINGO"."AdministrativeDivision" t1 + WHERE (((t1."CodePublisher" = t0."CodePublisher") + AND (t1."ParentCodeID" = t0."CodeID")) + AND (t1."ParentDivisionCode" = t0."DivisionCode")) + GROUP BY t1."CodePublisher", t1."ParentCodeID", t1."ParentDivisionCode" + HAVING (COUNT(t1."DivisionCode") = 0))) +---- +the query would not find anything, as the sub-query does not return a result. The restriction has to be converted. Instead of using EXIST is is necessary to use NOT EXIST (4) together with a comparison to not equal zero (5): +[source,sql] +---- +SELECT + DISTINCT t0."Population", + t0."Area", + t0."DivisionCode", + t0."ParentCodeID", + t0."AlternativeCode", + t0."CountryISOCode", + t0."CodePublisher", + t0."ParentDivisionCode", + t0."CodeID" + FROM "OLINGO"."AdministrativeDivision" t0 + WHERE NOT (EXISTS ( --<4> + SELECT t1."CodePublisher" + FROM "OLINGO"."AdministrativeDivision" t1 + WHERE (((t1."CodePublisher" = t0."CodePublisher") + AND (t1."ParentCodeID" = t0."CodeID")) + AND (t1."ParentDivisionCode" = t0."DivisionCode")) + GROUP BY t1."CodePublisher", t1."ParentCodeID", t1."ParentDivisionCode" + HAVING (COUNT(t1."DivisionCode") <> 0))) --<5> +---- +In case a client requests $count greater or equal 0, it would mean to create a sub-query with NOT EXISTS and a sub-query with EXISTS. This does not make sense, as in fact such a request does not restrict the result at all. \ No newline at end of file diff --git a/jpa-tutorial/QuickStart/QuickStart.md b/jpa-tutorial/QuickStart/QuickStart.adoc similarity index 51% rename from jpa-tutorial/QuickStart/QuickStart.md rename to jpa-tutorial/QuickStart/QuickStart.adoc index b87be641d..a8ae653aa 100644 --- a/jpa-tutorial/QuickStart/QuickStart.md +++ b/jpa-tutorial/QuickStart/QuickStart.adoc @@ -1,10 +1,10 @@ -# Quick Start += Quick Start This tutorial shall provide a first step to create an OData V4 service based on JPA metadata. It builds the foundation for the upcoming once. -Eclipse is used as IDE, but another IDE could be used as well. The IDE should contain Spring support like the Eclipse Plugin _Spring Tools 4_. +Eclipse is used as IDE, but another IDE could be used as well. The IDE should contain Spring support like the Eclipse Plug-in *Spring Tools 4*. -## Prerequisites +== Prerequisites In order to follow this tutorial, you should have @@ -13,119 +13,124 @@ In order to follow this tutorial, you should have * Basic knowledge about building with Maven * Optional: knowledge about Spring -## Preparation +== Preparation In order to perform the tutorial you need: -* A Java JDK 1.8 or higher +* A Java JDK 17 or higher * A Eclipse IDE for Java EE, or another one that provides the same functionality * Optional: Maven separately installed, to perform Maven commands in case the JPA Processor projects should not be imported into your IDE * Optional: Git separately installed. -## Preparing the Archetype +== Preparing the Archetype We start by cloning the repository. This can be done either via `git clone https://github.com/SAP/olingo-jpa-processor-v4` or by using your IDE: -Set default workspace +image:../images/quick-start/GitClone.png[Set default workspace, 500] Open a shell, like the Windows console, navigate to the directory the repository had been cloned to and then to `odata-jpa-archetype-spring`. Starting from the home directory this could be e.g. `cd git\olingo-jpa-processor-v4\jpa-archetype\odata-jpa-archetype-spring`. We do that to generate the archetype. This is done by execute `mvn clean install archetype:update-local-catalog`. Alternatively you can also use your IDE: -Set default workspace +image:../images/quick-start/runConfiguration.png[Run configuration, 500] In your .m2 directory there should be a file called `archetype-catalog.xml`: -![Maven Directory](../images/quick-start/m2-directory.png) +image:../images/quick-start/m2-directory.png[Maven Directory, 500] This should contain the information about archetype: -```XML +[source,xml] +---- com.sap.olingo odata-jpa-archetype-spring - 1.0.8 + 2.0.0 -``` +---- -## Creating a Project +== Creating a Project Now that we have generated the archetype, we can create a maven project. In Eclipse we can do so by performing the following steps. Choose _File -> New -> Others_ and select _Maven Project_: -![Maven Create Project](../images/quick-start/MavenCreateProject.png) +image:../images/quick-start/MavenCreateProject.png[Maven Create Project, 500] + Then we have to choose the workspace. Choose _Use default Workspace location_: -Set default workspace +image:../images/quick-start/MavenNewProject.png[Maven New Project, 500] Next choose the archetype _odata-jpa-archetype-spring_. You can use _com.sap.olingo_ as filter: -Choose archetype + +image:../images/quick-start/MavenSelectArchetype.png[Maven Select Archetype, 500] As a last step some parameter have to be provided: -|Parameter Name|Value| -|-- |-- | -|Group Id|com.example| -|Artifact Id|trippin| -|punit|Trippin| -|schema|Trippin| -|entity-table|Person| -|value-object-table|Trip| +[options="header"] +|=== +|Parameter Name |Value +//------------- +|Group Id|com.example +|Artifact Id|trippin +|punit|Trippin +|schema|Trippin +|entity-table|Person +|value-object-table|Trip +|=== -Set parameter archetype +image:../images/quick-start/MavenSetParameterArchetype.png[Set parameter archetype, 500] After _Finish_ was pressed a project gets created: -![Maven Project](../images/quick-start/Project.png) +image:../images/quick-start/Project.png[Maven Project, 600] -## Test the Service +== Test the Service -1. The project contains already some integration tests, which we can execute. The test base on [REST Assured](https://github.com/rest-assured/). They are located under `src/test/java` in package `com.exmple.trippin.integrationtest`. Right click on the project: _Run As -> JUnit Test_. -2. The service can be started. Right click on the project: _Run As -> Spring Boot App_. In the favoured browser you should be able to execute e.g. one of the following requests: +. The project contains already some integration tests, which we can execute. The test base on [REST Assured](https://github.com/rest-assured/). They are located under `src/test/java` in package `com.exmple.trippin.integrationtest`. Right click on the project: _Run As -> JUnit Test_. +. The service can be started. Right click on the project: _Run As -> Spring Boot App_. In the favoured browser you should be able to execute e.g. one of the following requests: * http://localhost:9010/Trippin/v1/ * http://localhost:9010/Trippin/v1/$metadata * http://localhost:9010/Trippin/v1/Persons -3. We can create entities either using `curl` command or a rest tool like [Apache JMeterâ„¢](https://jmeter.apache.org), [Postman](https://www.postman.com) or a browser plugin. +. We can create entities either using `curl` command or a rest tool like https://jmeter.apache.org[Apache JMeterâ„¢], https://www.postman.com[Postman] or a browser plugin. * Curl: - ```curl -X POST http://localhost:9010/Trippin/v1/Persons -H "Content-Type:application/json" -d "{\"Data\" : \"Hallo Welt\"}"``` + curl -X POST http://localhost:9010/Trippin/v1/Persons -H "Content-Type:application/json" -d "{\"Data\" : \"Hallo Welt\"}" + * Rest tool: URL: http://localhost:9010/Trippin/v1/Persons + Header: Content-Type:application/json - ```JSON { "Data " : "Hallo Welt "} - ``` + - The result can be checked the by executing http://localhost:9010/Trippin/v1/Persons?$format=json +The result can be checked the by executing http://localhost:9010/Trippin/v1/Persons?$format=json -## Explanation +== Explanation -### Dependencies +=== Dependencies -Looking at the `pom.xml` file we see that the latest version (which is available when the tutorial was written) of [H2 Database](https://github.com/h2database/h2database) shall be used, which requires a later version of [Flyway](https://github.com/flyway/flyway) as well. +Looking at the `pom.xml` file we see that the latest version (which is available when the tutorial was written) of +https://github.com/h2database/h2database[H2 Database] shall be used, which requires a later version of +https://github.com/flyway/flyway[Flyway] as well. To use the JPA Processor the following dependency is all that is required: -```XML +[source,xml] +---- com.sap.olingo odata-jpa-processor ${processor.version} - ``` +---- * _odata-jpa-processor_ comes with a dependency to _odata-jpa-metadata_. The later one is responsible to convert the JPA annotations into OData metadata. The first one provides the necessary code to handle data requests like queries or changes. _odata-jpa-metadata_ can be used stand alone, if the request handling should be done differently. @@ -133,31 +138,42 @@ The other JPA Processor dependencies are **optional**: * _odata-jpa-spring-support_ contains a small set of parameter to be used in the Spring `application.yml`. * _odata-jpa-processor-cb_ contains an enhancement of JPAs Criteria Builder interface, which allows the JPA Processor to use window function ROW_NUMBER and LIMIT/OFFSET in sub queries. Two things have to be pointed out: - 1. This part is still in a beta state. - 2. Not all databases support ROW_NUMBER with OVER (PARTITION BY ...) + . This part is still in a beta state. + . Not all databases support ROW_NUMBER with OVER (PARTITION BY ...) -### Configuration +=== Configuration -JPA Processor need to be customized to work properly. Package `com.example.trippin.config` contains two classes that provide this information. The first is `EclipseLinkJpaConfiguration`, which is needed to make use of [Eclipselink](http://www.eclipse.org/eclipselink/). For our service the most important part is in method `customerEntityManagerFactory`. Here we provide with `.packages(EntityTemplate.class)` a reference to a package that contains the JPA entities and so defines our persistence-unit. +JPA Processor need to be customized to work properly. Package `com.example.trippin.config` contains two classes that provide this information. The first is `EclipseLinkJpaConfiguration`, +which is needed to make use of http://www.eclipse.org/eclipselink/[Eclipselink]. For our service the most important part is in method `entityManagerFactory`. Here we provide with `.packages(EntityTemplate.class)` a reference to a package that contains the JPA entities and so defines our persistence-unit. The second one is `ProcessorConfiguration`. It has two methods. The first one creates a service context, which should be valid for the live time of the service: -```Java - @Bean - public JPAODataSessionContextAccess sessionContext(@Autowired final EntityManagerFactory emf) throws ODataException { - - return JPAODataServiceContext.with() - .setPUnit(punit) - .setEntityManagerFactory(emf) - .setTypePackage(rootPackages) - .setRequestMappingPath("Trippin/v1") - .build(); - } -``` - -With _punit_, the persistence-unit name, we define the _Namespace_ of the service. It can be found in the metadata, after executing http://localhost:9010/Trippin/v1/$metadata: - -```XML +[source,java] +---- +@Bean +public JPAODataSessionContextAccess sessionContext(@Autowired final EntityManagerFactory emf) + throws ODataException { + + return JPAODataServiceContext.with() + .setPUnit(punit) //<1> + .setEntityManagerFactory(emf) + .setTypePackage(rootPackages) //<2> + .setRequestMappingPath("Trippin/v1") //<3> + .build(); +} +---- + +<1> With _punit_, the persistence-unit name, we define the _Namespace_ of the service. + +<2> The same source has the name of the _rootPackage_, which is needed once we want to build Java based Functions and Actions. + +<3> The _RequestMappingPath_ is needed by Olingo in case a service uses Spring. + +[NOTE] +==== +The namepsace can be found in the metadata, after executing http://localhost:9010/Trippin/v1/$metadata: +[source,xml] +---- @@ -165,50 +181,59 @@ With _punit_, the persistence-unit name, we define the _Namespace_ of the servic -``` +---- +==== -You can see that the persistence-unit name is injected from the `application.yml` that is located in `/src/main/resources/`. The same source has the name of the _rootPackage_, which is needed once we want to build Java based Functions and Actions. The _RequestMappingPath_ is needed by Olingo in case a service bases uses Spring. +[NOTE] +==== +The persistence-unit name is injected from the `application.yml` that is located in `/src/main/resources/`. -For each request a Request Context needs to be created: +==== -```Java +The second one is the creation of a request context, which is created for each request: + +[source,java] +---- @Bean @Scope(scopeName = SCOPE_REQUEST) public JPAODataRequestContext requestContext() { return JPAODataRequestContext.with() - .setCUDRequestHandler(new JPAExampleCUDRequestHandler()) - .setDebugSupport(new DefaultDebugSupport()) + .setCUDRequestHandler(new JPAExampleCUDRequestHandler()) //<1> + .setDebugSupport(new DefaultDebugSupport()) //<2> .build(); } -``` +---- + +In the beginning of a service development two instances are provided: -For a start of a service development two instances are provided: +<1> For each request that shall process changing requests an instance of a sub-class of `JPAAbstractCUDRequestHandler` must be provided. The project uses a generic implementation `JPAExampleCUDRequestHandler`, which is handy during prototyping and model development, but was not created with the intend of productive usage, especially as this is the place to implement business logic. -1. For each request that shall process changing requests an instance of a sub-class of `JPAAbstractCUDRequestHandler` must be provided. The project uses a generic implementation `JPAExampleCUDRequestHandler`, which is handy during prototyping and model development, but was not created with the intend of productive usage, especially as this is the place to implement business logic. -2. Olingo grants some insights into the request processing with the so called _Debug Support_. The JPA Process supports this as well. As our service shall provide the debug information, an instance of `DefaultDebugSupport` is provided. The debug information can be retrieved by adding `odata-debug=html` or `odata-debug=json` to the query. E.g.: http://localhost:9010/Trippin/v1/Persons?odata-debug=html +<2> Olingo grants some insights into the request processing with the so called _Debug Support_. The JPA Process supports this as well. As our service shall provide the debug information, an instance of `DefaultDebugSupport` is provided. The debug information can be retrieved by adding `odata-debug=html` or `odata-debug=json` to the query. E.g.: http://localhost:9010/Trippin/v1/Persons?odata-debug=html -### Controller +=== Controller The Spring controller implementation in _com.example.trippin.controller_ is simple. It just creates a `JPAODataRequestHandler` instance and triggers the processing. -```Java +[source,java] +---- @RequestMapping(value = "**", method = { RequestMethod.GET, RequestMethod.PATCH, RequestMethod.POST, RequestMethod.DELETE }) public void crud(final HttpServletRequest req, final HttpServletResponse resp) throws ODataException { new JPAODataRequestHandler(serviceContext, requestContext).process(req, resp); } -``` +---- -### Model +=== Model The model is located in `com.example.trippin.model`. It contains as of now only two entities: _Person_ in `EntityTemplate` and _Trip_ in `ValueObjectTemplate`. -## Next steps +== Next steps -To learn more about the options the JPA Processor provides a growing set of [tutorials](../Questions/Questions.md) is provided. +To learn more about the options the JPA Processor provides a growing set of +xref:../Questions/Questions.adoc[tutorials] is provided. In addition, a set of previous tutorials exist: -[old tutorials](/jpa-tutorial/Tutorials/Introduction/Introduction.md). +xref:/jpa-tutorial/Tutorials/Introduction/Introduction.md[old tutorials]. Even so they are not always up to date, they can be helpful. diff --git a/jpa/.settings/org.eclipse.jdt.core.prefs b/jpa/.settings/org.eclipse.jdt.core.prefs index c03694331..01a729cd2 100644 --- a/jpa/.settings/org.eclipse.jdt.core.prefs +++ b/jpa/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,13 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -51,12 +55,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore @@ -72,17 +78,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/jpa/odata-jpa-annotation/.gitignore b/jpa/odata-jpa-annotation/.gitignore index 3b248b28a..bcb74aa8a 100644 --- a/jpa/odata-jpa-annotation/.gitignore +++ b/jpa/odata-jpa-annotation/.gitignore @@ -4,7 +4,4 @@ target/ # JDT-specific (Eclipse Java Development Tools) .classpath -# --- EclipseIDE stuff START -.settings/ -.metadata /.sts4-cache/ diff --git a/jpa/odata-jpa-annotation/.settings/org.eclipse.core.resources.prefs b/jpa/odata-jpa-annotation/.settings/org.eclipse.core.resources.prefs index 654c1750c..4c28b1a89 100644 --- a/jpa/odata-jpa-annotation/.settings/org.eclipse.core.resources.prefs +++ b/jpa/odata-jpa-annotation/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,4 @@ eclipse.preferences.version=1 encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 encoding/=UTF-8 diff --git a/jpa/odata-jpa-annotation/.settings/org.eclipse.jdt.core.prefs b/jpa/odata-jpa-annotation/.settings/org.eclipse.jdt.core.prefs index a9e7a4212..94ac14d17 100644 --- a/jpa/odata-jpa-annotation/.settings/org.eclipse.jdt.core.prefs +++ b/jpa/odata-jpa-annotation/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error @@ -9,4 +9,4 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=17 diff --git a/jpa/odata-jpa-annotation/.settings/org.eclipse.wst.common.project.facet.core.xml b/jpa/odata-jpa-annotation/.settings/org.eclipse.wst.common.project.facet.core.xml index ee260d978..babef879f 100644 --- a/jpa/odata-jpa-annotation/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/jpa/odata-jpa-annotation/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,5 +1,5 @@ - + diff --git a/jpa/odata-jpa-annotation/pom.xml b/jpa/odata-jpa-annotation/pom.xml index cd828d1ee..9f208e5c9 100644 --- a/jpa/odata-jpa-annotation/pom.xml +++ b/jpa/odata-jpa-annotation/pom.xml @@ -1,10 +1,13 @@ - + 4.0.0 com.sap.olingo - odata-jpa - 1.0.9 + odata-jpa + 2.0.0 odata-jpa-annotation odata-jpa-annotation @@ -17,8 +20,8 @@ ${odata.version} - org.eclipse.persistence - javax.persistence + jakarta.persistence + jakarta.persistence-api ${jpa.version} @@ -30,19 +33,19 @@ org.junit.jupiter junit-jupiter - 5.8.1 + ${junit.version} test org.junit.platform junit-platform-launcher - 1.8.1 + ${junit-platform.version} test org.mockito mockito-core - 3.6.0 + ${mockito.version} test diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/OffsetDateTimeConverter.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/OffsetDateTimeConverter.java index e72140125..f4c8a5235 100644 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/OffsetDateTimeConverter.java +++ b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/OffsetDateTimeConverter.java @@ -3,8 +3,8 @@ import java.time.OffsetDateTime; import java.time.ZonedDateTime; -import javax.persistence.AttributeConverter; -import javax.persistence.Converter; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Converter; /** * Default converter to convert from {@link java.time.OffsetDateTime} to {@link java.time.ZonedDateTime}. This is diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/TimeInstantLongConverter.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/TimeInstantLongConverter.java index 54ee93415..130764507 100644 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/TimeInstantLongConverter.java +++ b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/converter/TimeInstantLongConverter.java @@ -2,8 +2,8 @@ import java.time.Instant; -import javax.persistence.AttributeConverter; -import javax.persistence.Converter; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Converter; /** * Default converter to convert from {@link Long} to {@link java.time.Instant}. diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAction.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAction.java index 81c2fdddc..f9860a54a 100644 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAction.java +++ b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAction.java @@ -10,7 +10,8 @@ /** * Metadata of an action, see - * edm:Action.

+ * edm:Action. + *

* @author Oliver Grande * */ @@ -32,13 +33,29 @@ ReturnType returnType() default @ReturnType(); /** - * Indicates that the action is bound. Default is false.

- * Unbound actions are invoked through an action import. Bound actions are invoked by appending a segment containing + * Indicates that the action is bound. Default is false. + *

+ * Unbound actions are invoked through an action import. Bound actions are invoked by appending a segment + * containing * the qualified action name to a segment of the appropriate binding parameter type within the resource path. * For details see: * OData Version 4.0 Part 3 - 12.1.2 Attribute IsBound

+ * />OData Version 4.0 Part 3 - 12.1.2 Attribute IsBound. + *

+ * In case the action is bound, the method implementing action needs at least on parameter. The first parameter + * is taken as binding parameter. A bound action can be overloaded. Only the binding parameter shall differ. See also: + * OData Version 4.01 CSDl JSON - 12.2 Action Overloads and + * + * OData Version 4.01 Part 1 - 11.5.5.2 Action Overload Resolution. + * The processor has to create an instance of the corresponding JPA entity and needs to provide the key attributes. + * * The instance is created using {@link com.sap.olingo.jpa.processor.core.processor.JPAInstanceCreator}. The + * requirements are described there. It is not verified if the instance of the bound entity exists. + *

* @return */ boolean isBound() default false; @@ -50,7 +67,8 @@ * See: * OData Version 4.0 Part 3 - 12.1.3 Attribute EntitySetPath

+ * />OData Version 4.0 Part 3 - 12.1.3 Attribute EntitySetPath + *

* @return */ String entitySetPath() default ""; diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAsEntitySet.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAsEntitySet.java deleted file mode 100644 index 9aac176fa..000000000 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmAsEntitySet.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.sap.olingo.jpa.metadata.core.edm.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Allows to mark an jpa entity as an additional entity set of another entity type. - * This is only allowed for leafs in an inheritance hierarchy. The jpa entity must not have own columns

- * OData Version 4.0 Part 3 - 13 Entity Container Example 30 - * @deprecated (since 1.0.3, replace with {@link EdmEntityType}, deleted with 1.1.0 ) - */ -@Deprecated -@Target({ ElementType.TYPE }) -@Retention(value = RetentionPolicy.RUNTIME) -public @interface EdmAsEntitySet { - -} diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEntityType.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEntityType.java index 32fef8435..02b1ba26a 100644 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEntityType.java +++ b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEntityType.java @@ -29,9 +29,10 @@ /** * Query Extension Provider provides a set to methods to extend or influence the generated query. This may be from * interest in case a subset of records shall be represented by an Entity Set or Singleton and it is not possible to - * use a database view.

+ * use a database view. + *

* - * A Query Extension Provider are inherited. One that is given at a sub type overrides one that is given at the super + * Query Extension Provider are inherited. One that is given at a sub type overrides one that is given at the super * type or base type. */ Class extensionProvider() default EdmQueryExtensionProvider.class; diff --git a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEnumeration.java b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEnumeration.java index a611c4542..e4b84f63d 100644 --- a/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEnumeration.java +++ b/jpa/odata-jpa-annotation/src/main/java/com/sap/olingo/jpa/metadata/core/edm/annotation/EdmEnumeration.java @@ -6,13 +6,14 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.persistence.AttributeConverter; -import javax.persistence.Enumerated; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Enumerated; /** * Annotation to tag Java enumerations that shall be provided via an OData service. For details about OData Enumerations * see: 10 + * href= + * "http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752565">10 * Enumeration Type. * The following conversion rule have been established: *