/** * TNTConcept Easy Enterprise Management by Autentia Real Bussiness Solution S.L. * Copyright (C) 2007 Autentia Real Bussiness Solution S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.autentia.tnt.businessobject; import java.io.Serializable; import java.util.Date; import java.util.List; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import com.autentia.tnt.dao.ITransferObject; /* creditTitle - generated by stajanov (do not edit/delete) */ public class CommissioningPaymentData implements Serializable, ITransferObject { /** Serial version field */ private static final long serialVersionUID = -1L; // Fields private Integer id; private Date insertDate; private Date updateDate; private BillPaymentMode paymentMode; private Commissioning commissioning; private Collaborator collaborator; private String bankAccount; private String billNumber; // Setters and getters public Integer getId() { return id; } private void setId( Integer id ) { this.id = id; } public Date getInsertDate() { return insertDate; } public void setInsertDate( Date insertDate ) { this.insertDate = insertDate; } public Date getUpdateDate() { return updateDate; } public void setUpdateDate( Date updateDate ) { this.updateDate = updateDate; } public BillPaymentMode getPaymentMode() { return paymentMode; } public void setPaymentMode( BillPaymentMode paymentMode ) { this.paymentMode = paymentMode; } public Commissioning getCommissioning() { return commissioning; } public void setCommissioning( Commissioning commissioning ) { this.commissioning = commissioning; } public Collaborator getCollaborator() { return collaborator; } public void setCollaborator( Collaborator collaborator ) { this.collaborator = collaborator; } /** * @return the bankAccount */ public String getBankAccount() { return bankAccount; } /** * @return the billNumber */ public String getBillNumber() { return billNumber; } /** * @param bankAccount the bankAccount to set */ public void setBankAccount(String bankAccount) { this.bankAccount = bankAccount; } /** * @param billNumber the billNumber to set */ public void setBillNumber(String billNumber) { this.billNumber = billNumber; } @Override public boolean equals( Object that ) { if (that == null) { return false; } try { CommissioningPaymentData anotherObject = (CommissioningPaymentData) that; EqualsBuilder eqb = new EqualsBuilder(); eqb.append(this.getCommissioning().getId(), anotherObject.getCommissioning().getId()); eqb.append(this.getCollaborator().getId(), anotherObject.getCollaborator().getId()); // boolean equals = this.getCommissioning().getId() == anotherObject.getCommissioning().getId() // && this.getCollaborator().getId() == anotherObject.getCollaborator().getId(); // return equals; return eqb.isEquals(); } catch (Exception e) { return false; } } @Override public int hashCode() { if(this.getId()==null) return super.hashCode(); else { final HashCodeBuilder hcb = new HashCodeBuilder(); hcb.append(getCommissioning().getId()); hcb.append(getCollaborator().getId()); return hcb.toHashCode(); } } public Integer getDepartmentId() { // TODO Auto-generated method stub return null; } public Integer getOwnerId() { // TODO Auto-generated method stub return null; } public void setDepartmentId(Integer departmentId) { // TODO Auto-generated method stub } public void setOwnerId(Integer ownerId) { // TODO Auto-generated method stub } public List<Integer> getOwnersId() { // TODO Auto-generated method stub return null; } /* creditTitle - generated by stajanov (do not edit/delete) */ }