// Path: src/java/com/idega/block/survey/business/SurveyConstants.java
// public class SurveyConstants {
// 	public static final int SURVEY_ANSWER_MAX_LENGTH = 500;
// }


import java.sql.Timestamp;
import java.util.Collection;
import javax.ejb.FinderException;
import com.idega.block.survey.business.SurveyConstants;
import com.idega.data.GenericEntity;
import com.idega.data.IDOException;
import com.idega.data.query.CountColumn;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.data.query.WildCardColumn;
/*
 * Created on 2.1.2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.idega.block.survey.data;




/**
 * Title: SurveyReplyBMPBean Description: Copyright: Copyright (c) 2004 Company:
 * idega Software
 * 
 * @author 2004 - idega team - <br>
 *         <a href="mailto:gummi@idega.is">Gudmundur Agust Saemundsson</a><br>
 * @version 1.0
 */

public class SurveyReplyBMPBean extends GenericEntity implements SurveyReply {

	private static final String ENTITY_NAME = "SU_SURVEY_REPLY";
	// PARTICIPANT_KEY could either be generated key or encrypted representative
	// string (e.g. e-mail)
	private final static String COLUMN_PARTICIPANT_KEY = "PARTICIPANT_KEY";
	private static final String COLUMN_ANSWER = "ANSWER";
	private final static String COLUMN_SURVEY_ID = "SU_SURVEY_ID";
	private final static String COLUMN_QUESTION_ID = "SU_QUESTION_ID";
	private final static String COLUMN_ANSWER_ID = "SU_ANSWER_ID";
	private final static String COLUMN_PARTICIPANT = "participant_id";
	private final static String COLUMN_ENTRY_DATE = "entry_date";

	public String getEntityName() {
		return ENTITY_NAME;
	}

	public void initializeAttributes() {
		addAttribute(this.getIDColumnName());

		addAttribute(COLUMN_PARTICIPANT_KEY, "Participant key", String.class,
				255);
		addManyToOneRelationship(COLUMN_SURVEY_ID, SurveyEntity.class);
		addManyToOneRelationship(COLUMN_QUESTION_ID, SurveyQuestion.class);

		addManyToOneRelationship(COLUMN_ANSWER_ID, SurveyAnswer.class);
		addAttribute(COLUMN_ANSWER, "Answer", String.class,
// Path: src/java/com/idega/block/survey/business/SurveyConstants.java
// public class SurveyConstants {
// 	public static final int SURVEY_ANSWER_MAX_LENGTH = 500;
// }


// Path: src/java/com/idega/block/survey/data/SurveyReplyBMPBean.java
import java.sql.Timestamp;
import java.util.Collection;
import javax.ejb.FinderException;
import com.idega.block.survey.business.SurveyConstants;
import com.idega.data.GenericEntity;
import com.idega.data.IDOException;
import com.idega.data.query.CountColumn;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.data.query.WildCardColumn;

/*
 * Created on 2.1.2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.idega.block.survey.data;




/**
 * Title: SurveyReplyBMPBean Description: Copyright: Copyright (c) 2004 Company:
 * idega Software
 * 
 * @author 2004 - idega team - <br>
 *         <a href="mailto:gummi@idega.is">Gudmundur Agust Saemundsson</a><br>
 * @version 1.0
 */

public class SurveyReplyBMPBean extends GenericEntity implements SurveyReply {

	private static final String ENTITY_NAME = "SU_SURVEY_REPLY";
	// PARTICIPANT_KEY could either be generated key or encrypted representative
	// string (e.g. e-mail)
	private final static String COLUMN_PARTICIPANT_KEY = "PARTICIPANT_KEY";
	private static final String COLUMN_ANSWER = "ANSWER";
	private final static String COLUMN_SURVEY_ID = "SU_SURVEY_ID";
	private final static String COLUMN_QUESTION_ID = "SU_QUESTION_ID";
	private final static String COLUMN_ANSWER_ID = "SU_ANSWER_ID";
	private final static String COLUMN_PARTICIPANT = "participant_id";
	private final static String COLUMN_ENTRY_DATE = "entry_date";

	public String getEntityName() {
		return ENTITY_NAME;
	}

	public void initializeAttributes() {
		addAttribute(this.getIDColumnName());

		addAttribute(COLUMN_PARTICIPANT_KEY, "Participant key", String.class,
				255);
		addManyToOneRelationship(COLUMN_SURVEY_ID, SurveyEntity.class);
		addManyToOneRelationship(COLUMN_QUESTION_ID, SurveyQuestion.class);

		addManyToOneRelationship(COLUMN_ANSWER_ID, SurveyAnswer.class);
		addAttribute(COLUMN_ANSWER, "Answer", String.class,
				SurveyConstants.SURVEY_ANSWER_MAX_LENGTH);