MeetingValue.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:2k
源码类别:
Java编程
开发平台:
Java
- package com.borland.training.meetings.sessions;
- import java.util.*;
- import com.borland.training.meetings.entities.*;
- public class MeetingValue implements java.io.Serializable {
- private Long id;
- private String topic;
- private Date startTime;
- private Date finishTime;
- private String roomName;
- private Collection attendeeIds;
- public MeetingValue(Long id, String topic, Date startTime, Date finishTime,
- String roomName, Collection attendeeIds) {
- setId(id);
- setTopic(topic);
- setStartTime(startTime);
- setFinishTime(finishTime);
- setRoomName(roomName);
- setAttendeeIds(attendeeIds);
- }
- public MeetingValue(String topic, Date startTime, Date finishTime,
- String roomName, Collection attendeeIds) {
- this(new Long(0), topic, startTime, finishTime, roomName, attendeeIds);
- }
- private void setId(Long id) {this.id = id;}
- public Long getId() { return this.id;}
- public void setTopic(String topic) {this.topic = topic;}
- public String getTopic() {return this.topic;}
- public void setStartTime(Date startTime) {this.startTime = startTime;}
- public Date getStartTime() {return this.startTime;}
- public void setFinishTime(Date finishTime) {this.finishTime = finishTime;}
- public Date getFinishTime() {return this.finishTime;}
- public void setRoomName(String roomName) {this.roomName = roomName;}
- public String getRoomName() {return this.roomName;}
- public void setAttendeeIds(Collection attendeeIds) {this.attendeeIds = attendeeIds;}
- public Collection getAttendeeIds() {return attendeeIds;}
- public String toString() {
- String attendeeIdString = "";
- Iterator iterator = getAttendeeIds().iterator();
- Long id;
- if(iterator.hasNext()) {
- id = (Long) iterator.next();
- attendeeIdString = attendeeIdString + id;
- }
- while(iterator.hasNext()) {
- id = (Long) iterator.next();
- attendeeIdString = attendeeIdString + ", " + id;
- }
- return "{" + getId() + ", " + getTopic() + ", " + getStartTime()
- + ", " + getFinishTime() + ", " + getRoomName()
- + ", {" + attendeeIdString +"}}";
- }
- }