summaryrefslogtreecommitdiff
path: root/src/com/google/wireless/gdata2/contacts/data/Organization.java
blob: ca1125236c301472d6c7c7689e42aa7dabe9eb80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
 * Copyright (C) 2009 The Android Open Source Project
 */

package com.google.wireless.gdata2.contacts.data;

/** The Organization GData type. */
public class Organization extends ContactsElement {
  public static final byte TYPE_WORK = 1;
  public static final byte TYPE_OTHER = 2;

  private String name;
  private String nameYomi;
  private String title;
  private String orgDepartment;
  private String orgJobDescription;
  private String orgSymbol;
  private String where;

  /**
   * default empty constructor
   */
  public Organization() {}
  public Organization(String name, String nameYomi, String title, String orgDepartment,
          String orgJobDescription, String orgSymbol, String where,
        byte type, String label, boolean isPrimary) {
      super(type, label, isPrimary);
      this.name = name;
      this.nameYomi = nameYomi;
      this.title = title;
      this.orgDepartment = orgDepartment;
      this.orgJobDescription = orgJobDescription;
      this.orgSymbol = orgSymbol;
      this.where = where;
  }
 
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  /**
   * Getter for nameYomi
   */
  public String getNameYomi() {
      return this.nameYomi;
  }
  
  /**
   * Setter for nameYomi
   */
  public void setNameYomi(String nameYomi) {
    this.nameYomi = nameYomi;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  /**
   * Getter for orgDepartment
   */
  public String getOrgDepartment() {
      return this.orgDepartment;
  }
  
  /**
   * Setter for orgDepartment
   */
  public void setOrgDepartment(String orgDepartment) {
    this.orgDepartment = orgDepartment;
  }

  /**
   * Getter for orgJobDescription
   */
  public String getOrgJobDescription() {
      return this.orgJobDescription;
  }

  /**
   * Setter for orgJobDescription
   */
  public void setOrgJobDescription(String orgJobDescription) {
    this.orgJobDescription = orgJobDescription;
  }

  /**
   * Getter for orgSymbol
   */
  public String getOrgSymbol() {
      return this.orgSymbol;
  }
  
  /**
   * Setter for orgSymbol
   */
  public void setOrgSymbol(String orgSymbol) {
    this.orgSymbol = orgSymbol;
  }

  /**
   * A place associated with the organization, e.g. office 
   * location. In Contacts, this is just a string value.
   */
  public String getWhere() {
      return this.where;
  }
  
  /**
  * A place associated with the organization, e.g. office 
   * location. In Contacts, this is just a string value.
   */
  public void setWhere(String where) {
    this.where = where;
  }

  public void toString(StringBuffer sb) {
    sb.append("Organization");
    super.toString(sb);
    if (name != null) sb.append(" name:").append(name);
    if (title != null) sb.append(" title:").append(title);
    if (orgDepartment != null) sb.append(" orgDepartment:").append(orgDepartment);
    if (orgJobDescription != null) sb.append(" orgJobDescription:").append(orgJobDescription);
    if (orgSymbol != null) sb.append(" orgSymbol:").append(orgSymbol);
    if (nameYomi != null) sb.append(" nameYomi:").append(nameYomi);
 }
}