org.openfjord.business.entities
Class SurveyElementFactory

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

public class SurveyElementFactory
extends java.lang.Object

Factory Class for creating new SurveyElement Entity Beans

Title: openFJORD

Description: open Flexible Java Online Research Designer

Copyright: Copyright (c) University of Muenster

Company: University of Muenster

Version:
1.0
Author:
Ingo Düppe

Field Summary
static int CARDINALQUESTION
           
static int NOMINALQUESTION
           
static int ORDINALQUESTION
           
static int PAGEBREAK
           
static int PARAGRAPH
           
static int QUESTION
           
static int SURVEYFOOTER
           
static int SURVEYHEADER
           
static int TEXTELEMENT
           
 
Constructor Summary
SurveyElementFactory()
           
 
Method Summary
static SurveyElementLocal createSurveyElement(int elementType)
          Creates a new SurveyElement entity bean.
static SurveyElementLocal createSurveyElement(SurveyElement element)
          Creates a new SurveyElement entity bean.
static boolean isContainer(int type)
          checks if the given type is a survey element container type or not
static boolean isQuestion(int type)
          check if the given type is a question or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAGRAPH

public static final int PARAGRAPH
See Also:
Constant Field Values

SURVEYHEADER

public static final int SURVEYHEADER
See Also:
Constant Field Values

SURVEYFOOTER

public static final int SURVEYFOOTER
See Also:
Constant Field Values

TEXTELEMENT

public static final int TEXTELEMENT
See Also:
Constant Field Values

QUESTION

public static final int QUESTION
See Also:
Constant Field Values

CARDINALQUESTION

public static final int CARDINALQUESTION
See Also:
Constant Field Values

ORDINALQUESTION

public static final int ORDINALQUESTION
See Also:
Constant Field Values

NOMINALQUESTION

public static final int NOMINALQUESTION
See Also:
Constant Field Values

PAGEBREAK

public static final int PAGEBREAK
See Also:
Constant Field Values
Constructor Detail

SurveyElementFactory

public SurveyElementFactory()
Method Detail

createSurveyElement

public static SurveyElementLocal createSurveyElement(SurveyElement element)
Creates a new SurveyElement entity bean.

Parameters:
element - reference to domain interface
Returns:
reference to the local interface of the create element
See Also:
createSurveyElement(org.openfjord.business.domain.SurveyElement)

createSurveyElement

public static SurveyElementLocal createSurveyElement(int elementType)
Creates a new SurveyElement entity bean. If necessary also with the dependent question bean.

Parameters:
elementType - type of the survey element
Returns:
reference to the local interface of the create element

isQuestion

public static boolean isQuestion(int type)
check if the given type is a question or not

Parameters:
type - element type
Returns:
true if type is a question or a sub type of it

isContainer

public static boolean isContainer(int type)
checks if the given type is a survey element container type or not

Parameters:
type - element type
Returns:
true if type is a element container or a sub type of it


openFJORD Copyright © 2003 University of Muenster.