AttendeeValue.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:2k
源码类别:
Java编程
开发平台:
Java
- package com.borland.training.meetings.sessions;
- import java.util.*;
- public class AttendeeValue implements java.io.Serializable {
- private Long id;
- private String name;
- private String position;
- private String title;
- private Collection meetingIds;
- private String phone;
- private String email;
- public AttendeeValue(Long id, String name, String position,
- String title, String phone, String email, Collection meetingIds) {
- setId(id);
- setName(name);
- setPosition(position);
- setTitle(title);
- setPhone(phone);
- setEmail(email);
- setMeetingIds(meetingIds);
- }
- public AttendeeValue(String name, String position,
- String title, String phone, String email, Collection meetingIds) {
- this(new Long(0), name, position, title, phone, email, meetingIds);
- }
- public AttendeeValue(String name, String position, String title,
- String phone, String email) {
- this(new Long(0), name, position, title, phone, email, new Vector());
- }
- private void setId(Long id) {this.id = id;}
- public Long getId() { return this.id;}
- public void setName(String name) {this.name = name;}
- public String getName() {return this.name;}
- public void setTitle(String title) {this.title = title;}
- public String getTitle() {return this.title;}
- public void setPosition(String position) {this.position = position;}
- public String getPosition() {return this.position;}
- public void setMeetingIds(Collection meetingIds) {this.meetingIds = meetingIds;}
- public Collection getMeetingIds() {return meetingIds;}
- public void setPhone(String phone) {
- this.phone = phone;
- }
- public String getPhone() {
- return phone;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getEmail() {
- return email;
- }
- public String toString() {
- String meetingIdString = "";
- Iterator iterator = getMeetingIds().iterator();
- Long id;
- if(iterator.hasNext()) {
- id = (Long) iterator.next();
- meetingIdString = meetingIdString + id;
- }
- while(iterator.hasNext()) {
- id = (Long) iterator.next();
- meetingIdString = meetingIdString + ", " + id;
- }
- return "{" + getId() + ", " + getName() + ", " + getPosition()
- + ", " + getTitle() + ", " + getPhone() + ", " + getEmail()
- + ", {" + meetingIdString + "}}";
- }
- }