You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/02/09 17:20:37 UTC
[3/3] syncope git commit: [SYNCOPE-620] Oracle
[SYNCOPE-620] Oracle
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/cc74bb6c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/cc74bb6c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/cc74bb6c
Branch: refs/heads/2_0_X
Commit: cc74bb6c445b91a08e47e8c05fe1f1481db32901
Parents: 40892e1
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Feb 9 17:20:25 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Feb 9 17:20:25 2015 +0100
----------------------------------------------------------------------
syncope620/fit/server-reference/pom.xml | 33 ++
.../src/main/resources/oracle/META-INF/orm.xml | 323 +++++++++++++++++++
.../resources/oracle/persistence.properties | 29 ++
.../main/resources/sqlserver/META-INF/orm.xml | 36 ---
4 files changed, 385 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/cc74bb6c/syncope620/fit/server-reference/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/pom.xml b/syncope620/fit/server-reference/pom.xml
index b10f292..2b99939 100644
--- a/syncope620/fit/server-reference/pom.xml
+++ b/syncope620/fit/server-reference/pom.xml
@@ -449,6 +449,39 @@ under the License.
</profile>
<profile>
+ <id>oracle-it</id>
+
+ <properties>
+ <jdbcdriver.groupId>com.oracle</jdbcdriver.groupId>
+ <jdbcdriver.artifactId>ojdbc6</jdbcdriver.artifactId>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc6</artifactId>
+ <version>11.1.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>clean verify</defaultGoal>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>src/main/resources/oracle</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+ </profile>
+
+ <profile>
<id>sqlserver-it</id>
<properties>
http://git-wip-us.apache.org/repos/asf/syncope/blob/cc74bb6c/syncope620/fit/server-reference/src/main/resources/oracle/META-INF/orm.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/resources/oracle/META-INF/orm.xml b/syncope620/fit/server-reference/src/main/resources/oracle/META-INF/orm.xml
new file mode 100644
index 0000000..14680ff
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/resources/oracle/META-INF/orm.xml
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
+ http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
+ version="2.0">
+
+ <persistence-unit-metadata>
+ <persistence-unit-defaults>
+ <entity-listeners>
+ <entity-listener class="org.apache.syncope.server.persistence.jpa.validation.entity.EntityValidationListener">
+ <pre-persist method-name="validate"/>
+ <pre-update method-name="validate"/>
+ </entity-listener>
+ </entity-listeners>
+ </persistence-unit-defaults>
+ </persistence-unit-metadata>
+
+ <table-generator name="SEQ_UPlainAttrValue" pk-column-value="SEQ_UPlainAttrValue" initial-value="100"/>
+ <table-generator name="SEQ_RPlainAttrValue" pk-column-value="SEQ_RPlainAttrValue" initial-value="100"/>
+ <table-generator name="SEQ_MAttrPlainValue" pk-column-value="SEQ_MAttrPlainValue" initial-value="100"/>
+ <table-generator name="SEQ_CAttrPlainValue" pk-column-value="SEQ_CAttrPlainValue" initial-value="100"/>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUser">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_User" strategy="TABLE"/>
+ <table-generator name="SEQ_User" pk-column-value="SEQ_User" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARole">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Role" strategy="TABLE"/>
+ <table-generator name="SEQ_Role" pk-column-value="SEQ_Role" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.membership.JPAMembership">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Membership" strategy="TABLE"/>
+ <table-generator name="SEQ_Membership" pk-column-value="SEQ_Membership" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUMapping">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_UMapping" strategy="TABLE"/>
+ <table-generator name="SEQ_UMapping" pk-column-value="SEQ_UMapping" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARMapping">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RMapping" strategy="TABLE"/>
+ <table-generator name="SEQ_RMapping" pk-column-value="SEQ_RMapping" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUMappingItem">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_UMappingItem" strategy="TABLE"/>
+ <table-generator name="SEQ_UMappingItem" pk-column-value="SEQ_UMappingItem" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARMappingItem">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RMappingItem" strategy="TABLE"/>
+ <table-generator name="SEQ_RMappingItem" pk-column-value="SEQ_RMappingItem" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPAConnInstance">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_ConnInstance" strategy="TABLE"/>
+ <table-generator name="SEQ_ConnInstance" pk-column-value="SEQ_ConnInstance" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUPlainAttr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_UPlainAttr" strategy="TABLE"/>
+ <table-generator name="SEQ_UPlainAttr" pk-column-value="SEQ_UPlainAttr" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARPlainAttr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RPlainAttr" strategy="TABLE"/>
+ <table-generator name="SEQ_RPlainAttr" pk-column-value="SEQ_RPlainAttr" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARPlainAttrTemplate">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RPlainAttrTemplate" strategy="TABLE"/>
+ <table-generator name="SEQ_RPlainAttrTemplate" pk-column-value="SEQ_RPlainAttrTemplate" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.membership.JPAMPlainAttr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_MPlainAttr" strategy="TABLE"/>
+ <table-generator name="SEQ_MPlainAttr" pk-column-value="SEQ_MPlainAttr" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.membership.JPAMPlainAttrTemplate">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_MPlainAttrTemplate" strategy="TABLE"/>
+ <table-generator name="SEQ_MPlainAttrTemplate" pk-column-value="SEQ_MPlainAttrTemplate" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.conf.JPACPlainAttr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_CAttrPlain" strategy="TABLE"/>
+ <table-generator name="SEQ_CAttrPlain" pk-column-value="SEQ_CAttrPlain" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUPlainAttrValue">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_UPlainAttrValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.user.JPAUPlainAttrUniqueValue">
+ <table>
+ <unique-constraint>
+ <column-name>booleanValue</column-name>
+ <column-name>dateValue</column-name>
+ <column-name>stringValue</column-name>
+ <column-name>doubleValue</column-name>
+ <column-name>longValue</column-name>
+ <column-name>schema_name</column-name>
+ </unique-constraint>
+ </table>
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_UPlainAttrValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARPlainAttrValue">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RPlainAttrValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.role.JPARPlainAttrUniqueValue">
+ <table>
+ <unique-constraint>
+ <column-name>booleanValue</column-name>
+ <column-name>dateValue</column-name>
+ <column-name>stringValue</column-name>
+ <column-name>doubleValue</column-name>
+ <column-name>longValue</column-name>
+ <column-name>schema_name</column-name>
+ </unique-constraint>
+ </table>
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_RPlainAttrValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.membership.JPAMPlainAttrValue">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_MAttrPlainValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.membership.JPAMPlainAttrUniqueValue">
+ <table>
+ <unique-constraint>
+ <column-name>booleanValue</column-name>
+ <column-name>dateValue</column-name>
+ <column-name>stringValue</column-name>
+ <column-name>doubleValue</column-name>
+ <column-name>longValue</column-name>
+ <column-name>schema_name</column-name>
+ </unique-constraint>
+ </table>
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_MAttrPlainValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.conf.JPACPlainAttrValue">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_CAttrPlainValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.conf.JPACPlainAttrUniqueValue">
+ <table>
+ <unique-constraint>
+ <column-name>booleanValue</column-name>
+ <column-name>dateValue</column-name>
+ <column-name>stringValue</column-name>
+ <column-name>doubleValue</column-name>
+ <column-name>longValue</column-name>
+ <column-name>schema_name</column-name>
+ </unique-constraint>
+ </table>
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_CAttrPlainValue" strategy="TABLE"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.task.JPATask">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Task" strategy="TABLE"/>
+ <table-generator name="SEQ_Task" pk-column-value="SEQ_Task" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.task.JPATaskExec">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_TaskExec" strategy="TABLE"/>
+ <table-generator name="SEQ_TaskExec" pk-column-value="SEQ_TaskExec" initial-value="10"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPAPolicy">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Policy" strategy="TABLE"/>
+ <table-generator name="SEQ_Policy" pk-column-value="SEQ_Policy" initial-value="1000"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPAReport">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Report" strategy="TABLE"/>
+ <table-generator name="SEQ_Report" pk-column-value="SEQ_Report" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPAReportExec">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_ReportExec" strategy="TABLE"/>
+ <table-generator name="SEQ_ReportExec" pk-column-value="SEQ_ReportExec" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPAReportletConfInstance">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_ReportletConfInstance" strategy="TABLE"/>
+ <table-generator name="SEQ_ReportletConfInstance" pk-column-value="SEQ_ReportletConfInstance" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPANotification">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_Notification" strategy="TABLE"/>
+ <table-generator name="SEQ_Notification" pk-column-value="SEQ_Notification" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+ <entity class="org.apache.syncope.server.persistence.jpa.entity.JPASecurityQuestion">
+ <attributes>
+ <id name="id">
+ <generated-value generator="SEQ_SecurityQuestion" strategy="TABLE"/>
+ <table-generator name="SEQ_SecurityQuestion" pk-column-value="SEQ_SecurityQuestion" initial-value="100"/>
+ </id>
+ </attributes>
+ </entity>
+</entity-mappings>
http://git-wip-us.apache.org/repos/asf/syncope/blob/cc74bb6c/syncope620/fit/server-reference/src/main/resources/oracle/persistence.properties
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/resources/oracle/persistence.properties b/syncope620/fit/server-reference/src/main/resources/oracle/persistence.properties
new file mode 100644
index 0000000..e00c498
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/resources/oracle/persistence.properties
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+content.directory=${conf.directory}
+jpa.driverClassName=oracle.jdbc.OracleDriver
+jpa.url=jdbc:oracle:thin:@pioppo:1521:orcl
+jpa.username=syncope
+jpa.password=syncope
+jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionary
+jpa.pool.validationQuery=SELECT 1 FROM DUAL
+#note: other connection pool settings can also be configured here, see persistenceContext.xml
+quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
+quartz.scheduler.idleWaitTime=5000
+quartz.sql=tables_oracle.sql
+audit.sql=audit_oracle.sql
+database.schema=SYNCOPE
http://git-wip-us.apache.org/repos/asf/syncope/blob/cc74bb6c/syncope620/fit/server-reference/src/main/resources/sqlserver/META-INF/orm.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/resources/sqlserver/META-INF/orm.xml b/syncope620/fit/server-reference/src/main/resources/sqlserver/META-INF/orm.xml
index c1e154a..14680ff 100644
--- a/syncope620/fit/server-reference/src/main/resources/sqlserver/META-INF/orm.xml
+++ b/syncope620/fit/server-reference/src/main/resources/sqlserver/META-INF/orm.xml
@@ -192,21 +192,9 @@ under the License.
<table>
<unique-constraint>
<column-name>booleanValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>dateValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>stringValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>doubleValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>longValue</column-name>
<column-name>schema_name</column-name>
</unique-constraint>
@@ -228,21 +216,9 @@ under the License.
<table>
<unique-constraint>
<column-name>booleanValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>dateValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>stringValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>doubleValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>longValue</column-name>
<column-name>schema_name</column-name>
</unique-constraint>
@@ -264,21 +240,9 @@ under the License.
<table>
<unique-constraint>
<column-name>booleanValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>dateValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>stringValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>doubleValue</column-name>
- <column-name>schema_name</column-name>
- </unique-constraint>
- <unique-constraint>
<column-name>longValue</column-name>
<column-name>schema_name</column-name>
</unique-constraint>