You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2012/05/30 22:04:17 UTC
svn commit: r1344436 -
/rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java
Author: mfranklin
Date: Wed May 30 20:04:16 2012
New Revision: 1344436
URL: http://svn.apache.org/viewvc?rev=1344436&view=rev
Log:
Updated Organization with conversion for Address (RAVE-630)
Modified:
rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java
Modified: rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java?rev=1344436&r1=1344435&r2=1344436&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java (original)
+++ rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/JpaOrganization.java Wed May 30 20:04:16 2012
@@ -19,6 +19,7 @@
package org.apache.rave.portal.model;
import org.apache.rave.persistence.BasicEntity;
+import org.apache.rave.portal.model.conversion.JpaConverter;
import javax.persistence.*;
import java.util.Date;
@@ -109,11 +110,7 @@ public class JpaOrganization implements
@Override
public void setAddress(Address address) {
- if(address instanceof JpaAddress) {
- this.address = (JpaAddress)address;
- } else {
- throw new IllegalArgumentException("Setting non JPA Entities is currently not supported");
- }
+ this.address = JpaConverter.getInstance().convert(address, Address.class);
}
@Override