package cn.hmsoft.ltc.model;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import javafx.beans.property.DoubleProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * 细目表实体类
 * @author Administrator
 *
 */
public class DetailTable {
	private IntegerProperty id;    //主健
	private StringProperty paperNo;     //试卷编号
	private IntegerProperty courseId;   //课程id
	private StringProperty courseCode;   //课程编号
	private StringProperty courseName;   //课程名称
	private IntegerProperty questionTypeId;  //题型编号
	private DoubleProperty itemScore;//小题分
	private StringProperty createTime;//创建时间
	private IntegerProperty createBy;//	创建人ID
	private StringProperty updateTime;//创建时间
	private IntegerProperty updateBy;//	修改人ID
	private IntegerProperty tx0Nums;//题型1数量
	private IntegerProperty tx1Nums;//题型1数量
	private IntegerProperty tx2Nums;//题型2数量
	private IntegerProperty tx3Nums;//题型3数量
	private IntegerProperty tx4Nums;//题型4数量
	private IntegerProperty tx5Nums;//题型5数量
	private IntegerProperty tx6Nums;//题型6数量
	private IntegerProperty tx7Nums;//题型7数量
	private IntegerProperty tx8Nums;//题型8数量
	private IntegerProperty tx9Nums;//题型9数量
	private IntegerProperty tx10Nums;//题型10数量
	private IntegerProperty tx11Nums;//题型11数量
	private IntegerProperty tx12Nums;//题型12数量
	private IntegerProperty tx13Nums;//题型13数量
	private IntegerProperty tx14Nums;//题型14数量
	private IntegerProperty tx15Nums;//题型15数量
	private IntegerProperty tx16Nums;//题型16数量
	private IntegerProperty tx17Nums;//题型17数量
	private IntegerProperty tx18Nums;//题型18数量
	private IntegerProperty tx19Nums;//题型19数量
	private IntegerProperty tx20Nums;//题型20数量
	private IntegerProperty tx21Nums;//题型21数量
	private IntegerProperty tx22Nums;//题型22数量
	private IntegerProperty tx23Nums;//题型23数量
	private IntegerProperty tx24Nums;//题型24数量
	private IntegerProperty tx25Nums;//题型25数量
	
	protected IntegerProperty quesNums;//小题量
	protected String questionTypeName;//题型名称
	
	public DetailTable() {
		this.id = new SimpleIntegerProperty();
		this.paperNo = new SimpleStringProperty();
		this.courseId = new SimpleIntegerProperty();
		this.courseCode = new SimpleStringProperty();
		this.courseName = new SimpleStringProperty();
		this.questionTypeId = new SimpleIntegerProperty();
		this.createTime = new SimpleStringProperty();
		this.updateTime = new SimpleStringProperty();
		this.createBy = new SimpleIntegerProperty();
		this.updateBy = new SimpleIntegerProperty();
		this.itemScore = new SimpleDoubleProperty();
		this.tx0Nums = new SimpleIntegerProperty();
		this.tx1Nums = new SimpleIntegerProperty();
		this.tx2Nums = new SimpleIntegerProperty();
		this.tx3Nums = new SimpleIntegerProperty();
		this.tx4Nums = new SimpleIntegerProperty();
		this.tx5Nums = new SimpleIntegerProperty();
		this.tx6Nums = new SimpleIntegerProperty();
		this.tx7Nums = new SimpleIntegerProperty();
		this.tx8Nums = new SimpleIntegerProperty();
		this.tx9Nums = new SimpleIntegerProperty();
		this.tx10Nums = new SimpleIntegerProperty();
		this.tx11Nums = new SimpleIntegerProperty();
		this.tx12Nums = new SimpleIntegerProperty();
		this.tx13Nums = new SimpleIntegerProperty();
		this.tx14Nums = new SimpleIntegerProperty();
		this.tx15Nums = new SimpleIntegerProperty();
		this.tx16Nums = new SimpleIntegerProperty();
		this.tx17Nums = new SimpleIntegerProperty();
		this.tx18Nums = new SimpleIntegerProperty();
		this.tx19Nums = new SimpleIntegerProperty();
		this.tx20Nums = new SimpleIntegerProperty();
		this.tx21Nums = new SimpleIntegerProperty();
		this.tx22Nums = new SimpleIntegerProperty();
		this.tx23Nums = new SimpleIntegerProperty();
		this.tx24Nums = new SimpleIntegerProperty();
		this.tx25Nums = new SimpleIntegerProperty();
		this.quesNums = new SimpleIntegerProperty();
	}
	
	public Integer getId() {
		return id.get();
	}



	public Integer getCourseId() {
		return courseId.get();
	}



	public String getCourseCode() {
		return courseCode.get();
	}


	public String getCourseName() {
		return courseName.get();
	}


	public Integer getQuestionTypeId() {
		return questionTypeId.get();
	}

	public Double getItemScore() {
		return itemScore.get();
	}


	public String getCreateTime() {
		return createTime.get();
	}


	public Integer getCreateBy() {
		return createBy.get();
	}


	public String getUpdateTime() {
		return updateTime.get();
	}


	public Integer getUpdateBy() {
		return updateBy.get();
	}

	public Integer getTx1Nums() {
		return tx1Nums.get();
	}


	public Integer getTx2Nums() {
		return tx2Nums.get();
	}


	public Integer getTx3Nums() {
		return tx3Nums.get();
	}




	public Integer getTx4Nums() {
		return tx4Nums.get();
	}




	public Integer getTx5Nums() {
		return tx5Nums.get();
	}




	public Integer getTx6Nums() {
		return tx6Nums.get();
	}




	public Integer getTx7Nums() {
		return tx7Nums.get();
	}




	public Integer getTx8Nums() {
		return tx8Nums.get();
	}


	public Integer getTx9Nums() {
		return tx9Nums.get();
	}


	public Integer getTx10Nums() {
		return tx10Nums.get();
	}


	public Integer getTx11Nums() {
		return tx11Nums.get();
	}


	public Integer getTx12Nums() {
		return tx12Nums.get();
	}


	public Integer getTx13Nums() {
		return tx13Nums.get();
	}

	public Integer getTx14Nums() {
		return tx14Nums.get();
	}


	public Integer getTx15Nums() {
		return tx15Nums.get();
	}
	
	public Integer getTx0Nums() {
		return tx0Nums.get();
	}

	public void setTx0Nums(Integer tx0Nums) {
		this.tx0Nums.set(tx0Nums);
	}

	public void setId(Integer id) {
		this.id.set(id);
	}


	public void setCourseId(Integer courseId) {
		this.courseId.set(courseId);
	}


	public void setCourseCode(String courseCode) {
		this.courseCode.set(courseCode);
	}


	public void setCourseName(String courseName) {
		this.courseName.set(courseName);
	}


	public void setQuestionTypeId(Integer questionTypeId) {
		this.questionTypeId.set(questionTypeId);
	}


	public void setItemScore(Double itemScore) {
		this.itemScore.set(itemScore);
	}


	public void setCreateTime(String createTime) {
		this.createTime.set(createTime);
	}


	public void setCreateBy(Integer createBy) {
		this.createBy.set(createBy);
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime.set(updateTime);
	}

	public void setUpdateBy(Integer updateBy) {
		this.updateBy.set(updateBy);
	}

	public void setTx1Nums(Integer tx1Nums) {
		this.tx1Nums.set(tx1Nums);
	}


	public void setTx2Nums(Integer tx2Nums) {
		this.tx2Nums.set(tx2Nums);
	}


	public void setTx3Nums(Integer tx3Nums) {
		this.tx3Nums.set(tx3Nums);
	}

	public void setTx4Nums(Integer tx4Nums) {
		this.tx4Nums.set(tx4Nums);
	}


	public void setTx5Nums(Integer tx5Nums) {
		this.tx5Nums.set(tx5Nums);
	}


	public void setTx6Nums(Integer tx6Nums) {
		this.tx6Nums.set(tx6Nums);
	}


	public void setTx7Nums(Integer tx7Nums) {
		this.tx7Nums.set(tx7Nums);
	}

	public void setTx8Nums(Integer tx8Nums) {
		this.tx8Nums.set(tx8Nums);
	}

	public void setTx9Nums(Integer tx9Nums) {
		this.tx9Nums.set(tx9Nums);
	}

	public void setTx10Nums(Integer tx10Nums) {
		this.tx10Nums.set(tx10Nums);
	}

	public void setTx11Nums(Integer tx11Nums) {
		this.tx11Nums.set(tx11Nums);
	}

	public void setTx12Nums(Integer tx12Nums) {
		this.tx12Nums.set(tx12Nums);
	}

	public void setTx13Nums(Integer tx13Nums) {
		this.tx13Nums.set(tx13Nums);
	}

	public void setTx14Nums(Integer tx14Nums) {
		this.tx14Nums.set(tx14Nums);
	}

	public void setTx15Nums(Integer tx15Nums) {
		this.tx15Nums.set(tx15Nums);
	}

	public Integer getTx16Nums() {
		return tx16Nums.get();
	}

	public Integer getTx17Nums() {
		return tx17Nums.get();
	}

	public Integer getTx18Nums() {
		return tx18Nums.get();
	}

	public Integer getTx19Nums() {
		return tx19Nums.get();
	}

	public Integer getTx20Nums() {
		return tx20Nums.get();
	}

	public void setTx16Nums(Integer tx16Nums) {
		this.tx16Nums.set(tx16Nums);
	}
	
	public void setTx17Nums(Integer tx17Nums) {
		this.tx17Nums.set(tx17Nums);
	}

	public void setTx18Nums(Integer tx18Nums) {
		this.tx18Nums.set(tx18Nums);
	}

	public void setTx19Nums(Integer tx19Nums) {
		this.tx19Nums.set(tx19Nums);
	}

	public void setTx20Nums(Integer tx20Nums) {
		this.tx20Nums.set(tx20Nums);
	}

	public Integer getTx21Nums() {
		return tx21Nums.get();
	}

	public Integer getTx22Nums() {
		return tx22Nums.get();
	}

	public Integer getTx23Nums() {
		return tx23Nums.get();
	}

	public Integer getTx24Nums() {
		return tx24Nums.get();
	}

	public Integer getTx25Nums() {
		return tx25Nums.get();
	}

	public void setTx21Nums(Integer tx21Nums) {
		this.tx21Nums.set(tx21Nums);
	}

	public void setTx22Nums(Integer tx22Nums) {
		this.tx22Nums.set(tx22Nums);
	}

	public void setTx23Nums(Integer tx23Nums) {
		this.tx23Nums.set(tx23Nums);
	}

	public void setTx24Nums(Integer tx24Nums) {
		this.tx24Nums.set(tx24Nums);
	}

	public void setTx25Nums(Integer tx25Nums) {
		this.tx25Nums.set(tx25Nums);
	}

	public Integer getQuesNums() {
		return quesNums.get();
	}

	public void setQuesNums(Integer quesNums) {
		this.quesNums.set(quesNums);
	}

	public int hashCode() {
	     return new HashCodeBuilder(17, 37).
	       append(this.id.get()).
	       append(this.courseId.get()).
	       append(this.questionTypeId.get()).
	       toHashCode();
	}
	
	public boolean equals(Object obj) {
		   if (obj == null) { return false; }
		   if (obj == this) { return true; }
		   if (obj.getClass() != getClass()) {
		     return false;
		   }
		   DetailTable oth = (DetailTable) obj;
		   return new EqualsBuilder()
		                 .append(this.id.get(), oth.id.get())
		                 .append(this.courseId.get(), oth.courseId.get())
		                 .append(this.questionTypeId.get(), oth.questionTypeId.get())
		                 .isEquals();
	}

	public String getPaperNo() {
		return paperNo.get();
	}

	public void setPaperNo(String paperNo) {
		this.paperNo.set(paperNo);
	}

	public String getQuestionTypeName() {
		return questionTypeName;
	}

	public void setQuestionTypeName(String questionTypeName) {
		this.questionTypeName = questionTypeName;
	}
	
	public static void main(String[] args) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
		DetailTable dt = new DetailTable();
		dt.setTx1Nums(1);dt.setTx2Nums(1);dt.setTx3Nums(3);dt.setTx4Nums(4);dt.setTx5Nums(5);dt.setTx6Nums(6);
		Class<DetailTable> clz = DetailTable.class;
		Method method = clz.getMethod("getTx6Nums", null);
		Object obj = method.invoke(dt, null);
		System.err.println(obj);
	}
}
