This is an automated email from the ASF dual-hosted git repository.
mibo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git
The following commit(s) were added to refs/heads/master by this push:
new ed15cb5 [OLINGO-1487] made IMPLEMENTATION changeable
ed15cb5 is described below
commit ed15cb5e304e96c58625842e4cb6027b6ac9a516
Author: Manuel Blechschmidt <[email protected]>
AuthorDate: Wed Oct 14 17:05:24 2020 +0200
[OLINGO-1487] made IMPLEMENTATION changeable
---
.../odata2/jpa/processor/api/factory/ODataJPAFactory.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/factory/ODataJPAFactory.java
b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/factory/ODataJPAFactory.java
index 77da8c5..6ad4e00 100644
---
a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/factory/ODataJPAFactory.java
+++
b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/factory/ODataJPAFactory.java
@@ -39,11 +39,19 @@ package org.apache.olingo.odata2.jpa.processor.api.factory;
*/
public abstract class ODataJPAFactory {
- private static final String IMPLEMENTATION =
+ private static String IMPLEMENTATION =
"org.apache.olingo.odata2.jpa.processor.core.factory.ODataJPAFactoryImpl";
private static ODataJPAFactory factoryImpl;
/**
+ * Method sets the implementation of the ODataJPAFactory. This makes
+ * it possible to change some default implementation like JPAAccessFactory,
+ * JPQLBuilderFactory, and JPQLBuilderFactory
+ */
+ public static void setImplementation(Class<?> clazz) {
+ IMPLEMENTATION = clazz.getName();
+ }
+ /**
* Method creates a factory instance. The instance returned is singleton.
* The instance of this factory can be used for creating other factory
* implementations.