Author: ieb
Date: Thu Nov 6 02:25:42 2008
New Revision: 711833
URL: http://svn.apache.org/viewvc?rev=711833&view=rev
Log:
SHINDIG-679
Patch from Ben Smith
The change in org.apache.shindig.social.opensocial.model.BodyType, turning the
weight and height attributes to floats, was not reflected in
org.apache.shindig.social.opensocial.jpa.BodyTypeDB (in the samples project).
Requires changing the attribute and getter/setter methods to use float, and the
PopulatePerson test helper to send floats instead of strings.
Thanks
(Sorry should have caught this one... as it was me who made the change in the
first place)
Modified:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/BodyTypeDb.java
incubator/shindig/trunk/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java
Modified:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/BodyTypeDb.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/BodyTypeDb.java?rev=711833&r1=711832&r2=711833&view=diff
==============================================================================
---
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/BodyTypeDb.java
(original)
+++
incubator/shindig/trunk/java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/BodyTypeDb.java
Thu Nov 6 02:25:42 2008
@@ -105,7 +105,7 @@
*/
@Basic
@Column(name = "height", length = 255)
- private String height;
+ private float height;
/**
* model field.
@@ -113,7 +113,7 @@
*/
@Basic
@Column(name = "weight", length = 255)
- private String weight;
+ private float weight;
/**
* [EMAIL PROTECTED]
@@ -167,7 +167,7 @@
* [EMAIL PROTECTED]
* @see org.apache.shindig.social.opensocial.model.BodyType#getHeight()
*/
- public String getHeight() {
+ public float getHeight() {
return height;
}
@@ -175,7 +175,7 @@
* [EMAIL PROTECTED]
* @see
org.apache.shindig.social.opensocial.model.BodyType#setHeight(java.lang.String)
*/
- public void setHeight(String height) {
+ public void setHeight(float height) {
this.height = height;
}
@@ -183,7 +183,7 @@
* [EMAIL PROTECTED]
* @see org.apache.shindig.social.opensocial.model.BodyType#getWeight()
*/
- public String getWeight() {
+ public float getWeight() {
return weight;
}
@@ -191,7 +191,7 @@
* [EMAIL PROTECTED]
* @see
org.apache.shindig.social.opensocial.model.BodyType#setWeight(java.lang.String)
*/
- public void setWeight(String weight) {
+ public void setWeight(float weight) {
this.weight = weight;
}
Modified:
incubator/shindig/trunk/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java?rev=711833&r1=711832&r2=711833&view=diff
==============================================================================
---
incubator/shindig/trunk/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java
(original)
+++
incubator/shindig/trunk/java/samples/src/test/java/org/apache/shindig/social/opensocial/jpa/test/PersonPopulate.java
Thu Nov 6 02:25:42 2008
@@ -296,14 +296,14 @@
private BodyType getNewBodyType(int i) {
BodyType bodyType = findOne(BodyTypeDb.FINDBY_HEIGHT, new String[] {
BodyTypeDb.PARAM_HEIGHT },
- new Object[] { String.valueOf(i % 10) });
+ new Object[] { new Float(i % 10) });
if (bodyType == null) {
bodyType = new BodyTypeDb();
bodyType.setBuild("Build " + i);
bodyType.setEyeColor("Build " + i);
bodyType.setHairColor("Build " + i);
- bodyType.setHeight(String.valueOf(i % 10));
- bodyType.setWeight(String.valueOf(i % 15));
+ bodyType.setHeight(new Float(i % 10));
+ bodyType.setWeight(new Float(i % 15));
}
return bodyType;
}