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;

/**
 * Aa21b25s01  
 * 
 *  
 */

public class Aa21b25s01 implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	// Clave compuesta
	private Long cserv25;
	private String cexpe25;
	private Long aexpe25;
	private Integer nexpe25;
	private String tdocu25;
	private Integer cdocu25;
	private Integer ndocu25;
	private String texto25;
	private Date fanot25;
	private Long aanot25;
	private Long nanot25;

	private String ddocu25;
	private String edocu25;
	private String extdocu25;
	private String codpid25;
	private String ctype25;

	private byte[] documentoPID;

	public byte[] getDocumentoPID() {
		return documentoPID;
	}

	public void setDocumentoPID(byte[] documentoPID) {
		this.documentoPID = documentoPID;
	}

	/**
	 * @return the id
	 */
	public String getIdDocExp() {
		return cserv25 + "-" + cexpe25 + "-" + aexpe25 + "-" + nexpe25 + "-"
				+ tdocu25 + "-" + cdocu25 + "-" + ndocu25;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setIdDocExp(String id) {
		String[] ids = id.split("-");
		this.cserv25 = new Long(ids[0]);
		this.cexpe25 = ids[1];
		this.aexpe25 = new Long(ids[2]);
		this.nexpe25 = new Integer(ids[3]);
		this.tdocu25 = ids[4];
		this.cdocu25 = new Integer(ids[5]);
		this.ndocu25 = new Integer(ids[6]);
	}

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

	/**
	 * Method 'Aa21b25s01'.
	 * 
	 * @param cserv25
	 *            Long
	 * @param cexpe25
	 *            String
	 * @param aexpe25
	 *            Long
	 * @param nexpe25
	 *            Integer
	 * @param tdocu25
	 *            String
	 * @param cdocu25
	 *            Integer
	 * @param ndocu25
	 *            Integer
	 */
	public Aa21b25s01(Long cserv25, String cexpe25, Long aexpe25,
			Integer nexpe25, String tdocu25, Integer cdocu25, Integer ndocu25) {
		this.cserv25 = cserv25;
		this.cexpe25 = cexpe25;
		this.aexpe25 = aexpe25;
		this.nexpe25 = nexpe25;
		this.tdocu25 = tdocu25;
		this.cdocu25 = cdocu25;
		this.ndocu25 = ndocu25;
	}

	/**
	 * Method 'Aa21b25s01'.
	 * 
	 * @param cserv25
	 *            Long
	 * @param cexpe25
	 *            String
	 * @param aexpe25
	 *            Long
	 * @param nexpe25
	 *            Integer
	 * @param tdocu25
	 *            String
	 * @param cdocu25
	 *            Integer
	 * @param ndocu25
	 *            Integer
	 * @param texto25
	 *            String
	 * @param fanot25
	 *            Date
	 * @param aanot25
	 *            Long
	 * @param nanot25
	 *            Integer
	 * @param ddocu25
	 *            String
	 * @param edocu25
	 *            String
	 */
	public Aa21b25s01(Long cserv25, String cexpe25, Long aexpe25,
			Integer nexpe25, String tdocu25, Integer cdocu25, Integer ndocu25,
			String texto25, Date fanot25, Long aanot25, Long nanot25,
			String ddocu25, String edocu25) {

		this.cserv25 = cserv25;
		this.cexpe25 = cexpe25;
		this.aexpe25 = aexpe25;
		this.nexpe25 = nexpe25;
		this.tdocu25 = tdocu25;
		this.cdocu25 = cdocu25;
		this.ndocu25 = ndocu25;
		this.texto25 = texto25;
		this.fanot25 = fanot25;
		this.aanot25 = aanot25;
		this.nanot25 = nanot25;
		this.ddocu25 = ddocu25;
		this.edocu25 = edocu25;
	}

	public String getCtype25() {
		return ctype25;
	}

	public void setCtype25(String ctype25) {
		this.ctype25 = ctype25;
	}

	public String getExtdocu25() {
		return extdocu25;
	}

	public void setExtdocu25(String extdocu25) {
		this.extdocu25 = extdocu25;
	}

	public String getCodpid25() {
		return codpid25;
	}

	public void setCodpid25(String codpid25) {
		this.codpid25 = codpid25;
	}

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

	public Long getCserv25() {
		return this.cserv25;
	}

	/**
	 * Method 'setCserv25'.
	 * 
	 * @param cserv25
	 *            Long
	 * @return
	 */

	public void setCserv25(Long cserv25) {
		this.cserv25 = cserv25;
	}

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

	public String getCexpe25() {
		return this.cexpe25;
	}

	/**
	 * Method 'setCexpe25'.
	 * 
	 * @param cexpe25
	 *            String
	 * @return
	 */

	public void setCexpe25(String cexpe25) {
		this.cexpe25 = cexpe25;
	}

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

	public Long getAexpe25() {
		return this.aexpe25;
	}

	/**
	 * Method 'setAexpe25'.
	 * 
	 * @param aexpe25
	 *            Long
	 * @return
	 */

	public void setAexpe25(Long aexpe25) {
		this.aexpe25 = aexpe25;
	}

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

	public Integer getNexpe25() {
		return this.nexpe25;
	}

	/**
	 * Method 'setNexpe25'.
	 * 
	 * @param nexpe25
	 *            Integer
	 * @return
	 */

	public void setNexpe25(Integer nexpe25) {
		this.nexpe25 = nexpe25;
	}

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

	public String getTdocu25() {
		return this.tdocu25;
	}

	/**
	 * Method 'setTdocu25'.
	 * 
	 * @param tdocu25
	 *            String
	 * @return
	 */

	public void setTdocu25(String tdocu25) {
		this.tdocu25 = tdocu25;
	}

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

	public Integer getCdocu25() {
		return this.cdocu25;
	}

	/**
	 * Method 'setCdocu25'.
	 * 
	 * @param cdocu25
	 *            Integer
	 * @return
	 */

	public void setCdocu25(Integer cdocu25) {
		this.cdocu25 = cdocu25;
	}

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

	public Integer getNdocu25() {
		return this.ndocu25;
	}

	/**
	 * Method 'setNdocu25'.
	 * 
	 * @param ndocu25
	 *            Integer
	 * @return
	 */

	public void setNdocu25(Integer ndocu25) {
		this.ndocu25 = ndocu25;
	}

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

	public String getTexto25() {
		return this.texto25;
	}

	/**
	 * Method 'setTexto25'.
	 * 
	 * @param texto25
	 *            String
	 * @return
	 */

	public void setTexto25(String texto25) {
		this.texto25 = texto25;
	}

	/**
	 * Method 'getFanot25'.
	 * 
	 * @return java.util.Date
	 */

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

	/**
	 * Method 'setFanot25'.
	 * 
	 * @param fanot25
	 *            java.util.Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setFanot25(Date fanot25) {
		this.fanot25 = fanot25;
	}

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

	public Long getAanot25() {
		return this.aanot25;
	}

	/**
	 * Method 'setAanot25'.
	 * 
	 * @param aanot25
	 *            Long
	 * @return
	 */

	public void setAanot25(Long aanot25) {
		this.aanot25 = aanot25;
	}

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

	public Long getNanot25() {
		return this.nanot25;
	}

	/**
	 * Method 'setNanot25'.
	 * 
	 * @param nanot25
	 *            Long
	 * @return
	 */

	public void setNanot25(Long nanot25) {
		this.nanot25 = nanot25;
	}

	/**
	 * Method 'getDdocu25'.
	 * 
	 * @return String
	 */
	public String getDdocu25() {
		return ddocu25;
	}

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

	/**
	 * Method 'getEdocu25'.
	 * 
	 * @return String
	 */
	public String getEdocu25() {
		return edocu25;
	}

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

	/**
	 * 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("[ cserv25: ").append(this.cserv25).append(" ]");

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

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

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

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

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

		result.append(", [ ndocu25: ").append(this.ndocu25).append(" ]");
		result.append(", [ texto25: ").append(this.texto25).append(" ]");
		result.append(", [ fanot25: ").append(this.fanot25).append(" ]");
		result.append(", [ aanot25: ").append(this.aanot25).append(" ]");
		result.append(", [ nanot25: ").append(this.nanot25).append(" ]");
		result.append(", [ ddocu25: ").append(this.ddocu25).append(" ]");
		result.append(", [ edocu25: ").append(this.edocu25).append(" ]");
		result.append("}");
		return result.toString();
	}

}
