Author: ieb
Date: Fri Sep 19 01:51:12 2008
New Revision: 696989
URL: http://svn.apache.org/viewvc?rev=696989&view=rev
Log:
Consolidated the Application Datastore simplifying the stucutre and ensuring
that the application data is decoupled from
relationships to other entities, to ensure that the JPA implementation does not
perform expensive joins.
Removed:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataDb.java
Modified:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataMapDb.java
Modified:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataMapDb.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataMapDb.java?rev=696989&r1=696988&r2=696989&view=diff
==============================================================================
---
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataMapDb.java
(original)
+++
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ApplicationDataMapDb.java
Fri Sep 19 01:51:12 2008
@@ -20,6 +20,7 @@
import static javax.persistence.GenerationType.IDENTITY;
import org.apache.shindig.social.opensocial.jpa.api.DbObject;
+import org.apache.shindig.social.opensocial.model.Person;
import javax.persistence.Basic;
import javax.persistence.Column;
@@ -51,6 +52,14 @@
*/
private static final long serialVersionUID = 8017568825925047318L;
+ public static final String FINDBY_ALL_GROUP = null;
+
+ public static final String FINDBY_FRIENDS_GROUP = null;
+
+ public static final String FINDBY_GROUP_GROUP = null;
+
+ public static final String FINDBY_SELF_GROUP = null;
+
/**
* The internal object ID used for references to this object. Should be
generated by the
* underlying storage mechanism
@@ -68,11 +77,12 @@
protected long version;
/**
- * A Application Data Map belongs to a set of maps associated with an
application by name.
+ * A Application Data Map belongs to a set of maps associated with an
application.
+ * The link from Application to DataMap is not navigable since it may
contain 1000's of entries.
*/
- @ManyToOne(targetEntity=ApplicationDataDb.class)
- @JoinColumn(name="application_data_id", referencedColumnName="oid")
- protected ApplicationDataDb applicationData;
+ @ManyToOne(targetEntity=ApplicationDb.class)
+ @JoinColumn(name="application_id", referencedColumnName="oid")
+ protected ApplicationDb application;
/**
* A named application data map, contains as a map of values.
@@ -82,12 +92,9 @@
protected Map<String, ApplicationDataMapValueDb> valuesDb;
- /**
- * Each map has a name
- */
@Basic
- @Column(name="name", length=255)
- protected String name;
+ @Column(name="person_id", length=255)
+ protected String personId;
/**
* persist the state of object before sending to the db.
@@ -131,17 +138,17 @@
}
/**
- * @return the applicationData
+ * @return the application
*/
- public ApplicationDataDb getApplicationData() {
- return applicationData;
+ public ApplicationDb getApplication() {
+ return application;
}
/**
* @param applicationData the applicationData to set
*/
- public void setApplicationData(ApplicationDataDb applicationData) {
- this.applicationData = applicationData;
+ public void setApplication(ApplicationDb application) {
+ this.application = application;
}
/**
@@ -173,17 +180,18 @@
}
/**
- * @return the name
+ * @return the personId
*/
- public String getName() {
- return name;
+ public String getPersonId() {
+ return personId;
}
/**
- * @param name the name to set
+ * @param personId the personId to set
*/
- public void setName(String name) {
- this.name = name;
+ public void setPersonId(String personId) {
+ this.personId = personId;
}
+
}