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 2011/08/10 02:18:19 UTC
svn commit: r1155978 [1/3] - in /incubator/rave/trunk:
rave-commons/src/main/java/org/apache/rave/util/
rave-commons/src/test/java/org/apache/rave/util/ rave-portal/ rave-shindig/
rave-shindig/src/main/java/org/apache/rave/gadgets/ rave-shindig/src/mai...
Author: mfranklin
Date: Wed Aug 10 00:18:18 2011
New Revision: 1155978
URL: http://svn.apache.org/viewvc?rev=1155978&view=rev
Log:
Implemented initial Person related entities and basic service operations (Supports RAVE-122)
Added:
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/gadgets/
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Account.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Address.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/BodyType.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Group.java
- copied, changed from r1153537, incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/GroupDb.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Name.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Organization.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Person.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/PersonAssociation.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/PersonProperty.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Url.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/repository/impl/
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/service/impl/FieldRestrictingPerson.java
incubator/rave/trunk/rave-shindig/src/main/resources/modules-context.xml
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java
incubator/rave/trunk/rave-shindig/src/test/resources/spring-test.xml
incubator/rave/trunk/rave-shindig/src/test/resources/test_data.sql
Removed:
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/jdbc/
incubator/rave/trunk/rave-shindig/src/main/resources/META-INF/orm.xml
Modified:
incubator/rave/trunk/rave-commons/src/main/java/org/apache/rave/util/CollectionUtils.java
incubator/rave/trunk/rave-commons/src/test/java/org/apache/rave/util/CollectionUtilsTest.java
incubator/rave/trunk/rave-portal/pom.xml
incubator/rave/trunk/rave-shindig/pom.xml
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/inject/GuiceBindingSpringContextLoaderListener.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/os/JPAOpenSocialModule.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/os/SocialApiGuiceModule.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/spi/PersonServiceDb.java
incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/spi/SPIUtils.java
incubator/rave/trunk/rave-shindig/src/main/resources/META-INF/persistence.xml
incubator/rave/trunk/rave-shindig/src/main/resources/spring-context.xml
incubator/rave/trunk/rave-shindig/src/main/webapp/WEB-INF/web.xml
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/inject/GuiceBindingSprigContextLoaderListenerTest.java
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/inject/SpringBindingModuleTest.java
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/shindig/gadgets/oauth/service/impl/ConsumerStoreServiceDbImplTest.java
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/shindig/gadgets/oauth/service/impl/TokenInfoServiceDbImplTest.java
incubator/rave/trunk/rave-shindig/src/test/java/org/apache/shindig/social/opensocial/jpa/spi/PersonServiceDbTest.java
Modified: incubator/rave/trunk/rave-commons/src/main/java/org/apache/rave/util/CollectionUtils.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-commons/src/main/java/org/apache/rave/util/CollectionUtils.java?rev=1155978&r1=1155977&r2=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-commons/src/main/java/org/apache/rave/util/CollectionUtils.java (original)
+++ incubator/rave/trunk/rave-commons/src/main/java/org/apache/rave/util/CollectionUtils.java Wed Aug 10 00:18:18 2011
@@ -21,10 +21,7 @@ package org.apache.rave.util;
import org.apache.commons.lang.Validate;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import java.util.*;
public class CollectionUtils {
@@ -108,4 +105,32 @@ public class CollectionUtils {
}
}
}
+
+ /**
+ * Converts the wildcard list to a typed list
+ * @param initial the wildcard list
+ * @param <T> the type constraint for the target list
+ * @return the new, type constrained list
+ */
+ public static <T> List<T> toBaseTypedList(List<? extends T> initial) {
+ List<T> list = new ArrayList<T>();
+ for(T f : initial) {
+ list.add(f);
+ }
+ return list;
+ }
+
+ /**
+ * Adds values from the source list to the target list only if they don't already exist in the target
+ * @param source the list to add items from
+ * @param target the list to add items to
+ * @param <T> the type of the source & target lists
+ */
+ public static <T> void addUniqueValues(List<T> source, List<T> target) {
+ for(T item : source) {
+ if(!target.contains(item)) {
+ target.add(item);
+ }
+ }
+ }
}
\ No newline at end of file
Modified: incubator/rave/trunk/rave-commons/src/test/java/org/apache/rave/util/CollectionUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-commons/src/test/java/org/apache/rave/util/CollectionUtilsTest.java?rev=1155978&r1=1155977&r2=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-commons/src/test/java/org/apache/rave/util/CollectionUtilsTest.java (original)
+++ incubator/rave/trunk/rave-commons/src/test/java/org/apache/rave/util/CollectionUtilsTest.java Wed Aug 10 00:18:18 2011
@@ -25,9 +25,10 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
public class CollectionUtilsTest {
private CollectionUtils.CollectionReconciliationHelper<TestObject, String> reconciliationHelper =
@@ -176,6 +177,45 @@ public class CollectionUtilsTest {
assertTrue(org.apache.commons.collections.CollectionUtils.isEqualCollection(existingObjects, updatedObjects));
}
+ @Test
+ public void toBaseTypedList() {
+ List<SubTestObject> list = new ArrayList<SubTestObject>();
+ list.add(new SubTestObject("a", "b"));
+ list.add(new SubTestObject("a", "b"));
+ list.add(new SubTestObject("a", "b"));
+
+ List<TestObject> down = CollectionUtils.toBaseTypedList((List<? extends TestObject>)list);
+ assertThat(down.get(0), is(sameInstance((TestObject)list.get(0))));
+ assertThat(down.get(0), is(sameInstance((TestObject)list.get(0))));
+ assertThat(down.get(0), is(sameInstance((TestObject)list.get(0))));
+ }
+
+ @Test
+ public void addUniqueValues() {
+ List<TestObject> source = new ArrayList<TestObject>();
+ TestObject testObject1 = new TestObject("a", "b");
+ TestObject testObject2 = new TestObject("b", "c");
+ TestObject testObject3 = new TestObject("k", "l");
+ source.add(testObject1);
+ source.add(testObject2);
+
+ List<TestObject> target = new ArrayList<TestObject>();
+ target.add(testObject1);
+ target.add(testObject3);
+
+ CollectionUtils.addUniqueValues(source, target);
+ assertThat(target.size(), is(equalTo(3)));
+ assertThat(target.contains(testObject1), is(true));
+ assertThat(target.contains(testObject2), is(true));
+ assertThat(target.contains(testObject3), is(true));
+ }
+
+ private class SubTestObject extends TestObject {
+ private SubTestObject(String name, String value) {
+ super(name, value);
+ }
+ }
+
private class TestObject {
private String name;
private String value;
Modified: incubator/rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/pom.xml?rev=1155978&r1=1155977&r2=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/pom.xml (original)
+++ incubator/rave/trunk/rave-portal/pom.xml Wed Aug 10 00:18:18 2011
@@ -19,7 +19,8 @@
$Id$
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -118,17 +119,17 @@
</dependency>
<dependency>
- <groupId>org.openid4java</groupId>
- <artifactId>openid4java-consumer</artifactId>
- <version>${org.openid4java.version}</version>
- <type>pom</type>
+ <groupId>org.openid4java</groupId>
+ <artifactId>openid4java-consumer</artifactId>
+ <version>${org.openid4java.version}</version>
+ <type>pom</type>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>1.8.1</version>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.8.1</version>
</dependency>
<!-- JSON Support -->
@@ -148,11 +149,11 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-
+
<!-- JSTL -->
<dependency>
- <groupId>org.glassfish.web</groupId>
- <artifactId>jstl-impl</artifactId>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>jstl-impl</artifactId>
</dependency>
<!-- Logging -->
@@ -198,43 +199,43 @@
</dependencies>
<build>
- <defaultGoal>install</defaultGoal>
- <plugins>
- <!--
- fix for war processing of m-r-r-plugin causing the generated NOTICE and LICENSE file to be put under
- WEB-INF/classes/META-INF
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
- <attached>false</attached>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.googlecode.mavenfilesync</groupId>
- <artifactId>maven-filesync-plugin</artifactId>
- <configuration>
- <mappings>
- <mapping>
- <sourceFolder>src/main/webapp</sourceFolder>
- <destinationFolder>@target/tomcat6x/webapps/portal</destinationFolder>
- </mapping>
- <mapping>
- <sourceFolder>src/main/resources</sourceFolder>
- <destinationFolder>@target/tomcat6x/webapps/portal/WEB-INF/classes</destinationFolder>
- </mapping>
- </mappings>
- </configuration>
- </plugin>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <!--
+ fix for war processing of m-r-r-plugin causing the generated NOTICE and LICENSE file to be put under
+ WEB-INF/classes/META-INF
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <attached>false</attached>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.mavenfilesync</groupId>
+ <artifactId>maven-filesync-plugin</artifactId>
+ <configuration>
+ <mappings>
+ <mapping>
+ <sourceFolder>src/main/webapp</sourceFolder>
+ <destinationFolder>@target/tomcat6x/webapps/portal</destinationFolder>
+ </mapping>
+ <mapping>
+ <sourceFolder>src/main/resources</sourceFolder>
+ <destinationFolder>@target/tomcat6x/webapps/portal/WEB-INF/classes</destinationFolder>
+ </mapping>
+ </mappings>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>openjpa-maven-plugin</artifactId>
@@ -242,7 +243,7 @@
<configuration>
<includes>org/apache/rave/portal/model/*.class</includes>
<addDefaultConstructor>true</addDefaultConstructor>
- <!--<enforcePropertyRestrictions>true</enforcePropertyRestrictions>-->
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
</configuration>
<executions>
<execution>
@@ -253,6 +254,20 @@
</goals>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ </exclusions>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${openjpa.version}</version>
+
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
<groupId>com.github.searls</groupId>
@@ -267,8 +282,8 @@
<goal>test</goal>
</goals>
<configuration>
- <jsSrcDir>${project.basedir}/src/main/webapp/script/</jsSrcDir>
- <debug>true</debug>
+ <jsSrcDir>${project.basedir}/src/main/webapp/script/</jsSrcDir>
+ <debug>true</debug>
</configuration>
</execution>
</executions>
@@ -315,7 +330,7 @@
</url>
</zipUrlInstaller>
<systemProperties>
- <shindig.host>localhost</shindig.host>
+ <shindig.host>localhost</shindig.host>
</systemProperties>
</container>
</configuration>
@@ -323,60 +338,60 @@
</plugins>
</build>
- <profiles>
- <profile>
- <id>dist</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>${cargo.version}</version>
- <executions>
- <execution>
- <id>dist-cargo-package</id>
- <phase>install</phase>
- <goals>
- <goal>configure</goal>
- <goal>package</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2.1</version>
- <configuration>
- <!-- Do not attach the resulting artifact(s) to the project (e.g. do not deploy) -->
- <attach>false</attach>
- <!-- Override finalName -->
- <finalName>rave-${project.version}</finalName>
- <!-- Workaround for http://jira.codehaus.org/browse/MASSEMBLY-449 -->
- <archiverConfig>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- <defaultDirectoryMode>0755</defaultDirectoryMode>
- </archiverConfig>
- </configuration>
- <executions>
- <execution>
- <id>dist-assembly</id>
- <phase>install</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>${project.basedir}/src/main/assembly/distbin.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <profiles>
+ <profile>
+ <id>dist</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>${cargo.version}</version>
+ <executions>
+ <execution>
+ <id>dist-cargo-package</id>
+ <phase>install</phase>
+ <goals>
+ <goal>configure</goal>
+ <goal>package</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <!-- Do not attach the resulting artifact(s) to the project (e.g. do not deploy) -->
+ <attach>false</attach>
+ <!-- Override finalName -->
+ <finalName>rave-${project.version}</finalName>
+ <!-- Workaround for http://jira.codehaus.org/browse/MASSEMBLY-449 -->
+ <archiverConfig>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ <defaultDirectoryMode>0755</defaultDirectoryMode>
+ </archiverConfig>
+ </configuration>
+ <executions>
+ <execution>
+ <id>dist-assembly</id>
+ <phase>install</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>${project.basedir}/src/main/assembly/distbin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: incubator/rave/trunk/rave-shindig/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/pom.xml?rev=1155978&r1=1155977&r2=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/pom.xml (original)
+++ incubator/rave/trunk/rave-shindig/pom.xml Wed Aug 10 00:18:18 2011
@@ -19,173 +19,195 @@
$Id$
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-project</artifactId>
+ <version>0.3-incubating-SNAPSHOT</version>
+ </parent>
- <parent>
<groupId>org.apache.rave</groupId>
- <artifactId>rave-project</artifactId>
+ <artifactId>rave-shindig</artifactId>
+ <name>Apache Rave :: rave-shindig</name>
+ <description>Apache Rave Shindig App</description>
+ <packaging>war</packaging>
<version>0.3-incubating-SNAPSHOT</version>
- </parent>
-
- <groupId>org.apache.rave</groupId>
- <artifactId>rave-shindig</artifactId>
- <name>Apache Rave :: rave-shindig</name>
- <description>Apache Rave Shindig App</description>
- <packaging>war</packaging>
- <version>0.3-incubating-SNAPSHOT</version>
- <properties>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.rave</groupId>
- <artifactId>rave-commons</artifactId>
- </dependency>
+ <properties>
+ </properties>
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-server</artifactId>
- <type>war</type>
- </dependency>
-
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-persist</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-social-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-gadgets</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-social-api</artifactId>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-common</artifactId>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <defaultGoal>install</defaultGoal>
-
- <plugins>
- <!--
- fix for war processing of m-r-r-plugin causing the generated NOTICE and LICENSE file to be put under
- WEB-INF/classes/META-INF
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
- <attached>false</attached>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.googlecode.mavenfilesync</groupId>
- <artifactId>maven-filesync-plugin</artifactId>
- <configuration>
- <mappings>
- <mapping>
- <sourceFolder>src/main/webapp</sourceFolder>
- <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT</destinationFolder>
- </mapping>
- <mapping>
- <sourceFolder>src/main/resources</sourceFolder>
- <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT/WEB-INF/classes</destinationFolder>
- </mapping>
- </mappings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <overlays>
- <overlay>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-server</artifactId>
- <excludes>
- <!-- exclude Shinding provided m-r-r-p generated L&N files:
- ours are put directly under /META-INF and these are confusing and not ours anyway -->
- <exclude>META-INF/*</exclude>
- <exclude>WEB-INF/classes/META-INF/*</exclude>
- </excludes>
- </overlay>
- </overlays>
- </configuration>
- </plugin>
- </plugins>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-commons</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-server</artifactId>
+ <type>war</type>
+ </dependency>
+
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-persist</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-social-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-gadgets</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-social-api</artifactId>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-common</artifactId>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.3</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>1.2</version>
+ <configuration>
+ <!--<includes>org/apache/rave/opensocial/model/*.class</includes>-->
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ fix for war processing of m-r-r-plugin causing the generated NOTICE and LICENSE file to be put under
+ WEB-INF/classes/META-INF
+ -->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <attached>false</attached>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.mavenfilesync</groupId>
+ <artifactId>maven-filesync-plugin</artifactId>
+ <configuration>
+ <mappings>
+ <mapping>
+ <sourceFolder>src/main/webapp</sourceFolder>
+ <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT</destinationFolder>
+ </mapping>
+ <mapping>
+ <sourceFolder>src/main/resources</sourceFolder>
+ <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT/WEB-INF/classes
+ </destinationFolder>
+ </mapping>
+ </mappings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-server</artifactId>
+ <excludes>
+ <!-- exclude Shinding provided m-r-r-p generated L&N files:
+ ours are put directly under /META-INF and these are confusing and not ours anyway -->
+ <exclude>META-INF/*</exclude>
+ <exclude>WEB-INF/classes/META-INF/*</exclude>
+ </excludes>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
- </build>
+ </build>
</project>
Modified: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/inject/GuiceBindingSpringContextLoaderListener.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/inject/GuiceBindingSpringContextLoaderListener.java?rev=1155978&r1=1155977&r2=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/inject/GuiceBindingSpringContextLoaderListener.java (original)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/inject/GuiceBindingSpringContextLoaderListener.java Wed Aug 10 00:18:18 2011
@@ -19,6 +19,7 @@
package org.apache.rave.inject;
+import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import org.apache.shindig.common.servlet.GuiceServletContextListener;
@@ -41,18 +42,8 @@ public class GuiceBindingSpringContextLo
ServletContext servletContext = event.getServletContext();
//Get a list of Guice module Spring beans from the application context
Collection<Module> modules = getModulesFromApplicationContext();
- //Get the current injector from the servlet context
- Injector injector = getInjector(servletContext);
//Override the current injector with the new child injector that includes all Spring managed Guice modules
- overrideInjector(injector.createChildInjector(modules), servletContext);
- }
-
- private static Injector getInjector(ServletContext servletContext) {
- Injector injector = (Injector) servletContext.getAttribute(GuiceServletContextListener.INJECTOR_ATTRIBUTE);
- if(injector == null) {
- throw new IllegalStateException("No Guice Injector found in Servlet Context. Ensure that this listener is loaded AFTER Guice has been initialized");
- }
- return injector;
+ overrideInjector(Guice.createInjector(modules), servletContext);
}
private static void overrideInjector(Injector injector, ServletContext context) {
Added: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Account.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Account.java?rev=1155978&view=auto
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Account.java (added)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Account.java Wed Aug 10 00:18:18 2011
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+package org.apache.rave.opensocial.model;
+
+import org.apache.rave.persistence.BasicEntity;
+
+import javax.persistence.*;
+
+import static javax.persistence.GenerationType.IDENTITY;
+
+/**
+ */
+@Entity
+@Table(name = "account")
+@SequenceGenerator(name="accountIdSeq", sequenceName = "account_id_seq")
+public class Account implements org.apache.shindig.social.opensocial.model.Account, BasicEntity {
+ /**
+ * The internal object ID used for references to this object. Should be generated
+ * by the underlying storage mechanism
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "accountIdSeq")
+ @Column(name = "id")
+ protected Long id;
+
+ /**
+ * An optimistic locking field.
+ */
+ @Version
+ @Column(name = "version")
+ protected long version;
+
+ /**
+ * model field.
+ * @see org.apache.shindig.social.opensocial.model.Account
+ */
+ @Basic
+ @Column(name = "domain", length = 255)
+ protected String domain;
+
+ /**
+ * model field.
+ * @see org.apache.shindig.social.opensocial.model.Account
+ */
+ @Basic
+ @Column(name = "user_id", length = 255)
+ protected String userId;
+
+ /**
+ * model field.
+ * @see org.apache.shindig.social.opensocial.model.Account
+ */
+ @Basic
+ @Column(name = "username", length = 255)
+ protected String username;
+
+ /**
+ * create an empty account object.
+ */
+ public Account() {
+ }
+
+ /**
+ * Create an account object based on domain, userId and username
+ * @param domain the domain of the account
+ * @param userId the user id of the account
+ * @param username the username of the account
+ */
+ public Account(String domain, String userId, String username) {
+ this.domain = domain;
+ this.userId = userId;
+ this.username = username;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#getDomain()
+ */
+ public String getDomain() {
+ return domain;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#setDomain(String)
+ */
+ public void setDomain(String domain) {
+ this.domain = domain;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#getUserId()
+ */
+ public String getUserId() {
+ return userId;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#setUserId(String)
+ */
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#getUsername()
+ */
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.model.Account#setUsername(String)
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.apache.shindig.social.opensocial.jpa.api.DbObject#getObjectId()
+ */
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+}
Added: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Address.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Address.java?rev=1155978&view=auto
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Address.java (added)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Address.java Wed Aug 10 00:18:18 2011
@@ -0,0 +1,336 @@
+/*
+ * 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.
+ */
+package org.apache.rave.opensocial.model;
+
+import org.apache.rave.persistence.BasicEntity;
+
+import javax.persistence.*;
+
+/**
+ */
+@Entity
+@Table(name = "address")
+@SequenceGenerator(name = "addressIdSeq", sequenceName = "address_id_seq")
+public class Address implements org.apache.shindig.social.opensocial.model.Address, BasicEntity {
+
+ /**
+ * The internal object ID used for references to this object. Should be generated by the
+ * underlying storage mechanism
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "addressIdSeq")
+ @Column(name = "id")
+ private Long id;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "country", length = 255)
+ private String country;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "latitude")
+ private Float latitude;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "longitude")
+ private Float longitude;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "locality", length = 255)
+ private String locality;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "postal_code", length = 255)
+ private String postalCode;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "region", length = 255)
+ private String region;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "street_address", length = 255)
+ private String streetAddress;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "type", length = 255)
+ private String type;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "formatted", length = 255)
+ private String formatted;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address
+ */
+ @Basic
+ @Column(name = "primary_address")
+ private Boolean primary;
+
+ /**
+ * default constructor
+ */
+ public Address() {
+ }
+
+ /**
+ * Create an address from the formatted address, no parsing of the address will be performed.
+ *
+ * @param formatted the formatted address.
+ */
+ public Address(String formatted) {
+ this.formatted = formatted;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getCountry()
+ */
+ public String getCountry() {
+ return country;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setCountry(String)
+ */
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getLatitude()
+ */
+ public Float getLatitude() {
+ return latitude;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setLatitude(Float)
+ */
+ public void setLatitude(Float latitude) {
+ this.latitude = latitude;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getLocality()
+ */
+ public String getLocality() {
+ return locality;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setLocality(String)
+ */
+ public void setLocality(String locality) {
+ this.locality = locality;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getLongitude()
+ */
+ public Float getLongitude() {
+ return longitude;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setLongitude(Float)
+ */
+ public void setLongitude(Float longitude) {
+ this.longitude = longitude;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getPostalCode()
+ */
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setPostalCode(String)
+ */
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getRegion()
+ */
+ public String getRegion() {
+ return region;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setRegion(String)
+ */
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getStreetAddress()
+ */
+ public String getStreetAddress() {
+ return streetAddress;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setStreetAddress(String)
+ */
+ public void setStreetAddress(String streetAddress) {
+ this.streetAddress = streetAddress;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getType()
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setType(String)
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getFormatted()
+ */
+ public String getFormatted() {
+ return formatted;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setFormatted(String)
+ */
+ public void setFormatted(String formatted) {
+ this.formatted = formatted;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#getPrimary()
+ */
+ public Boolean getPrimary() {
+ return primary;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Address#setPrimary(Boolean)
+ */
+ public void setPrimary(Boolean primary) {
+ this.primary = primary;
+ }
+
+ /**
+ * @return the objectId
+ */
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+}
Added: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/BodyType.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/BodyType.java?rev=1155978&view=auto
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/BodyType.java (added)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/BodyType.java Wed Aug 10 00:18:18 2011
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.rave.opensocial.model;
+
+import org.apache.rave.persistence.BasicEntity;
+
+import javax.persistence.*;
+
+/**
+ * The body type entity, stored in "body_type"
+ */
+@Embeddable
+public class BodyType implements org.apache.shindig.social.opensocial.model.BodyType {
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType
+ */
+ @Basic
+ @Column(name = "build", length = 255)
+ private String build;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType
+ */
+ @Basic
+ @Column(name = "eye_color", length = 255)
+ private String eyeColor;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType
+ */
+ @Basic
+ @Column(name = "hair_color", length = 255)
+ private String hairColor;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType
+ */
+ @Basic
+ @Column(name = "height")
+ private Float height;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType
+ */
+ @Basic
+ @Column(name = "weight")
+ private Float weight;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#getBuild()
+ */
+ public String getBuild() {
+ return build;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#setBuild(String)
+ */
+ public void setBuild(String build) {
+ this.build = build;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#getEyeColor()
+ */
+ public String getEyeColor() {
+ return eyeColor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#setEyeColor(String)
+ */
+ public void setEyeColor(String eyeColor) {
+ this.eyeColor = eyeColor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#getHairColor()
+ */
+ public String getHairColor() {
+ return hairColor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#setHairColor(String)
+ */
+ public void setHairColor(String hairColor) {
+ this.hairColor = hairColor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#getHeight()
+ */
+ public Float getHeight() {
+ return height;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setHeight(Float height) {
+ this.height = height;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.BodyType#getWeight()
+ */
+ public Float getWeight() {
+ return weight;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setWeight(Float weight) {
+ this.weight = weight;
+ }
+
+}
Copied: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Group.java (from r1153537, incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/GroupDb.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Group.java?p2=incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Group.java&p1=incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/GroupDb.java&r1=1153537&r2=1155978&rev=1155978&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/shindig/social/opensocial/jpa/GroupDb.java (original)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Group.java Wed Aug 10 00:18:18 2011
@@ -1,155 +1,132 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-package org.apache.shindig.social.opensocial.jpa;
+package org.apache.rave.opensocial.model;
-import org.apache.shindig.social.opensocial.jpa.api.DbObject;
-import org.apache.shindig.social.opensocial.model.ListField;
-import org.apache.shindig.social.opensocial.model.Person;
+import org.apache.rave.persistence.BasicEntity;
import javax.persistence.*;
import java.util.List;
-import java.util.Map;
-
-import static javax.persistence.GenerationType.IDENTITY;
/**
* Represents a group in the social database. The assumption in this object is that groups are
* associated with individuals and are used by those individuals to manage people.
*/
@Entity
-@Table(name = "person_group")
-public class GroupDb implements DbObject {
- /**
- * The internal object ID used for references to this object. Should be generated by the
- * underlying storage mechanism
- */
- @Id
- @GeneratedValue(strategy = IDENTITY)
- @Column(name = "oid")
- protected long objectId;
-
- /**
- * An optimistic locking field.
- */
- @Version
- @Column(name = "version")
- protected long version;
-
- /**
- * There is a single owner of a group.
- */
- @ManyToOne(targetEntity = PersonDb.class)
- @JoinColumn(name = "person_id", referencedColumnName = "oid")
- protected Person owner;
-
- /**
- * There are many members of a group.
- */
- @ManyToMany(targetEntity = PersonDb.class)
- @JoinTable(name = "membership",
- joinColumns =
- @JoinColumn(name = "group_id", referencedColumnName = "oid"),
- inverseJoinColumns =
- @JoinColumn(name = "person_id", referencedColumnName = "oid"))
- protected List<Person> members;
-
- /**
- * Each group has a group Id.
- */
- @Basic
- @Column(name = "id", length = 255)
- protected String id;
-
- /**
- * The group has properties.
- */
- @OneToMany(targetEntity = GroupPropertyDb.class, mappedBy = "group")
- @MapKey(name = "type")
- protected Map<String, ListField> properties;
-
- /**
- * @return the owner
- */
- public Person getOwner() {
- return owner;
- }
-
- /**
- * @param owner the owner to set
- */
- public void setOwner(Person owner) {
- this.owner = owner;
- }
-
- /**
- * @return the members
- */
- public List<Person> getMembers() {
- return members;
- }
-
- /**
- * @param members the members to set
- */
- public void setMembers(List<Person> members) {
- this.members = members;
- }
-
- /**
- * @return the id
- */
- public String getId() {
- return id;
- }
-
- /**
- * @param id the id to set
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * @return the objectId
- */
- public long getObjectId() {
- return objectId;
- }
-
- /**
- * @return the version
- */
- public long getVersion() {
- return version;
- }
-
- /**
- * @return the properties
- */
- public Map<String, ListField> getProperties() {
- return properties;
- }
-
- /**
- * @param properties the properties to set
- */
- public void setProperties(Map<String, ListField> properties) {
- this.properties = properties;
- }
+@Table(name = "groups")
+@SequenceGenerator(name = "groupIdSeq", sequenceName = "group_id_seq")
+public class Group implements BasicEntity {
+ /**
+ * The internal object ID used for references to this object. Should be generated by the
+ * underlying storage mechanism
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "groupIdSeq")
+ @Column(name = "id")
+ protected Long id;
+
+ /**
+ * Each group has a group name.
+ */
+ @Basic
+ @Column(name = "name")
+ protected String title;
+
+
+ @Basic
+ @Column(name = "description")
+ protected String description;
+
+
+ /**
+ * There is a single owner of a group.
+ */
+ @ManyToOne
+ @JoinColumn(name = "owner_id", referencedColumnName = "id")
+ protected Person owner;
+
+ /**
+ * There are many members of a group.
+ */
+ @ManyToMany
+ @JoinTable(name = "group_members",
+ joinColumns =
+ @JoinColumn(name = "group_id", referencedColumnName = "id"),
+ inverseJoinColumns =
+ @JoinColumn(name = "person_id", referencedColumnName = "id"))
+ protected List<Person> members;
+
+ /**
+ * @return the owner
+ */
+ public Person getOwner() {
+ return owner;
+ }
+
+ /**
+ * @param owner the owner to set
+ */
+ public void setOwner(Person owner) {
+ this.owner = owner;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the members
+ */
+ public List<Person> getMembers() {
+ return members;
+ }
+
+ /**
+ * @param members the members to set
+ */
+ public void setMembers(List<Person> members) {
+ this.members = members;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * @param title the name of hte group
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * @return the id
+ */
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
}
Added: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Name.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Name.java?rev=1155978&view=auto
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Name.java (added)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Name.java Wed Aug 10 00:18:18 2011
@@ -0,0 +1,203 @@
+/*
+ * 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.
+ */
+package org.apache.rave.opensocial.model;
+
+import javax.persistence.*;
+
+/**
+ * The name object, stored in the name table.
+ */
+@Embeddable
+public class Name implements org.apache.shindig.social.opensocial.model.Name {
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "additional_name", length = 255)
+ private String additionalName;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "family_name", length = 255)
+ private String familyName;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "given_name", length = 255)
+ private String givenName;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "honorific_prefix", length = 255)
+ private String honorificPrefix;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "honorific_suffix", length = 255)
+ private String honorificSuffix;
+
+ /**
+ * model field.
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name
+ */
+ @Basic
+ @Column(name = "formatted", length = 255)
+ private String formatted;
+
+ /**
+ *
+ */
+ public Name() {
+ }
+
+ /**
+ * @param formatted
+ */
+ public Name(String formatted) {
+ this.formatted = formatted;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getAdditionalName()
+ */
+ public String getAdditionalName() {
+ return additionalName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setAdditionalName(String)
+ */
+ public void setAdditionalName(String additionalName) {
+ this.additionalName = additionalName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getFamilyName()
+ */
+ public String getFamilyName() {
+ return familyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setFamilyName(String)
+ */
+ public void setFamilyName(String familyName) {
+ this.familyName = familyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getGivenName()
+ */
+ public String getGivenName() {
+ return givenName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setGivenName(String)
+ */
+ public void setGivenName(String givenName) {
+ this.givenName = givenName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getHonorificPrefix()
+ */
+ public String getHonorificPrefix() {
+ return honorificPrefix;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setHonorificPrefix(String)
+ */
+ public void setHonorificPrefix(String honorificPrefix) {
+ this.honorificPrefix = honorificPrefix;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getHonorificSuffix()
+ */
+ public String getHonorificSuffix() {
+ return honorificSuffix;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setHonorificSuffix(String)
+ */
+ public void setHonorificSuffix(String honorificSuffix) {
+ this.honorificSuffix = honorificSuffix;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#getFormatted()
+ */
+ public String getFormatted() {
+ return formatted;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Name#setFormatted(String)
+ */
+ public void setFormatted(String formatted) {
+ this.formatted = formatted;
+ }
+}
Added: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Organization.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Organization.java?rev=1155978&view=auto
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Organization.java (added)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/opensocial/model/Organization.java Wed Aug 10 00:18:18 2011
@@ -0,0 +1,387 @@
+/*
+ * 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.
+ */
+package org.apache.rave.opensocial.model;
+
+import org.apache.rave.persistence.BasicEntity;
+import org.apache.shindig.social.opensocial.model.Address;
+
+import javax.persistence.*;
+import java.util.Date;
+
+/**
+ */
+@Entity
+@Table(name = "organization")
+@SequenceGenerator(name = "organizationIdSeq", sequenceName = "organization_id_seq")
+public class Organization implements org.apache.shindig.social.opensocial.model.Organization, BasicEntity {
+
+ /**
+ * The internal object ID used for references to this object. Should be generated by the
+ * underlying storage mechanism
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "organizationIdSeq")
+ @Column(name = "id")
+ private Long id;
+
+ @OneToOne
+ private Address address;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "description", length = 255)
+ private String description;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "endDate")
+ @Temporal(TemporalType.DATE)
+ private Date endDate;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "field", length = 255)
+ private String field;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "name", length = 255)
+ private String name;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "salary", length = 255)
+ private String salary;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "start_date")
+ @Temporal(TemporalType.DATE)
+ private Date startDate;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "sub_field", length = 255)
+ private String subField;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "title", length = 255)
+ private String title;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "webpage", length = 255)
+ private String webpage;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "type", length = 255)
+ private String type;
+
+ /**
+ * Part of the Organization Model
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization
+ */
+ @Basic
+ @Column(name = "primary_organization")
+ private Boolean primary;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getAddress()
+ */
+ public Address getAddress() {
+ return address;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setAddress(org.apache.shindig.social.opensocial.model.Address)
+ */
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getDescription()
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setDescription(String)
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getEndDate()
+ */
+ public Date getEndDate() {
+ if (endDate == null) {
+ return null;
+ }
+ return new Date(endDate.getTime());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setEndDate(java.util.Date)
+ */
+ public void setEndDate(Date endDate) {
+ if (endDate == null) {
+ this.endDate = null;
+ } else {
+ this.endDate = new Date(endDate.getTime());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getField()
+ */
+ public String getField() {
+ return field;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setField(String)
+ */
+ public void setField(String field) {
+ this.field = field;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setName(String)
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getSalary()
+ */
+ public String getSalary() {
+ return salary;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setSalary(String)
+ */
+ public void setSalary(String salary) {
+ this.salary = salary;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getStartDate()
+ */
+ public Date getStartDate() {
+ if (startDate == null) {
+ return null;
+ }
+ return new Date(startDate.getTime());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setStartDate(java.util.Date)
+ */
+ public void setStartDate(Date startDate) {
+ if (startDate == null) {
+ this.startDate = null;
+ } else {
+ this.startDate = new Date(startDate.getTime());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getSubField()
+ */
+ public String getSubField() {
+ return subField;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setSubField(String)
+ */
+ public void setSubField(String subField) {
+ this.subField = subField;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getTitle()
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setTitle(String)
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getWebpage()
+ */
+ public String getWebpage() {
+ return webpage;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setWebpage(String)
+ */
+ public void setWebpage(String webpage) {
+ this.webpage = webpage;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getType()
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setType(String)
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#getPrimary()
+ */
+ public Boolean getPrimary() {
+ return primary;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.shindig.social.opensocial.model.Organization#setPrimary(Boolean)
+ */
+ public void setPrimary(Boolean primary) {
+ this.primary = primary;
+ }
+
+ /**
+ */
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+}