Code Search for Developers
 
 
  

Option.java from crlove at Krugle


Show Option.java syntax highlighted

package com.witfriend.apollo.domain;

import java.util.HashMap;
import java.util.Map;

import com.witfriend.zeus.domain.BaseObject;

/**
 * DOCUMENT ME!
 * @author wangyz
 * @since 2006.10.04
 * @version $Id$
 */
public class Option extends BaseObject {
	private static final long serialVersionUID = -1187799029807474500L;
	
	private String name;
	private Integer point;
	private Choice choice;
	
	public Choice getChoice() {
		if(choice == null) {
			setChoice(new Choice());
		}
		
		return choice;
	}
	
	public void setChoice(Choice choice) {
		this.choice = choice;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String value) {
		this.name = value;
	}
	
	public Integer getPoint() {
		return point;
	}
	
	public void setPoint(Integer point) {
		this.point = point;
	}

	@Override
	public Map<String, Object> getNaturalId() {
		Map<String, Object> map = new HashMap<String, Object>();
		
		map.put("name", getName());
		map.put("choice", getChoice());
		
		return map;
	}
}




See more files for this project here

crlove

Online psychological-test-based friend-making system.

Project homepage: http://sourceforge.net/projects/crlove
Programming language(s): Java,JavaScript,Ruby,XML
License: other

  exception/
    choice/
      ChoiceExistedException.java
      ChoiceNotFoundException.java
    exam/
      ExamExistedException.java
      ExamNotFoundException.java
    question/
      QuestionExistedException.java
      QuestionNotFoundException.java
  Choice.java
  Choices.java
  Exam.hbm.xml
  Exam.java
  Exams.java
  Option.hbm.xml
  Option.java
  Question.hbm.xml
  Question.java
  Questions.java