org.openfjord.business.entities
Class SurveyElementVOFactory

java.lang.Object
  |
  +--org.openfjord.business.entities.SurveyElementVOFactory

public class SurveyElementVOFactory
extends java.lang.Object

Title: openFJORD

Description: open Flexible Java Online Research Designer

Copyright: Michael Lange

Company: University of Muenster

Version:
1.0



Questions:
1. do we need the canContain attribute in SurveyElementContainer

Author:
Michael Lange

Method Summary
static SurveyElement createValueObject(SurveyElementBean surveyElementBean)
          Creates an Value Object of the correct Type from the given Survey Element Entity Bean.
static void mergeData(SurveyElement surveyElementVO, SurveyElementBean surveyElementBean)
          This method will merge the data defined by the value object into the SurveyElementBean and the QuestionBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createValueObject

public static SurveyElement createValueObject(SurveyElementBean surveyElementBean)
Creates an Value Object of the correct Type from the given Survey Element Entity Bean. The relations are set by the VO Assembler. Possible Types are

PARAGRAPH = 1
SURVEYHEADER = 2
SURVEYFOOTER = 3
TEXTELEMENT = 4
QUESTION = 5
CARDINALQUESTION = 6
ORDINALQUESTION = 7
NOMINALQUESTION = 8

Parameters:
surveyElementBean - the bean reference
Returns:
SurveyElement the VO

mergeData

public static void mergeData(SurveyElement surveyElementVO,
                             SurveyElementBean surveyElementBean)
This method will merge the data defined by the value object into the SurveyElementBean and the QuestionBean. The Bean itself is created by the SurveyElementFactory, which creates or searches the Bean with the right PK. When the VO is an instance of a question, the QuestionBean is also created by the SurveyElementFactory.

Parameters:
surveyElementVO - the VO
surveyElementBean - the bean


openFJORD Copyright © 2003 University of Muenster.