[gee-svn] SF.net SVN: gabel: [142] trunk/gee/war/WEB-INF
Status: Alpha
Brought to you by:
alllee
|
From: <al...@us...> - 2006-03-05 04:55:24
|
Revision: 142 Author: alllee Date: 2006-03-04 20:55:19 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/gabel/?rev=142&view=rev Log Message: ----------- trying to fix the mapping relationship between forager configuration and forager experiment parameters. Modified Paths: -------------- trunk/gee/src/java/edu/indiana/psych/gee/ExperimentConfigurationEntity.java trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerConfiguration.java trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java trunk/gee/war/WEB-INF/hibernate.cfg.xml Modified: trunk/gee/src/java/edu/indiana/psych/gee/ExperimentConfigurationEntity.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/ExperimentConfigurationEntity.java 2006-03-05 04:40:28 UTC (rev 141) +++ trunk/gee/src/java/edu/indiana/psych/gee/ExperimentConfigurationEntity.java 2006-03-05 04:55:19 UTC (rev 142) @@ -13,6 +13,7 @@ import javax.persistence.Table; import javax.persistence.Transient; +import org.hibernate.annotations.Proxy; /** * $Id$ @@ -26,8 +27,9 @@ */ @Entity +@Inheritance(strategy=InheritanceType.JOINED) @Table(name="experiment_configuration") -@Inheritance(strategy=InheritanceType.JOINED) +@Proxy(proxyClass=ExperimentConfiguration.class) public abstract class ExperimentConfigurationEntity<T extends ExperimentRoundParameters> implements ExperimentConfiguration<T> { Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerConfiguration.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerConfiguration.java 2006-03-05 04:40:28 UTC (rev 141) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerConfiguration.java 2006-03-05 04:55:19 UTC (rev 142) @@ -12,6 +12,9 @@ import javax.persistence.Table; import javax.persistence.Transient; +import org.hibernate.annotations.Proxy; + +import edu.indiana.psych.gee.ExperimentConfiguration; import edu.indiana.psych.gee.ExperimentConfigurationEntity; import edu.indiana.psych.gee.forager.client.ForagerApplet; import edu.indiana.psych.gee.time.Duration; @@ -30,6 +33,7 @@ @DiscriminatorValue("forager") @PrimaryKeyJoinColumn(name="experiment_configuration_id") @Table(name="forager_configuration") +@Proxy(proxyClass=ExperimentConfiguration.class) public class ForagerConfiguration extends ExperimentConfigurationEntity<ForagerExperimentParameters> { private List<ForagerExperimentParameters> allParameters; Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java 2006-03-05 04:40:28 UTC (rev 141) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java 2006-03-05 04:55:19 UTC (rev 142) @@ -5,16 +5,11 @@ import java.util.List; import java.util.Properties; -import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; -import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.Table; import javax.persistence.Transient; -import javax.persistence.*; import org.hibernate.annotations.Proxy; @@ -23,14 +18,10 @@ import edu.indiana.psych.gee.time.Duration; @Entity -@Inheritance(strategy=InheritanceType.JOINED) -@DiscriminatorValue("forager") -@PrimaryKeyJoinColumn(name="forager_parameters_id") -@Proxy(proxyClass=ExperimentRoundParameters.class) @Table(name="forager_parameters") +@Proxy(proxyClass=ExperimentRoundParameters.class) public class ForagerExperimentParameters implements ExperimentRoundParameters { - private ForagerAgentConfiguration agentConfiguration; private ForagerConfiguration configuration; @@ -40,7 +31,7 @@ private long id = -1; - ForagerExperimentParameters(ForagerConfiguration configuration) { + public ForagerExperimentParameters(ForagerConfiguration configuration) { setConfiguration(configuration); } Modified: trunk/gee/war/WEB-INF/hibernate.cfg.xml =================================================================== --- trunk/gee/war/WEB-INF/hibernate.cfg.xml 2006-03-05 04:40:28 UTC (rev 141) +++ trunk/gee/war/WEB-INF/hibernate.cfg.xml 2006-03-05 04:55:19 UTC (rev 142) @@ -9,7 +9,7 @@ <session-factory> <mapping package="edu.indiana.psych.gee"/> <mapping class="edu.indiana.psych.gee.ConsentForm"/> - <mapping class="edu.indiana.psych.gee.ExperimentParametersEntity"/> + <mapping class="edu.indiana.psych.gee.ExperimentConfigurationEntity"/> <mapping package="edu.indiana.psych.gee.forager"/> <mapping class="edu.indiana.psych.gee.forager.ForagerExperimentParameters"/> <mapping class="edu.indiana.psych.gee.forager.ForagerConfiguration"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |