[virtualcommons-svn] SF.net SVN: virtualcommons:[194] mentalmodels/trunk/src/main
Status: Beta
Brought to you by:
alllee
From: <see...@us...> - 2009-07-22 01:13:46
|
Revision: 194 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=194&view=rev Author: seematalele Date: 2009-07-22 01:13:40 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Created CommunicationQ variable in Question which will indicate that this question should be displayed in communication, Renamed the name of the .java file from RoundConfig.java to Round.java Created a new entity ModuleRoundConfig.java which will keep track of which modules need to display which round according to sequence number. Updated init-mme.sql Modified Paths: -------------- mentalmodels/trunk/src/main/db/init-mme.sql mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.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/java/edu/asu/commons/mme/service/QuestionCreatorService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java Removed Paths: ------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-22 01:13:40 UTC (rev 194) @@ -15,25 +15,7 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; --- --- Table structure for table `block` --- -DROP TABLE IF EXISTS `block`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `block` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` varchar(255) NOT NULL, - `duration` int(11) NOT NULL, - `sequence_no` int(11) NOT NULL, - `module_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK597C48D4D4A8AF3` (`module_id`), - CONSTRAINT `FK597C48D4D4A8AF3` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Dumping data for table `block` -- @@ -48,15 +30,6 @@ -- Table structure for table `categorical_option` -- -DROP TABLE IF EXISTS `categorical_option`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_option` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `optionKey` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option` @@ -72,16 +45,6 @@ -- Table structure for table `categorical_option_choices` -- -DROP TABLE IF EXISTS `categorical_option_choices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_option_choices` ( - `categorical_option_id` bigint(20) NOT NULL, - `element` varchar(255) DEFAULT NULL, - KEY `FKA2D77727CC2EF222` (`categorical_option_id`), - CONSTRAINT `FKA2D77727CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option_choices` @@ -97,18 +60,6 @@ -- Table structure for table `categorical_options_pivot` -- -DROP TABLE IF EXISTS `categorical_options_pivot`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_options_pivot` ( - `categorical_question_id` bigint(20) NOT NULL, - `categorical_option_id` bigint(20) NOT NULL, - KEY `FK315C55828A4F6E82` (`categorical_question_id`), - KEY `FK315C5582CC2EF222` (`categorical_option_id`), - CONSTRAINT `FK315C55828A4F6E82` FOREIGN KEY (`categorical_question_id`) REFERENCES `categorical_question` (`id`), - CONSTRAINT `FK315C5582CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_options_pivot` @@ -124,16 +75,6 @@ -- Table structure for table `categorical_question` -- -DROP TABLE IF EXISTS `categorical_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_question` ( - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKB9D69D254A96BF7A` (`id`), - CONSTRAINT `FKB9D69D254A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_question` @@ -149,22 +90,6 @@ -- Table structure for table `communication` -- -DROP TABLE IF EXISTS `communication`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `communication` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `message` longtext, - `timestamp` datetime DEFAULT NULL, - `roundConfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKC24ACFD63A5846C1` (`roundConfig_id`), - KEY `FKC24ACFD6992B5A41` (`student_id`), - CONSTRAINT `FKC24ACFD63A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKC24ACFD6992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `communication` @@ -179,17 +104,6 @@ -- Table structure for table `forecasting_question` -- -DROP TABLE IF EXISTS `forecasting_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `forecasting_question` ( - `day_no` int(11) NOT NULL, - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKD0793D1E4A96BF7A` (`id`), - CONSTRAINT `FKD0793D1E4A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `forecasting_question` @@ -204,23 +118,6 @@ -- Table structure for table `game` -- -DROP TABLE IF EXISTS `game`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `game` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` longtext, - `image_location` varchar(255) DEFAULT NULL, - `max_days` int(11) NOT NULL, - `max_fish_harvest` int(11) NOT NULL, - `money` double DEFAULT NULL, - `no_of_locations` int(11) NOT NULL, - `no_of_rounds` int(11) NOT NULL, - `timestamp` datetime NOT NULL, - `title` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `game` @@ -236,18 +133,6 @@ -- Table structure for table `grp` -- -DROP TABLE IF EXISTS `grp`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `grp` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `grp_number` int(11) NOT NULL, - `game_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK190E57AC42F73` (`game_id`), - CONSTRAINT `FK190E57AC42F73` FOREIGN KEY (`game_id`) REFERENCES `game` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `grp` @@ -262,18 +147,6 @@ -- Table structure for table `location` -- -DROP TABLE IF EXISTS `location`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `location` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `growth_rate` double NOT NULL, - `initial_population` int(11) NOT NULL, - `location_name` varchar(255) NOT NULL, - `max_capacity` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location` @@ -289,19 +162,6 @@ -- Table structure for table `location_round_config` -- -DROP TABLE IF EXISTS `location_round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `location_round_config` ( - `location_id` bigint(20) NOT NULL, - `roundConfigs_id` bigint(20) NOT NULL, - PRIMARY KEY (`location_id`,`roundConfigs_id`), - KEY `FK979C4B5D224FD013` (`location_id`), - KEY `FK979C4B5D1D9C6C0E` (`roundConfigs_id`), - CONSTRAINT `FK979C4B5D1D9C6C0E` FOREIGN KEY (`roundConfigs_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FK979C4B5D224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location_round_config` @@ -317,17 +177,6 @@ -- Table structure for table `module` -- -DROP TABLE IF EXISTS `module`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `module` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` varchar(255) NOT NULL, - `duration` int(11) NOT NULL, - `sequence_no` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `module` @@ -339,22 +188,22 @@ /*!40000 ALTER TABLE `module` ENABLE KEYS */; UNLOCK TABLES; + -- +-- Dumping data for table `module_round_config` +-- + +LOCK TABLES `module_round_config` WRITE; +/*!40000 ALTER TABLE `module_round_config` DISABLE KEYS */; +INSERT INTO `module_round_config` VALUES (1,1,2,1),(2,1,3,2),(3,2,2,2); +/*!40000 ALTER TABLE `module_round_config` ENABLE KEYS */; +UNLOCK TABLES; + + +-- -- Table structure for table `psychometric_question` -- -DROP TABLE IF EXISTS `psychometric_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `psychometric_question` ( - `max_slider_value` int(11) NOT NULL, - `scale` varchar(255) NOT NULL, - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK87559D014A96BF7A` (`id`), - CONSTRAINT `FK87559D014A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `psychometric_question` @@ -370,17 +219,6 @@ -- Table structure for table `psychometric_question_choices` -- -DROP TABLE IF EXISTS `psychometric_question_choices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `psychometric_question_choices` ( - `psychometric_question_id` bigint(20) NOT NULL, - `element` varchar(255) DEFAULT NULL, - KEY `FKA80B09B4FBB83ADC` (`psychometric_question_id`), - CONSTRAINT `FKA80B09B4FBB83ADC` FOREIGN KEY (`psychometric_question_id`) REFERENCES `psychometric_question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Dumping data for table `psychometric_question_choices` -- @@ -395,20 +233,6 @@ -- Table structure for table `question` -- -DROP TABLE IF EXISTS `question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `question` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `question` longtext NOT NULL, - `sequence_no` int(11) NOT NULL, - `type` varchar(255) NOT NULL, - `question_group_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKBA823BE6CA626674` (`question_group_id`), - CONSTRAINT `FKBA823BE6CA626674` FOREIGN KEY (`question_group_id`) REFERENCES `question_group` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question` @@ -416,7 +240,7 @@ LOCK TABLES `question` WRITE; /*!40000 ALTER TABLE `question` DISABLE KEYS */; -INSERT INTO `question` VALUES (1,'Most important goal:',1,'categorical',10),(2,'Second most important goal:',2,'categorical',10),(3,'Third most important goal:',4,'categorical',10),(4,'Compared to the most important goal, this goal is',3,'psychometric',10),(6,'',1,'daybydaydecisions',6),(7,'An example of a scale would be',1,'psychometric',11),(8,'<ul>\r<li>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?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',12),(9,'Compared to the most important goal, this goal is',5,'psychometric',10),(10,'<b>Most important goal:</b>',1,'categorical',13),(11,'<b>Second most important goal:</b>',2,'categorical',13),(12,'Compared to the most important goal, this goal is',3,'psychometric',13),(13,'<b>Third most important goal:</b>',4,'categorical',13),(14,'Compared to the most important goal, this goal is',5,'psychometric',13),(15,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',14),(16,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',14),(17,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',14),(18,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',14),(19,'Do you perceive the group as a team or as competing players?',5,'psychometric',14),(20,'How much do you trust the others in your group?',1,'psychometric',15),(21,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',15),(22,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',15),(23,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',15),(24,'How much do you think the others are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',15),(25,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',16),(26,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',16),(27,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',16),(28,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',16),(29,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',16),(30,'How well did you understand the dynamics of the fish population?',1,'psychometric',17),(31,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',17),(32,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',17),(33,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',17),(34,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',17),(35,'',1,'forecastingfishermen',18),(36,'',1,'forecastingfish',19),(37,'',1,'strategydesign',9),(38,'',1,'strategydesign',22),(39,'',1,'daybydaydecisions',24); +INSERT INTO `question` VALUES (1,0,'Most important goal:',1,'categorical',10),(2,0,'Second most important goal:',2,'categorical',10),(3,0,'Third most important goal:',4,'categorical',10),(4,0,'Compared to the most important goal, this goal is',3,'psychometric',10),(6,0,'',1,'daybydaydecisions',6),(7,0,'An example of a scale would be',1,'psychometric',11),(8,0,'<ul>\r<li>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?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',12),(9,0,'Compared to the most important goal, this goal is',5,'psychometric',10),(10,0,'<b>Most important goal:</b>',1,'categorical',13),(11,0,'<b>Second most important goal:</b>',2,'categorical',13),(12,0,'Compared to the most important goal, this goal is',3,'psychometric',13),(13,0,'<b>Third most important goal:</b>',4,'categorical',13),(14,0,'Compared to the most important goal, this goal is',5,'psychometric',13),(15,0,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',14),(16,0,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',14),(17,0,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',14),(18,0,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',14),(19,0,'Do you perceive the group as a team or as competing players?',5,'psychometric',14),(20,0,'How much do you trust the others in your group?',1,'psychometric',15),(21,0,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',15),(22,0,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',15),(23,1,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',15),(24,1,'How much do you think <i>the others</i> are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',15),(25,0,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',16),(26,0,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',16),(27,0,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',16),(28,0,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',16),(29,0,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',16),(30,0,'How well did you understand the dynamics of the fish population?',1,'psychometric',17),(31,0,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',17),(32,0,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',17),(33,0,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',17),(34,0,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',17),(35,0,'',1,'forecastingfishermen',18),(36,0,'',1,'forecastingfish',19),(37,0,'',1,'strategydesign',9),(38,0,'',1,'strategydesign',22),(39,0,'',1,'daybydaydecisions',24); /*!40000 ALTER TABLE `question` ENABLE KEYS */; UNLOCK TABLES; @@ -424,21 +248,6 @@ -- Table structure for table `question_group` -- -DROP TABLE IF EXISTS `question_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `question_group` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` longtext, - `duration` int(11) NOT NULL, - `header` longtext, - `sequence_no` int(11) NOT NULL, - `block_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK8F8090E61F51CEC1` (`block_id`), - CONSTRAINT `FK8F8090E61F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question_group` @@ -454,22 +263,6 @@ -- Table structure for table `round_config` -- -DROP TABLE IF EXISTS `round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `communication_flag` bit(1) NOT NULL, - `round_no` int(11) NOT NULL, - `game_id` bigint(20) DEFAULT NULL, - `round_configs_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK3BE293137AC42F73` (`game_id`), - KEY `FK3BE293131A0F70E5` (`round_configs_id`), - CONSTRAINT `FK3BE293131A0F70E5` FOREIGN KEY (`round_configs_id`) REFERENCES `game` (`id`), - CONSTRAINT `FK3BE293137AC42F73` FOREIGN KEY (`game_id`) REFERENCES `game` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `round_config` @@ -477,7 +270,7 @@ LOCK TABLES `round_config` WRITE; /*!40000 ALTER TABLE `round_config` DISABLE KEYS */; -INSERT INTO `round_config` VALUES (1,'\0',1,1,NULL),(2,'',2,1,NULL); +INSERT INTO `round_config` VALUES (1,false,1,1,NULL),(2,true,2,1,NULL); /*!40000 ALTER TABLE `round_config` ENABLE KEYS */; UNLOCK TABLES; @@ -485,19 +278,6 @@ -- Table structure for table `round_config_location` -- -DROP TABLE IF EXISTS `round_config_location`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config_location` ( - `round_config_id` bigint(20) NOT NULL, - `locations_id` bigint(20) NOT NULL, - PRIMARY KEY (`round_config_id`,`locations_id`), - KEY `FKC67B0361FDF88BCA` (`locations_id`), - KEY `FKC67B0361634CAB1E` (`round_config_id`), - CONSTRAINT `FKC67B0361634CAB1E` FOREIGN KEY (`round_config_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKC67B0361FDF88BCA` FOREIGN KEY (`locations_id`) REFERENCES `location` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `round_config_location` @@ -509,54 +289,11 @@ /*!40000 ALTER TABLE `round_config_location` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `round_config_question_group` --- -DROP TABLE IF EXISTS `round_config_question_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config_question_group` ( - `round_config_id` bigint(20) NOT NULL, - `questionGroups_id` bigint(20) NOT NULL, - PRIMARY KEY (`round_config_id`,`questionGroups_id`), - KEY `FKAC0583924E7815A0` (`questionGroups_id`), - KEY `FKAC058392634CAB1E` (`round_config_id`), - CONSTRAINT `FKAC0583924E7815A0` FOREIGN KEY (`questionGroups_id`) REFERENCES `question_group` (`id`), - CONSTRAINT `FKAC058392634CAB1E` FOREIGN KEY (`round_config_id`) REFERENCES `round_config` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- --- Dumping data for table `round_config_question_group` --- - -LOCK TABLES `round_config_question_group` WRITE; -/*!40000 ALTER TABLE `round_config_question_group` DISABLE KEYS */; -/*!40000 ALTER TABLE `round_config_question_group` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `student` -- -DROP TABLE IF EXISTS `student`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `birth_year` int(11) DEFAULT NULL, - `gender` int(11) DEFAULT NULL, - `major` varchar(255) DEFAULT NULL, - `semester` varchar(255) DEFAULT NULL, - `student_no` int(11) DEFAULT NULL, - `timestamp` datetime DEFAULT NULL, - `group_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK8FFE823B65663181` (`group_id`), - CONSTRAINT `FK8FFE823B65663181` FOREIGN KEY (`group_id`) REFERENCES `grp` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student` @@ -571,22 +308,6 @@ -- Table structure for table `student_day_output` -- -DROP TABLE IF EXISTS `student_day_output`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_day_output` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `day` int(11) NOT NULL, - `earnings` double NOT NULL, - `strategy_id` bigint(20) NOT NULL, - `dayOutput_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK7B993B8846861732` (`dayOutput_id`), - KEY `FK7B993B888374539C` (`strategy_id`), - CONSTRAINT `FK7B993B8846861732` FOREIGN KEY (`dayOutput_id`) REFERENCES `student_strategy` (`id`), - CONSTRAINT `FK7B993B888374539C` FOREIGN KEY (`strategy_id`) REFERENCES `student_strategy` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_day_output` @@ -601,21 +322,6 @@ -- Table structure for table `student_response` -- -DROP TABLE IF EXISTS `student_response`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_response` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `response` longtext, - `question_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK173D15C5992B5A41` (`student_id`), - KEY `FK173D15C584109673` (`question_id`), - CONSTRAINT `FK173D15C584109673` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`), - CONSTRAINT `FK173D15C5992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_response` @@ -630,22 +336,6 @@ -- Table structure for table `student_round_config` -- -DROP TABLE IF EXISTS `student_round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_round_config` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `current_allocation_no` int(11) NOT NULL, - `current_day_no` int(11) NOT NULL, - `roundconfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK49C432973A5846C1` (`roundconfig_id`), - KEY `FK49C43297992B5A41` (`student_id`), - CONSTRAINT `FK49C432973A5846C1` FOREIGN KEY (`roundconfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FK49C43297992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_round_config` @@ -660,24 +350,6 @@ -- Table structure for table `student_strategy` -- -DROP TABLE IF EXISTS `student_strategy`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_strategy` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `allocation_sequence_no` int(11) NOT NULL, - `days` int(11) NOT NULL, - `repeated_decisions` tinyint(1) NOT NULL, - `threshold` double NOT NULL, - `location_id` bigint(20) NOT NULL, - `roundConfig_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK9615A4F73A5846C1` (`roundConfig_id`), - KEY `FK9615A4F7224FD013` (`location_id`), - CONSTRAINT `FK9615A4F7224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`), - CONSTRAINT `FK9615A4F73A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_strategy` @@ -692,22 +364,6 @@ -- Table structure for table `suspend_repetition` -- -DROP TABLE IF EXISTS `suspend_repetition`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `suspend_repetition` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `days_in_harbor` int(11) NOT NULL, - `fishing_threshold` float NOT NULL, - `roundConfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKFBDC4543A5846C1` (`roundConfig_id`), - KEY `FKFBDC454992B5A41` (`student_id`), - CONSTRAINT `FKFBDC4543A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKFBDC454992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `suspend_repetition` Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java 2009-07-22 01:13:40 UTC (rev 194) @@ -1,13 +1,13 @@ package edu.asu.commons.mme.dao; -import edu.asu.commons.mme.entity.RoundConfig; +import edu.asu.commons.mme.entity.Round; -public class HibernateRoundConfigDao extends HibernateDao<RoundConfig> { +public class HibernateRoundConfigDao extends HibernateDao<Round> { public HibernateRoundConfigDao() { - super(RoundConfig.class); + super(Round.class); } } 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2009-07-22 01:13:40 UTC (rev 194) @@ -36,7 +36,7 @@ @ManyToOne @JoinColumn(nullable = false) - private RoundConfig roundConfig; + private Round round; public void setId(Long id) { this.id = id; @@ -62,12 +62,12 @@ return timestamp; } - public void setRoundConfig(RoundConfig roundconfig) { - this.roundConfig = roundconfig; + public void setRound(Round round) { + this.round = round; } - public RoundConfig getRoundConfig() { - return roundConfig; + public Round getRound() { + return round; } public void setStudent(Student student) { Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java 2009-07-22 01:13:40 UTC (rev 194) @@ -52,8 +52,8 @@ // FIXME: should this be many-to-many instead? @OneToMany - @JoinColumn(name="round_configs_id") - private List<RoundConfig> roundConfigs; + @JoinColumn(name="rounds_id") + private List<Round> rounds; public void setId(Long id) { this.id = id; @@ -82,11 +82,11 @@ return money; } - public void setRoundconfig(List<RoundConfig> roundconfig) { - this.roundConfigs = roundconfig; + public void setRoundconfig(List<Round> roundconfig) { + this.rounds = roundconfig; } - public List<RoundConfig> getRoundconfig() { - return roundConfigs; + public List<Round> getRoundconfig() { + return rounds; } public void setTimestamp(Timestamp timestamp) { this.timestamp = timestamp; @@ -124,11 +124,11 @@ public void setImageLocation(String imageLocation) { this.imageLocation = imageLocation; } - public List<RoundConfig> getRoundConfigs() { - return roundConfigs; + public List<Round> getRounds() { + return rounds; } - public void setRoundConfigs(List<RoundConfig> roundConfig) { - this.roundConfigs = roundConfig; + public void setRounds(List<Round> rounds) { + this.rounds = rounds; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java 2009-07-22 01:13:40 UTC (rev 194) @@ -22,8 +22,8 @@ private Long id; @ManyToMany - @JoinColumn(name="round_configs_id") - private Set<RoundConfig> roundConfigs; + @JoinColumn(name="rounds_id") + private Set<Round> rounds; @Column(nullable=false,name="location_name") private String locationName; @@ -44,12 +44,7 @@ return id; } - public void setRoundConfigs(Set<RoundConfig> roundconfig) { - this.roundConfigs = roundconfig; - } - public Set<RoundConfig> getRoundConfigs() { - return roundConfigs; - } + public Double getGrowthRate() { return growthRate; } @@ -74,5 +69,11 @@ public void setInitialPopulation(Integer initialPopulation) { this.initialPopulation = initialPopulation; } + public void setRounds(Set<Round> rounds) { + this.rounds = rounds; + } + public Set<Round> getRounds() { + return rounds; + } } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java 2009-07-22 01:13:40 UTC (rev 194) @@ -3,12 +3,16 @@ import java.io.Serializable; import java.util.List; +import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; @@ -42,12 +46,13 @@ @Column(nullable=false) private Integer duration; - + /*@ManyToOne + private ModuleRoundConfig module_config;*/ + @OneToMany(mappedBy="module") @OrderBy("sequenceNo") private List<Block> blocks; - public void setId(Long id) { this.id = id; } @@ -80,7 +85,6 @@ return blocks; } - public void setDuration(Integer duration) { this.duration = duration; } @@ -88,6 +92,13 @@ public Integer getDuration() { return duration; } + + /*public void setModule_config(ModuleRoundConfig module_config) { + this.module_config = module_config; + } + + public ModuleRoundConfig getModule_config() { + return module_config; + }*/ - } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -0,0 +1,74 @@ +package edu.asu.commons.mme.entity; + +import java.io.Serializable; +import java.util.List; + +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.OneToMany; +import javax.persistence.OrderBy; +import javax.persistence.Table; + + +@Entity +@Table(name="module_round_config") +public class ModuleRoundConfig implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1523640426012601246L; + + @Id + @GeneratedValue + private Long id; + + @Column(name="sequence_no",nullable=false) + private Integer sequenceNo; + + @ManyToOne + @JoinColumn(nullable = false) + private Module module; + + @ManyToOne + @JoinColumn(nullable = false) + private Round round; + + + public void setSequenceNo(Integer sequenceNo) { + this.sequenceNo = sequenceNo; + } + + public Integer getSequenceNo() { + return sequenceNo; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setModule(Module module) { + this.module = module; + } + + public Module getModule() { + return module; + } + + public void setRound(Round round) { + this.round = round; + } + + public Round getRound() { + return round; + } + +} 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java 2009-07-22 01:13:40 UTC (rev 194) @@ -32,6 +32,9 @@ @Lob @Column(nullable=false) private String question; + + @Column(nullable = true, columnDefinition="Boolean default false") + private boolean communicationQ; @Column(name = "sequence_no",nullable=false) private Integer sequenceNo; @@ -86,6 +89,14 @@ return type; } + public void setCommunicationQ(boolean communicationQ) { + this.communicationQ = communicationQ; + } + + public boolean isCommunicationQ() { + return communicationQ; + } + } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java 2009-07-22 01:13:40 UTC (rev 194) @@ -0,0 +1,81 @@ +package edu.asu.commons.mme.entity; + + +import java.io.Serializable; +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name="round_config") +public class Round implements Serializable { + + private static final long serialVersionUID = 8112076402732581224L; + + @Id + @GeneratedValue + private Long id; + + @Column(name="round_no",nullable=false) + private Integer roundNo; + + @ManyToOne + private Game game; + + @Column(name="communication_flag",nullable=false,columnDefinition="Boolean default false") + private boolean communicationFlag; + + /*@ManyToOne + private ModuleRoundConfig round_config;*/ + + + @ManyToMany + private Set<Location> locations; + + public void setId(Long id) { + this.id = id; + } + public Long getId() { + return id; + } + public void setRoundNo(Integer roundNo) { + this.roundNo = roundNo; + } + public Integer getRoundNo() { + return roundNo; + } + + public void setCommunicationFlag(boolean communication_flag) { + this.communicationFlag = communication_flag; + } + public boolean getCommunicationFlag() { + return communicationFlag; + } + public void setGame(Game game) { + this.game = game; + } + public Game getGame() { + return game; + } + + public Set<Location> getLocations() { + return locations; + } + public void setLocations(Set<Location> locations) { + this.locations = locations; + } + /*public void setRound_config(ModuleRoundConfig round_config) { + this.round_config = round_config; + } + public ModuleRoundConfig getRound_config() { + return round_config; + }*/ + +} Deleted: 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -1,83 +0,0 @@ -package edu.asu.commons.mme.entity; - - -import java.io.Serializable; -import java.util.Set; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -@Entity -@Table(name="round_config") -public class RoundConfig implements Serializable { - - private static final long serialVersionUID = 8112076402732581224L; - - @Id - @GeneratedValue - private Long id; - - @Column(name="round_no",nullable=false) - private Integer roundNo; - - @ManyToOne - private Game game; - - @Column(name="communication_flag",nullable=false) - private boolean communicationFlag; - - @ManyToMany - private Set<QuestionGroup> questionGroups; - - @ManyToMany - private Set<Location> locations; - - public void setId(Long id) { - this.id = id; - } - public Long getId() { - return id; - } - public void setRoundNo(Integer roundNo) { - this.roundNo = roundNo; - } - public Integer getRoundNo() { - return roundNo; - } - - public void setCommunicationFlag(boolean communication_flag) { - this.communicationFlag = communication_flag; - } - public boolean getCommunicationFlag() { - return communicationFlag; - } - public void setGame(Game game) { - this.game = game; - } - public Game getGame() { - return game; - } - /*public void setModule(Set<Module> module) { - this.module = module; - } - public Set<Module> getModule() { - return module; - }*/ - public Set<Location> getLocations() { - return locations; - } - public void setLocations(Set<Location> locations) { - this.locations = locations; - } - public void setQuestionGroups(Set<QuestionGroup> questionGroups) { - this.questionGroups = questionGroups; - } - public Set<QuestionGroup> getQuestionGroups() { - return questionGroups; - } -} 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -29,7 +29,7 @@ @ManyToOne @JoinColumn(nullable = false) - private RoundConfig roundconfig; + private Round roundconfig; @Column(name="current_allocation_no", nullable=false) private Integer currentAllocationNo; @@ -53,11 +53,11 @@ return student; } - public void setRoundconfig(RoundConfig roundconfig) { + public void setRoundconfig(Round roundconfig) { this.roundconfig = roundconfig; } - public RoundConfig getRoundconfig() { + public Round getRoundconfig() { return roundconfig; } 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-22 01:13:40 UTC (rev 194) @@ -29,7 +29,7 @@ @ManyToOne @JoinColumn(nullable=false) - private RoundConfig roundConfig; + private Round roundConfig; @Column(name = "allocation_sequence_no",nullable=false) public Integer allocationSeqNo; @@ -93,11 +93,11 @@ return repeatedDecisions; } - public void setRoundConfig(RoundConfig roundConfig) { + public void setRoundConfig(Round roundConfig) { this.roundConfig = roundConfig; } - public RoundConfig getRoundConfig() { + public Round getRoundConfig() { return roundConfig; } 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-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java 2009-07-22 01:13:40 UTC (rev 194) @@ -24,7 +24,7 @@ @ManyToOne @JoinColumn(nullable=false) - private RoundConfig roundConfig; + private Round roundConfig; @ManyToOne @JoinColumn(nullable=false) @@ -60,11 +60,11 @@ return fishingThreshold; } - public void setRoundConfig(RoundConfig roundconfig) { + public void setRoundConfig(Round roundconfig) { this.roundConfig = roundconfig; } - public RoundConfig getRoundConfig() { + public Round getRoundConfig() { return roundConfig; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -5,6 +5,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Set; import org.hibernate.Hibernate; import org.springframework.transaction.annotation.Transactional; @@ -22,6 +23,7 @@ import edu.asu.commons.mme.entity.PsychometricQuestion; import edu.asu.commons.mme.entity.Question; import edu.asu.commons.mme.entity.QuestionGroup; +import edu.asu.commons.mme.entity.Round; /** @@ -65,8 +67,8 @@ Module module = modulelist.get(i); Hibernate.initialize(module); getLogger().debug("Module object is " + module.getDescription()); - - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -93,7 +95,7 @@ } } - } + }*/ } /* * @@ -142,8 +144,8 @@ module = moduleDao.findByProperty("id", id); Hibernate.initialize(module); - - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -170,7 +172,7 @@ } } - } + }*/ if( module != null) { module.setSequenceNo(sequenceNo); @@ -196,7 +198,8 @@ module = moduleDao.find(module_Id); Hibernate.initialize(module); - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -223,7 +226,7 @@ } } - } + }*/ if(currentblock != null) { currentblock.setModule(module); @@ -268,7 +271,8 @@ block.setDuration(duration); module = moduleDao.find(module_Id); Hibernate.initialize(module); - List<Block> listBlock = module.getBlocks(); + initializeModule(module); + /*List<Block> listBlock = module.getBlocks(); Iterator<Block> iterateBlock = listBlock.iterator(); while(iterateBlock.hasNext()) { @@ -296,7 +300,7 @@ } } - } + }*/ block.setModule(module); blockDao.save(block); getLogger().debug("block is updated with Id: " + block.getId()); @@ -316,7 +320,8 @@ Hibernate.initialize(block); module = block.getModule(); Hibernate.initialize(module); - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -343,7 +348,7 @@ } } - } + }*/ questionGroup.setBlock(block); questionGroupDao.save(questionGroup); getLogger().debug("QuestionGroup is created with Id: " + questionGroup.getId()); @@ -439,6 +444,7 @@ psychometricQ.setSequenceNo(psychometric.getSequenceNo()); psychometricQ.setQuestion(psychometric.getQuestion()); psychometricQ.setType(psychometric.getType().toLowerCase()); + psychometricQ.setCommunicationQ(psychometric.isCommunicationQ()); getLogger().debug("Scale: " + psychometric.getScale()); @@ -494,7 +500,11 @@ categoricalQ.setQuestion(categoricalInfo.getQuestion()); categoricalQ.setSequenceNo(categoricalInfo.getSequenceNo()); categoricalQ.setType(categoricalInfo.getType().toLowerCase()); + /*Set<Round> round_configs = categoricalInfo.getRound_configs(); + categoricalQ.setRound_configs(round_configs);*/ + categoricalQ.setCommunicationQ(categoricalInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroup_id); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -521,7 +531,9 @@ question.setQuestion(otherTypeQuestionInfo.getQuestion()); question.setSequenceNo(otherTypeQuestionInfo.getSequenceNo()); question.setType(otherTypeQuestionInfo.getType().toLowerCase()); + question.setCommunicationQ(otherTypeQuestionInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroup_id); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -560,6 +572,7 @@ psychometricQ.setSequenceNo(psychometric.getSequenceNo()); psychometricQ.setQuestion(psychometric.getQuestion()); psychometricQ.setType(psychometric.getType().toLowerCase()); + psychometricQ.setCommunicationQ(psychometric.isCommunicationQ()); getLogger().debug("Scale: " + psychometric.getScale()); @@ -618,7 +631,9 @@ categoricalQ.setQuestion(categoricalInfo.getQuestion()); categoricalQ.setSequenceNo(categoricalInfo.getSequenceNo()); categoricalQ.setType(categoricalInfo.getType().toLowerCase()); + categoricalQ.setCommunicationQ(categoricalInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroupId); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -653,7 +668,9 @@ question.setQuestion(otherTypeQuestionInfo.getQuestion()); question.setSequenceNo(otherTypeQuestionInfo.getSequenceNo()); question.setType(otherTypeQuestionInfo.getType().toLowerCase()); + question.setCommunicationQ(otherTypeQuestionInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroupId); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -2,9 +2,9 @@ import edu.asu.commons.mme.dao.HibernateRoundConfigDao; import edu.asu.commons.mme.entity.Module; -import edu.asu.commons.mme.entity.RoundConfig; +import edu.asu.commons.mme.entity.Round; -public class RoundService extends Service.Base<RoundConfig, HibernateRoundConfigDao> { +public class RoundService extends Service.Base<Round, HibernateRoundConfigDao> { private ModuleService moduleService; Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -39,7 +39,7 @@ public Module getFirstModule() { - studentService.formGroups(); + //studentService.formGroups(); return moduleService.getModule(1); } Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 01:13:40 UTC (rev 194) @@ -8,7 +8,7 @@ <hibernate-configuration> <session-factory> <mapping class='edu.asu.commons.mme.entity.Game'/> - <mapping class='edu.asu.commons.mme.entity.RoundConfig'/> + <mapping class='edu.asu.commons.mme.entity.Round'/> <mapping class='edu.asu.commons.mme.entity.Location'/> <mapping class='edu.asu.commons.mme.entity.Communication'/> <mapping class='edu.asu.commons.mme.entity.Group'/> @@ -31,7 +31,8 @@ <mapping class='edu.asu.commons.mme.entity.StudentResponse'/> <mapping class='edu.asu.commons.mme.entity.Module'/> - <mapping class='edu.asu.commons.mme.entity.Block'/> + <mapping class='edu.asu.commons.mme.entity.Block'/> + <mapping class='edu.asu.commons.mme.entity.ModuleRoundConfig'/> </session-factory> </hibernate-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |