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 2013/11/13 13:05:39 UTC
svn commit: r1541487 - in /syncope/trunk/core/src:
main/java/org/apache/syncope/core/persistence/beans/
main/resources/META-INF/ test/java/org/apache/syncope/core/persistence/dao/
test/java/org/apache/syncope/core/rest/ test/resources/
Author: ilgrosso
Date: Wed Nov 13 12:05:38 2013
New Revision: 1541487
URL: http://svn.apache.org/r1541487
Log:
[SYNCOPE-437] Reworked the patch a bit for trunk, then applied, thanks
Modified:
syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Notification.java
syncope/trunk/core/src/main/resources/META-INF/orm.xml
syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle
syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver
syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
syncope/trunk/core/src/test/resources/content.xml
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Notification.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Notification.java?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Notification.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Notification.java Wed Nov 13 12:05:38 2013
@@ -28,8 +28,6 @@ import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.validation.constraints.Max;
@@ -49,7 +47,6 @@ public class Notification extends Abstra
private static final long serialVersionUID = 3112582296912757537L;
@Id
- @GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ElementCollection(fetch = FetchType.EAGER)
Modified: syncope/trunk/core/src/main/resources/META-INF/orm.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/META-INF/orm.xml?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/META-INF/orm.xml (original)
+++ syncope/trunk/core/src/main/resources/META-INF/orm.xml Wed Nov 13 12:05:38 2013
@@ -291,4 +291,12 @@ under the License.
</id>
</attributes>
</entity>
+ <entity class="org.apache.syncope.core.persistence.beans.Notification">
+ <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-mappings>
Modified: syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle (original)
+++ syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle Wed Nov 13 12:05:38 2013
@@ -256,4 +256,12 @@ under the License.
</id>
</attributes>
</entity>
+ <entity class="org.apache.syncope.core.persistence.beans.Notification">
+ <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-mappings>
Modified: syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver (original)
+++ syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver Wed Nov 13 12:05:38 2013
@@ -280,4 +280,12 @@ under the License.
</id>
</attributes>
</entity>
+ <entity class="org.apache.syncope.core.persistence.beans.Notification">
+ <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-mappings>
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java Wed Nov 13 12:05:38 2013
@@ -47,7 +47,7 @@ public class NotificationTest extends Ab
@Test
public void find() {
- Notification notification = notificationDAO.find(100L);
+ Notification notification = notificationDAO.find(1L);
assertNotNull(notification);
assertNotNull(notification.getEvents());
assertFalse(notification.getEvents().isEmpty());
@@ -134,7 +134,7 @@ public class NotificationTest extends Ab
@Test
public void delete() {
- notificationDAO.delete(100L);
- assertNull(notificationDAO.find(100L));
+ notificationDAO.delete(1L);
+ assertNull(notificationDAO.find(1L));
}
}
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java Wed Nov 13 12:05:38 2013
@@ -70,7 +70,7 @@ public class NotificationTestITCase exte
@Test
public void read() {
- NotificationTO notificationTO = notificationService.read(100L);
+ NotificationTO notificationTO = notificationService.read(1L);
assertNotNull(notificationTO);
}
@@ -105,7 +105,7 @@ public class NotificationTestITCase exte
@Test
public void update() {
- NotificationTO notificationTO = notificationService.read(100L);
+ NotificationTO notificationTO = notificationService.read(1L);
assertNotNull(notificationTO);
notificationTO.setRecipients(NodeCond.getLeafCond(new MembershipCond()));
Modified: syncope/trunk/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/content.xml?rev=1541487&r1=1541486&r2=1541487&view=diff
==============================================================================
--- syncope/trunk/core/src/test/resources/content.xml (original)
+++ syncope/trunk/core/src/test/resources/content.xml Wed Nov 13 12:05:38 2013
@@ -837,12 +837,12 @@ under the License.
performCreate="0" performUpdate="1" performDelete="0" syncStatus="0" fullReconciliation="1"
jobClassName="org.apache.syncope.core.sync.impl.SyncJob"/>
- <Notification id="100" sender="test@syncope.apache.org" subject="Test subject" template="test" selfAsRecipient="0" traceLevel="ALL"
+ <Notification id="1" sender="test@syncope.apache.org" subject="Test subject" template="test" selfAsRecipient="0" traceLevel="ALL"
xmlAbout="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3EAND%3C%2Ftype%3E%0A++%3CleftNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25o%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FleftNodeCond%3E%0A++%3CrightNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25i%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FrightNodeCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
xmlRecipients="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++%3CmembershipCond%3E%0A++++%3CroleId%3E7%3C%2FroleId%3E%0A++%3C%2FmembershipCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
recipientAttrType="UserSchema" recipientAttrName="email"/>
- <Notification_events Notification_id="100" events="unexisting1"/>
- <Notification_events Notification_id="100" events="unexisting2"/>
+ <Notification_events Notification_id="1" events="unexisting1"/>
+ <Notification_events Notification_id="1" events="unexisting2"/>
<NotificationTask_recipients notificationtask_id="8" address="recipient@prova.org"/>