[virtualcommons-svn] SF.net SVN: virtualcommons:[97] mentalmodels/trunk/src/main
Status: Beta
Brought to you by:
alllee
From: <see...@us...> - 2009-04-14 19:57:16
|
Revision: 97 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=97&view=rev Author: seematalele Date: 2009-04-14 19:57:10 +0000 (Tue, 14 Apr 2009) Log Message: ----------- created Forecasting, StudentResponse classes Changed the Categorical, Psychometric schema created and written insert statements into init-mmme.sql but needs to revise survey part. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayOutput.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/GameConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Group.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/LocationConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Psychometric.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/src/main/db/init-mme.sql mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Forecasting.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentResponse.java Added: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql (rev 0) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-04-14 19:57:10 UTC (rev 97) @@ -0,0 +1,350 @@ +insert into game (description,img_address,max_days,max_fish_harvest,money,no_of_location,no_of_rounds,timestamp,title) +values("First game","island.jpg",30,5,0.0,4,3,NOW(),"Mental Model Experiment"); + +insert into round_config (communication_flag,round_no,game_id) values(false,1,1); +insert into round_config (communication_flag,round_no,game_id) values(true,2,1); + +insert into game_round_config(game_id,roundconfig_id) values(1,1); +insert into game_round_config(game_id,roundconfig_id) values(1,2); + +insert into location_config(growth_rate,location_name,max_capacity,start_population) values(0.5,"Bay1",10,5); +insert into location_config(growth_rate,location_name,max_capacity,start_population) values(0.15,"Bay2",20,10); +insert into location_config(growth_rate,location_name,max_capacity,start_population) values(0.05,"Bay3",30,15); +insert into location_config(growth_rate,location_name,max_capacity,start_population) values(0.0,"Harbor",0,0); + +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(1,1); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(1,2); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(1,3); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(1,4); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(2,1); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(2,2); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(2,3); +insert into round_config_location_config(roundconfig_id,locationconfig_id) values(2,4); + +insert into question_group(sequence_no) values(1); +insert into question_group(sequence_no) values(2); +insert into question_group(sequence_no) values(3); +insert into question_group(sequence_no) values(4); +insert into question_group(sequence_no) values(5); +insert into question_group(sequence_no) values(6); +insert into question_group(sequence_no) values(7); +insert into question_group(sequence_no) values(8); +insert into question_group(sequence_no) values(9); +insert into question_group(sequence_no) values(10); +insert into question_group(sequence_no) values(11); +insert into question_group(sequence_no) values(12); +insert into question_group(sequence_no) values(13); +insert into question_group(sequence_no) values(14); +insert into question_group(sequence_no) values(15); +insert into question_group(sequence_no) values(16); +insert into question_group(sequence_no) values(17); +insert into question_group(sequence_no) values(18); + + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Leaving strategy design +During a quick check of your strategy the following possible errors were found",1,0,1) + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Explain the strategy in your own words +Please explain your strategy with a few sentences. Particularly consider the following aspects: +\x95 Why did you design the strategy the way you did? What did you consider and why do you think your strategy is an adequate solution? +\x95 What actions do you expect from the other fishermen in your group? Why do you think, they might act this way? +\x95 How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect? +",1,0,2) + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What goals did you follow when designing your strategy? +Please specify three goals that most influenced the design of your strategy. You can select from 18 different goals grouped in three categories (foci). +First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal. +The information you write into these fields will be available the next time you edit your strategy. +",1,0,3) + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Most important goal:",2,0,3); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Second most important goal:",3,0,3); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Third most important goal:",4,0,3); + + +//Catergorial +insert into categorial(id) values(4); +insert into categorial(id) values(5); +insert into categorial(id) values(6); + +insert into categorial_choices(categorial_id,element,choices) values(4,); +insert into categorial_choices(categorial_id,element,choices) values(5); +insert into categorial_choices(categorial_id,element,choices) values(6); + + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What goals do you think the others follow? +Specify the three goals that you think most influenced the design of the strategy of the other fishermen in your group. You can select from 18 different goals grouped in three categories (foci). +First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal. +",1,0,4); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Most important goal:",2,0,4); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Second most important goal:",3,0,4); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Third most important goal:",4,0,4); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How do you perceive your group?",1,0,5); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Over all, how much do like your group (i.e. the other players)?",2,0,5); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?",3,0,5); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?",4,0,5); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?",5,0,5); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Do you perceive the group as a team or as competing players?",6,0,5); + + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much do you count on others and how much can they count on you?",1,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much do you trust the others in your group?",2,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How important is it for you that the others in your group can and do trust you?",3,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much do you think your group trying to coordinate their actions to reach better outcomes for all?",4,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much are you trying to follow rules or agreements that emerged from the communication?",5,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much do you think the others are trying to follow rules or agreements that emerged from the communication?",6,0,6); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What else influenced your strategy design?",1,0,7); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Do you feel a sense of \x91commitment\x92 to act in the way you specified in your strategy?",2,0,7); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Would you feel any discomfort or tension if you would act differently than you specified in your strategy?",3,0,7); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Do you feel any sort of \x91social pressure\x92 to act in the way you specified in your strategy?",4,0,7); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Would you feel guilt or shame if you had acted differently than you specified in your strategy?",5,0,7); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Are you afraid of some sort of \x91punishment\x92 if you had acted differently as specified in your strategy?",6,0,7); + + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How confident are you in reaching the outcomes you are expecting?",1,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How well did you understand the dynamics of the fish population?",2,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Did the others in your group understand the dynamics better or worse than you?",3,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How confident are you in having developed a strategy that leads to \x91good\x92 outcomes regarding your goals?",4,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How much does your strategy depend on how the others in the group will act to reach the desired outcomes?",5,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Would you classify your strategy as \x91safe\x92 in the sense of having acceptable but suboptimal results for sure, or rather as \x91risky\x92 in the sense of having the optimal results if everything runs like expected or very poor results otherwise?",6,0,8); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Leaving strategy design +During a quick check of your strategy the following possible errors were found: +",1,0,9); + + + +Page 2-5-02 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What are your emotional reactions to the outcomes?",1,0,10); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"First we want to know your emotional reactions to the results:",2,0,10); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"I feel the outcomes are\x85 ",3,0,10); + +Page 2-5-03 + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What is your evaluation of the outcomes?",1,0,11); + + +Page 2-5-04 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What might be the causes for the outcomes?",1,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"I did not understand well enough the dynamics of the fish population. ",2,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Some of the other fishermen did not understand well enough the dynamics of the fish population.",3,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"The others in my group acted differently then would have been necessary for my strategy to work out well.",4,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Some of the other fishermen acted too reluctantly (harvested too few).",5,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Some of the other fishermen acted too aggressively (harvested too much).",6,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"The group acted too uncoordinated. ",7,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"The group did not follow enough the rules or agreements that emerged from the communication.",8,0,12); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"The rules or agreements that emerged from the communication did not work out well.",9,0,12); + +Page 3-1-02 + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Did the communication have any effect on you?",1,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, I now better understand the dynamics of the fish population. +",2,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, I now better understand the other fishermen in my group.",3,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, I now better understand how to design the strategy.",4,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, I now feel a \x91team spirit\x92 in the group.",5,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, I now appraise the other fishermen in my group differently. Now I think about the others",6,0,13); + +Page 3-1-03 + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What do you think were the effects of the communication on the others?",1,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, the other fishermen in my group better understand the dynamics of the fish population.",2,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, the other fishermen in my group better understand the other fishermen in my group.",3,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, the other fishermen in my group better understand how to design the strategy.",4,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, the other fishermen in my group feel a \x91team spirit\x92 in the group.",5,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Due to the conversation, the other fishermen in my group appraise the other fishermen in my group differently. Now I think about the others",6,0,13); + +Page 3-1-04 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Did the communication lead to some sort of coordination of the fishing?",1,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Did the communication have any form of reference to how to fish or design the strategy?",2,0,13); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Describe in your own words what the (maybe unclear) rule, agreement or other coordination attempt states. + De-scribe how you and the others should act and what would happen, if one does not act in this way. +If you cannot identify any sort of coordination attempt in the communication write \x93no coordination\x94 in the field below. +",3,0,13); + + +Page 3-1-5 + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What is your opinion about the rule that emerged from communication?",1,0,14); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"The rule, agreement or coordination attempt is",2,0,14); + + +Page 3-1-06 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"What will be the effects of the rule?",1,0,15); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How clear is it to you, that you have to fish conforming to this rule, agreement or coordination attempt?",2,0,15); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Do you think the other fishermen understood how they have to act according to this rule? +I think the others",3,0,15); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Will you follow the rule, agreement, or coordination attempt that emerged from communication?",4,0,15); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Do you think, the other fishermen in you group will follow the rule, agreement, or coordination attempt? +I think, the others will",5,0,15); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Considering the effects you expect for following the rule and your expectations of how the +group will follow the rule, do you think the group will do better or worse due to the rule?",6,0,15); + + +Page 3-1-07 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Lessons Learned",1,0,16); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"New understanding of fish dynamics",2,0,16); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"New expectations on how the others of the group will act",3,0,16); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Ideas for improving your strategy",4,0,16); + +Page 4-1-01 +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Some final questions about the experiment.Congratulations! You finished the actual experiment. We want to ask you some final questions.",1,0,17); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How interesting was the experiment for you?",2,0,17); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How would you rate the effort you invested to design your strategy?",3,0,17); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How difficult was it to understand the problem?",4,0,17); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How difficult was it to find a good strategy?",5,0,17); + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"How clear was it what you have to do?",6,0,17); + + +Page 4-2-1 + +insert into question(misc_location,multi_location,question,sequence_no,single_location,question_group_id) +values(0,1,"Would you have acted similarly in these real-world situations as you did in this experiment?",1,0,18); + + + + Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2009-04-14 19:57:10 UTC (rev 97) @@ -1,10 +1,12 @@ package edu.asu.commons.mme.entity; -import java.util.Date; +import java.sql.Timestamp; + import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -12,6 +14,7 @@ import javax.persistence.TemporalType; + @Entity @Table(name="communication") public class Communication { @@ -23,13 +26,15 @@ @Lob private String message; - @Temporal(TemporalType.TIMESTAMP) - private Date timestamp; + private Timestamp timestamp; + @ManyToOne + @JoinColumn(nullable = false) private Student student; @ManyToOne + @JoinColumn(nullable = false) private RoundConfig roundconfig; public void setId(Long id) { @@ -48,11 +53,11 @@ return message; } - public void setTimestamp(Date timestamp) { + public void setTimestamp(Timestamp timestamp) { this.timestamp = timestamp; } - public Date getTimestamp() { + public Timestamp getTimestamp() { return timestamp; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayOutput.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayOutput.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayOutput.java 2009-04-14 19:57:10 UTC (rev 97) @@ -1,9 +1,11 @@ package edu.asu.commons.mme.entity; +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -16,10 +18,13 @@ private Long id; @ManyToOne + @JoinColumn(nullable=false) private StudentStrategy strategy; + @Column(nullable=false) private Integer day; + @Column(nullable=false) private Float earnings; public void setId(Long id) { Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Forecasting.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Forecasting.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Forecasting.java 2009-04-14 19:57:10 UTC (rev 97) @@ -0,0 +1,25 @@ +package edu.asu.commons.mme.entity; + + +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Column; + +@Entity +@Table(name="forecasting") + +public class Forecasting extends Question { + @Column(name="day_no",nullable=false) + private Integer dayNo; + + public void setDayNo(Integer dayNo) { + this.dayNo = dayNo; + } + + public Integer getDayNo() { + return dayNo; + } + + + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/GameConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/GameConfig.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/GameConfig.java 2009-04-14 19:57:10 UTC (rev 97) @@ -1,10 +1,12 @@ package edu.asu.commons.mme.entity; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.Column; +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @@ -15,6 +17,8 @@ import javax.persistence.TemporalType; + + @Entity @Table(name="game") public class GameConfig { @@ -23,14 +27,23 @@ @GeneratedValue private Long id; + @Column(name="no_of_rounds",nullable = false) private Integer noOfRounds; + + @Column(name="no_of_location",nullable = false) private Integer noOfLocation; + + @Column(name="max_days",nullable = false) private Integer maxDays; + + @Column(name="max_fish_harvest",nullable = false) private Integer maxFishHarvest; - @Temporal(TemporalType.DATE) - private Date timestamp; + @Column(nullable=false) + private Timestamp timestamp; + + @Column(nullable=false) private String title; @Lob @@ -74,12 +87,7 @@ public Integer getMax_no_of_days() { return maxDays; } - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - public Date getTimestamp() { - return timestamp; - } + public void setTitle(String title) { this.title = title; } @@ -110,6 +118,13 @@ public List<RoundConfig> getRoundconfig() { return roundconfig; } + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + public Timestamp getTimestamp() { + return timestamp; + } + } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Group.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Group.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Group.java 2009-04-14 19:57:10 UTC (rev 97) @@ -5,6 +5,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -22,10 +23,11 @@ @GeneratedValue private Long id; - @Column(name="grp_no") + @Column(name="grp_no",nullable=false) private Integer no; @ManyToOne + @JoinColumn(nullable = false) private GameConfig game; public Long getId() { Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/LocationConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/LocationConfig.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/LocationConfig.java 2009-04-14 19:57:10 UTC (rev 97) @@ -1,9 +1,13 @@ package edu.asu.commons.mme.entity; +import java.util.Set; + +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import javax.persistence.ManyToOne; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; import javax.persistence.Table; @Entity @@ -14,12 +18,21 @@ @GeneratedValue private Long id; - @ManyToOne - private RoundConfig roundconfig; + @ManyToMany(mappedBy = "locationconfig") + @JoinColumn(nullable =false) + private Set<RoundConfig> roundconfig; + + @Column(nullable =false,name="location_name") private String locationName; + + @Column(nullable =false,name="max_capacity") private Integer maxCapacity; + + @Column(nullable =false,name="growth_Rate", scale=2) private Float growthRate; + + @Column(nullable =false,name="start_population") private Integer startPopulation; public void setId(Long id) { @@ -53,10 +66,10 @@ public Integer getStart_population() { return startPopulation; } - public void setRoundconfig(RoundConfig roundconfig) { + public void setRoundconfig(Set<RoundConfig> roundconfig) { this.roundconfig = roundconfig; } - public RoundConfig getRoundconfig() { + public Set<RoundConfig> getRoundconfig() { return roundconfig; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Psychometric.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Psychometric.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Psychometric.java 2009-04-14 19:57:10 UTC (rev 97) @@ -9,19 +9,18 @@ import javax.persistence.Table; import org.hibernate.annotations.CollectionOfElements; -import org.hibernate.annotations.IndexColumn; @Entity @Table(name="psychometric") public class Psychometric extends Question { + @Column(nullable=false) private String scale; - @Column(name="no_of_intervals") + @Column(name="no_of_intervals",nullable=false) private String intervals; @CollectionOfElements - @IndexColumn(name = "choices", base=1) private List<String> choices; public void setChoices(List<String> choices) { @@ -48,11 +47,4 @@ return scale; } - /*public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - }*/ } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java 2009-04-14 19:57:10 UTC (rev 97) @@ -1,6 +1,8 @@ package edu.asu.commons.mme.entity; +import java.util.Set; + import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -10,6 +12,7 @@ import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; import javax.persistence.Table; @Entity @@ -21,25 +24,26 @@ private Long id; @ManyToOne - @JoinColumn(name="question_group_id", insertable=false, updatable=false) + @JoinColumn(name="question_group_id",nullable=false) private QuestionGroup questionGroup; @Lob + @Column(nullable=false) private String question; - @Column (name="single_location" ) + @Column (name="single_location",nullable=false,columnDefinition="Boolean") private boolean singleLocation; - @Column (name="multi_location" ) + @Column (name="multi_location",nullable=false,columnDefinition="Boolean") private boolean multiLocation; - @Column (name="misc_location" ) + @Column (name="misc_location",nullable=false,columnDefinition="Boolean") private boolean miscLocation; - @Column(name = "sequence_no") + @Column(name = "sequence_no",nullable=false) private Integer sequenceNo; - + public void setId(Long id) { this.id = id; } @@ -96,6 +100,7 @@ public QuestionGroup getQuestionGroup() { return questionGroup; } - + + } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java 2009-04-14 19:57:10 UTC (rev 97) @@ -7,6 +7,8 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.Lob; import javax.persistence.ManyToMany; import javax.persistence.Table; @@ -17,12 +19,16 @@ @GeneratedValue private Long id; - @ManyToMany(mappedBy = "questionGroup") - private Set<RoundConfig> roundConfig; + + @ManyToMany(mappedBy = "questiongroup") + @JoinColumn(nullable=false) + private Set<RoundConfig>roundconfig; - @Column(name = "sequence_no") + @Column(name = "sequence_no",nullable=false) private Integer sequenceNo; + @Lob + private String header_question; public void setId(Long id) { this.id = id; @@ -43,5 +49,11 @@ public Set<RoundConfig> getRoundConfig() { return roundConfig; } + public void setHeader_question(String header_question) { + this.header_question = header_question; + } + public String getHeader_question() { + return header_question; + } } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java 2009-04-14 19:57:10 UTC (rev 97) @@ -4,7 +4,12 @@ import java.util.Set; import javax.persistence.CascadeType; + import javax.persistence.Column; +import javax.persistence.JoinColumn; + +import javax.persistence.Column; + import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; @@ -20,18 +25,25 @@ @GeneratedValue(strategy = GenerationType.AUTO) private Long id; - @Column(name="round_no") + @Column(name="round_no",nullable=false) private Integer roundNo; + @ManyToOne + @JoinColumn(nullable=false) private GameConfig game; - @Column(name="communication_flag") - private Boolean communicationFlag; + + @Column(name="communication_flag",nullable=false,columnDefinition= "Boolean") + private boolean communicationFlag; + @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private Set<QuestionGroup> questionGroup; + @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) + private Set<LocationConfig> locationconfig; + public void setId(Long id) { this.id = id; } @@ -63,6 +75,12 @@ public Set<QuestionGroup> getQuestionGroup() { return questionGroup; } + public void setLocationconfig(Set<LocationConfig> locationconfig) { + this.locationconfig = locationconfig; + } + public Set<LocationConfig> getLocationconfig() { + return locationconfig; + } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java 2009-04-14 19:57:10 UTC (rev 97) @@ -6,6 +6,7 @@ import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -20,9 +21,10 @@ private Long id; @ManyToOne + @JoinColumn(nullable=false) private Group group; - @Column(name="student_no") + @Column(name="student_no",nullable = false) private Integer studentNo; @Column(name="year_birth",length = 4) Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentResponse.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentResponse.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentResponse.java 2009-04-14 19:57:10 UTC (rev 97) @@ -0,0 +1,63 @@ +package edu.asu.commons.mme.entity; + + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.Lob; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name="student_response") +public class StudentResponse { + + @Id + @GeneratedValue + private Long id; + + @ManyToOne + @JoinColumn(nullable=false, name="student_id") + private Student student; + + @ManyToOne + @JoinColumn(nullable=false) + private Question question; + + @Lob + private String response; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setStudent(Student student) { + this.student = student; + } + + public Student getStudent() { + return student; + } + + public void setQuestion(Question question) { + this.question = question; + } + + public Question getQuestion() { + return question; + } + + public void setResponse(String response) { + this.response = response; + } + + public String getResponse() { + return response; + } + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java 2009-04-14 19:57:10 UTC (rev 97) @@ -4,6 +4,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -20,15 +21,17 @@ private Long id; @ManyToOne + @JoinColumn(nullable = false) private Student student; @ManyToOne + @JoinColumn(nullable = false) private RoundConfig roundconfig; - @Column(name="current_allocation_no") + @Column(name="current_allocation_no", nullable=false) private Integer currentAllocationNo; - @Column(name="current_day_no") + @Column(name="current_day_no",nullable=false) private Integer currentDayNo; public void setId(Long id) { Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-04-14 19:57:10 UTC (rev 97) @@ -7,6 +7,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; @@ -24,23 +25,28 @@ @ManyToOne + @JoinColumn(nullable=false) private RoundConfig roundconfig; - @Column(name = "allocation_sequence_no") + @Column(name = "allocation_sequence_no",nullable=false) private Integer allocationSeqNo; + @Column(nullable=false) private Integer days; + @Column(nullable=false) private Float threshold; @ManyToOne + @JoinColumn(nullable=false) private LocationConfig location; - @Column (name="repeated_decisions") + @Column (name="repeated_decisions",columnDefinition="Boolean", nullable=false) private boolean repeatedDecisions; @OneToMany + @JoinColumn(nullable=false) private List<DayOutput> dayOutput; Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java 2009-04-14 19:57:10 UTC (rev 97) @@ -5,6 +5,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @@ -18,15 +19,17 @@ @ManyToOne + @JoinColumn(nullable=false) private RoundConfig roundconfig; @ManyToOne + @JoinColumn(nullable=false) private Student student; - @Column(name="harbor_days") + @Column(name="harbor_days",nullable=false) private Integer harborDays; - @Column(name="fishing_threshold") + @Column(name="fishing_threshold",nullable=false) private Float fishingThreshold; public void setId(Long id) { Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-04-10 21:44:32 UTC (rev 96) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-04-14 19:57:10 UTC (rev 97) @@ -21,12 +21,15 @@ <mapping class='edu.asu.commons.mme.entity.QuestionGroup'/> <mapping class='edu.asu.commons.mme.entity.Question'/> - <mapping class='edu.asu.commons.mme.entity.Psychometric'/> + + <mapping class='edu.asu.commons.mme.entity.Categorical'/> + <mapping class='edu.asu.commons.mme.entity.Psychometric'/> + <mapping class='edu.asu.commons.mme.entity.StudentResponse'/> + - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |