Ejemplo n.º 1
0
  @Override
  public Object clone() {
    LFQuestionClp clone = new LFQuestionClp();

    clone.setId(getId());
    clone.setCategoryId(getCategoryId());
    clone.setTitle(getTitle());
    clone.setDescription(getDescription());
    clone.setExplanationText(getExplanationText());
    clone.setRightAnswerText(getRightAnswerText());
    clone.setWrongAnswerText(getWrongAnswerText());
    clone.setForceCorrectCount(getForceCorrectCount());
    clone.setCaseSensitive(getCaseSensitive());
    clone.setQuestionType(getQuestionType());
    clone.setCourseId(getCourseId());
    clone.setArrangementIndex(getArrangementIndex());

    return clone;
  }
Ejemplo n.º 2
0
  @Override
  public void setModelAttributes(Map<String, Object> attributes) {
    Long id = (Long) attributes.get("id");

    if (id != null) {
      setId(id);
    }

    Integer categoryId = (Integer) attributes.get("categoryId");

    if (categoryId != null) {
      setCategoryId(categoryId);
    }

    String title = (String) attributes.get("title");

    if (title != null) {
      setTitle(title);
    }

    String description = (String) attributes.get("description");

    if (description != null) {
      setDescription(description);
    }

    String explanationText = (String) attributes.get("explanationText");

    if (explanationText != null) {
      setExplanationText(explanationText);
    }

    String rightAnswerText = (String) attributes.get("rightAnswerText");

    if (rightAnswerText != null) {
      setRightAnswerText(rightAnswerText);
    }

    String wrongAnswerText = (String) attributes.get("wrongAnswerText");

    if (wrongAnswerText != null) {
      setWrongAnswerText(wrongAnswerText);
    }

    Boolean forceCorrectCount = (Boolean) attributes.get("forceCorrectCount");

    if (forceCorrectCount != null) {
      setForceCorrectCount(forceCorrectCount);
    }

    Boolean caseSensitive = (Boolean) attributes.get("caseSensitive");

    if (caseSensitive != null) {
      setCaseSensitive(caseSensitive);
    }

    Integer questionType = (Integer) attributes.get("questionType");

    if (questionType != null) {
      setQuestionType(questionType);
    }

    Integer courseId = (Integer) attributes.get("courseId");

    if (courseId != null) {
      setCourseId(courseId);
    }

    Integer arrangementIndex = (Integer) attributes.get("arrangementIndex");

    if (arrangementIndex != null) {
      setArrangementIndex(arrangementIndex);
    }
  }