/** * 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 com.autentia.tnt.dao.ITransferObject; import com.autentia.tnt.dao.hibernate.UserDAO; /** * Transfer object to store Interactions * @author stajanov code generator */ public class Interaction implements Serializable, ITransferObject { /** Serial version field */ private static final long serialVersionUID = -1L; /* interaction - generated by stajanov (do not edit/delete) */ // Fields private Integer id; private Date creationDate; private InteractionInterest interest; private String description; private String file; private String fileMime; private Integer departmentId; private Date insertDate; private Date updateDate; private Project project; private InteractionType type; private User user; private Offer offer; // Setters and getters public Integer getId() { return id; } public void setId( Integer id ) { this.id = id; } public Date getCreationDate() { return creationDate; } public void setCreationDate( Date creationDate ) { this.creationDate = creationDate; } public InteractionInterest getInterest() { return interest; } public void setInterest( InteractionInterest interest ) { this.interest = interest; } public String getDescription() { return description; } public void setDescription( String description ) { this.description = description; } public String getFile() { return file; } public void setFile( String file ) { this.file = file; } public String getFileMime() { return fileMime; } public void setFileMime( String fileMime ) { this.fileMime = fileMime; } public Integer getDepartmentId() { return departmentId; } public void setDepartmentId( Integer departmentId ) { this.departmentId = departmentId; } 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 Project getProject() { return project; } public void setProject( Project project ) { this.project = project; } public InteractionType getType() { return type; } public void setType( InteractionType type ) { this.type = type; } public User getUser() { return user; } public void setUser( User user ) { this.user = user; } public Offer getOffer() { return offer; } public void setOffer( Offer offer ) { this.offer = offer; } public Integer getOwnerId() { return user.getId(); } public void setOwnerId(Integer ownerId) { user = UserDAO.getDefault().getById(ownerId); } public boolean equals( Object that ) { try { if (that == null) return false; else return this.getId().equals( ((Interaction)that).getId() ); } catch (Exception e) { return false; } } public int hashCode() { if(this.getId()==null) return super.hashCode(); else return this.getId().intValue(); } /* interaction - generated by stajanov (do not edit/delete) */ public List<Integer> getOwnersId() { // TODO Auto-generated method stub return null; } }