package com.ejie.aa21b.model;

import java.util.Date;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.ejie.aa21b.util.JsonDateDeserializer;
import com.ejie.x38.serialization.JsonDateSerializer;

/**
 * Aa21b29s01  
 * 
 *  
 */

public class Aa21b29s01 implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	// Clave compuesta
	private String cserv29;
	private String cexpe29;
	private String aexpe29;
	private Integer nexpe29;
	private Long crespo29;
	private java.util.Date frespo29;

	private String drespo29;

	/**
	 * @return the id
	 */
	public String getIdRespExp() {
		return cserv29 + "-" + cexpe29 + "-" + aexpe29 + "-" + nexpe29 + "-"
				+ crespo29 + "-" + frespo29;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setIdRespExp(String id) {
		String[] ids = id.split("-");
		this.cserv29 = ids[0];
		this.cexpe29 = ids[1];
		this.aexpe29 = ids[2];
		this.nexpe29 = new Integer(ids[3]);
		this.crespo29 = new Long(ids[4]);
		this.frespo29 = new Date(ids[5]);

	}

	/**
	 * Method 'Aa21b29s01'.
	 */
	public Aa21b29s01() {
	}

	/**
	 * Method 'Aa21b29s01'.
	 * 
	 * @param cserv29
	 *            String
	 * @param cexpe29
	 *            String
	 * @param aexpe29
	 *            String
	 * @param nexpe29
	 *            Integer
	 * @param crespo29
	 *            Long
	 * @param frespo29
	 *            Date
	 */
	public Aa21b29s01(String cserv29, String cexpe29, String aexpe29,
			Integer nexpe29, Long crespo29, Date frespo29) {

		this.cserv29 = cserv29;
		this.cexpe29 = cexpe29;
		this.aexpe29 = aexpe29;
		this.nexpe29 = nexpe29;
		this.crespo29 = crespo29;
		this.frespo29 = frespo29;
	}

	/**
	 * Method 'Aa21b29s01'.
	 * 
	 * @param cserv29
	 *            String
	 * @param cexpe29
	 *            String
	 * @param aexpe29
	 *            String
	 * @param nexpe29
	 *            Integer
	 * @param crespo29
	 *            Long
	 * @param frespo29
	 *            Date
	 * @param drespo29
	 *            String
	 */
	public Aa21b29s01(String cserv29, String cexpe29, String aexpe29,
			Integer nexpe29, Long crespo29, Date frespo29, String drespo29) {

		this.cserv29 = cserv29;
		this.cexpe29 = cexpe29;
		this.aexpe29 = aexpe29;
		this.nexpe29 = nexpe29;
		this.crespo29 = crespo29;
		this.frespo29 = frespo29;
		this.drespo29 = drespo29;
	}

	/**
	 * Method 'getCserv29'.
	 * 
	 * @return String
	 */

	public String getCserv29() {
		return this.cserv29;
	}

	/**
	 * Method 'setCserv29'.
	 * 
	 * @param cserv29
	 *            String
	 * @return
	 */

	public void setCserv29(String cserv29) {
		this.cserv29 = cserv29;
	}

	/**
	 * Method 'getCexpe29'.
	 * 
	 * @return String
	 */

	public String getCexpe29() {
		return this.cexpe29;
	}

	/**
	 * Method 'setCexpe29'.
	 * 
	 * @param cexpe29
	 *            String
	 * @return
	 */

	public void setCexpe29(String cexpe29) {
		this.cexpe29 = cexpe29;
	}

	/**
	 * Method 'getAexpe29'.
	 * 
	 * @return String
	 */

	public String getAexpe29() {
		return this.aexpe29;
	}

	/**
	 * Method 'setAexpe29'.
	 * 
	 * @param aexpe29
	 *            String
	 * @return
	 */

	public void setAexpe29(String aexpe29) {
		this.aexpe29 = aexpe29;
	}

	/**
	 * Method 'getNexpe29'.
	 * 
	 * @return Integer
	 */

	public Integer getNexpe29() {
		return this.nexpe29;
	}

	/**
	 * Method 'setNexpe29'.
	 * 
	 * @param nexpe29
	 *            Integer
	 * @return
	 */

	public void setNexpe29(Integer nexpe29) {
		this.nexpe29 = nexpe29;
	}

	/**
	 * Method 'getCrespo29'.
	 * 
	 * @return Long
	 */

	public Long getCrespo29() {
		return this.crespo29;
	}

	/**
	 * Method 'setCrespo29'.
	 * 
	 * @param crespo29
	 *            Long
	 * @return
	 */

	public void setCrespo29(Long crespo29) {
		this.crespo29 = crespo29;
	}

	/**
	 * Method 'getDrespo29'.
	 * 
	 * @return String
	 */
	public String getDrespo29() {
		return drespo29;
	}

	/**
	 * Method 'setDrespo29'.
	 * 
	 * @param drespo29
	 *            String
	 * @return
	 */
	public void setDrespo29(String drespo29) {
		this.drespo29 = drespo29;
	}

	/**
	 * Method 'getFrespo29'.
	 * 
	 * @return Date
	 */

	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getFrespo29() {
		return this.frespo29;
	}

	/**
	 * Method 'setFrespo29'.
	 * 
	 * @param frespo29
	 *            Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setFrespo29(Date frespo29) {
		this.frespo29 = frespo29;
	}

	/**
	 * Intended only for logging and debugging.
	 * 
	 * Here, the contents of every main field are placed into the result.
	 * 
	 * @return String
	 */
	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		result.append(this.getClass().getName()).append(" Object { ");
		// Clave compuesta

		result.append("[ cserv29: ").append(this.cserv29).append(" ]");

		result.append(", [ cexpe29: ").append(this.cexpe29).append(" ]");

		result.append(", [ aexpe29: ").append(this.aexpe29).append(" ]");

		result.append(", [ nexpe29: ").append(this.nexpe29).append(" ]");

		result.append(", [ crespo29: ").append(this.crespo29).append(" ]");

		result.append(", [ frespo29: ").append(this.frespo29).append(" ]");

		result.append(", [ drespo29: ").append(this.drespo29).append(" ]");
		result.append("}");
		return result.toString();
	}

}
