152 lines
4.4 KiB
Plaintext
Executable File
152 lines
4.4 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.param;
|
|
|
|
import javax.persistence.Column;
|
|
import java.io.Serializable;
|
|
import com.fp.dto.hb.HibernateId;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Embeddable;
|
|
import javax.persistence.Transient;
|
|
|
|
/**Clase que hace referencia a la Clave Primaria de TARMORIGENTRAMITE*/
|
|
@Embeddable
|
|
public class TarmOrigenTramiteKey extends com.fp.dto.AbstractDataTransport implements Serializable,Cloneable,HibernateId{
|
|
/**
|
|
* HashCode asociado con la Instancia
|
|
*/
|
|
@Transient
|
|
private int hashValue = 0;
|
|
/**
|
|
* Version de la Clase
|
|
*/
|
|
private static final long serialVersionUID = 1L;
|
|
@Column(name="CTRAMITE", nullable=false,updatable=false)
|
|
|
|
/**
|
|
* Codigo de tramite
|
|
*/
|
|
private Long ctramite;
|
|
|
|
@Column(name="ORIGENCATALOGCODE", nullable=false,updatable=false)
|
|
|
|
/**
|
|
* Codigo de catalogcode de origen
|
|
*/
|
|
private String origencatalogcode;
|
|
|
|
@Column(name="ORIGENCATALOG", nullable=false,updatable=false)
|
|
|
|
/**
|
|
* Codigo de catalogo de origen
|
|
*/
|
|
private String origencatalog;
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmOrigenTramiteKey(){}
|
|
/**Contructor de TarmOrigenTramiteKey
|
|
@param pCtramite Codigo de tramite
|
|
@param pOrigencatalogcode Codigo de catalogcode de origen
|
|
@param pOrigencatalog Codigo de catalogo de origen
|
|
*/
|
|
public TarmOrigenTramiteKey(Long pCtramite,String pOrigencatalogcode,String pOrigencatalog){
|
|
ctramite=pCtramite;
|
|
origencatalogcode=pOrigencatalogcode;
|
|
origencatalog=pOrigencatalog;
|
|
}
|
|
/**Obtiene el valor de ctramite
|
|
@return valor de ctramite*/
|
|
public Long getCtramite(){
|
|
return ctramite;
|
|
}
|
|
/**Fija el valor de ctramite
|
|
@param pCtramite nuevo Valor de ctramite*/
|
|
public void setCtramite(Long pCtramite){
|
|
ctramite=pCtramite;
|
|
}
|
|
|
|
/**Obtiene el valor de origencatalogcode
|
|
@return valor de origencatalogcode*/
|
|
public String getOrigencatalogcode(){
|
|
return origencatalogcode;
|
|
}
|
|
/**Fija el valor de origencatalogcode
|
|
@param pOrigencatalogcode nuevo Valor de origencatalogcode*/
|
|
public void setOrigencatalogcode(String pOrigencatalogcode){
|
|
origencatalogcode=pOrigencatalogcode;
|
|
}
|
|
|
|
/**Obtiene el valor de origencatalog
|
|
@return valor de origencatalog*/
|
|
public String getOrigencatalog(){
|
|
return origencatalog;
|
|
}
|
|
/**Fija el valor de origencatalog
|
|
@param pOrigencatalog nuevo Valor de origencatalog*/
|
|
public void setOrigencatalog(String pOrigencatalog){
|
|
origencatalog=pOrigencatalog;
|
|
}
|
|
|
|
/**Implementacion de la comparacion de TarmOrigenTramiteKey
|
|
@param o Objeto de comparacion
|
|
*/
|
|
public boolean equals(Object o){
|
|
if (o == null)return false;
|
|
if (! (o instanceof TarmOrigenTramiteKey))return false;
|
|
TarmOrigenTramiteKey that = (TarmOrigenTramiteKey) o;
|
|
if (this.getCtramite() == null || that.getCtramite() == null){
|
|
return false;
|
|
}
|
|
if (! this.getCtramite().equals(that.getCtramite())){
|
|
return false;
|
|
}
|
|
if (this.getOrigencatalogcode() == null || that.getOrigencatalogcode() == null){
|
|
return false;
|
|
}
|
|
if (! this.getOrigencatalogcode().equals(that.getOrigencatalogcode())){
|
|
return false;
|
|
}
|
|
if (this.getOrigencatalog() == null || that.getOrigencatalog() == null){
|
|
return false;
|
|
}
|
|
if (! this.getOrigencatalog().equals(that.getOrigencatalog())){
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
/**Implementacion del metodo hashCode bajo el patron de Bloch
|
|
@return hashCode de la instancia TarmOrigenTramiteKey
|
|
*/
|
|
public int hashCode(){
|
|
if (this.hashValue == 0){
|
|
int result = 17;
|
|
result = result * 37 + (this.getCtramite() == null ? 0 : this.getCtramite().hashCode());
|
|
result = result * 37 + (this.getOrigencatalogcode() == null ? 0 : this.getOrigencatalogcode().hashCode());
|
|
result = result * 37 + (this.getOrigencatalog() == null ? 0 : this.getOrigencatalog().hashCode());
|
|
this.hashValue = result;
|
|
}
|
|
return this.hashValue;
|
|
}
|
|
public Object cloneMe() throws CloneNotSupportedException {
|
|
return this.clone();
|
|
}
|
|
/**Implementacion toString
|
|
*/
|
|
public String toString() {
|
|
Field[]fs=this.getClass().getDeclaredFields();
|
|
String data="";
|
|
for(Field f:fs){
|
|
try{
|
|
String name=f.getName();
|
|
if(f.getType().getName().compareTo("java.util.Set")==0)continue;
|
|
if(name.compareTo("hashValue")==0||name.compareTo("serialVersionUID")==0)continue;
|
|
data+="pk."+name+"="+f.get(this)+";";
|
|
}catch(Exception e){
|
|
continue;
|
|
}
|
|
}
|
|
if(data.compareTo("")==0){
|
|
data=super.toString();
|
|
}
|
|
return data;
|
|
}
|
|
}
|