001: package com.xoetrope.pm;
002:
003: /**
004: * A generic structure to model telephone numbers
005: *
006: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
007: * the GNU Public License (GPL), please see license.txt for more details. If
008: * you make commercial use of this software you must purchase a commercial
009: * license from Xoetrope.</p>
010: * <p> $Revision: 1.2 $</p>
011: */
012: public class TelephoneNumber extends ProjectManagementObject implements
013: Cloneable {
014: protected String number;
015: protected String areaCode;
016: protected String countryCode;
017: protected String extension;
018:
019: /**
020: * Create a new telephone number
021: */
022: public TelephoneNumber() {
023: super ("TelephoneNumber");
024: }
025:
026: /**
027: * Create a copy of this telephone number object
028: * @return a new clone instance
029: */
030: public Object clone() {
031: try {
032: Object cloned = super .clone();
033: ((ProjectManagementObject) cloned).id = getNextId("TelephoneNumber");
034: return cloned;
035: } catch (CloneNotSupportedException e) {
036: return null;
037: }
038: }
039:
040: /**
041: * Get the local phone number
042: * @return the number
043: */
044: public String getNumber() {
045: return number;
046: }
047:
048: /**
049: * Get the area code
050: * @return the code
051: */
052: public String getAreaCode() {
053: return areaCode;
054: }
055:
056: /**
057: * Get the country code
058: * @return the code
059: */
060: public String getCountryCode() {
061: return countryCode;
062: }
063:
064: /**
065: * Get the extension number
066: * @return the extension
067: */
068: public String getExtension() {
069: return extension;
070: }
071:
072: /**
073: * Set the local number
074: * @param newValue the new value
075: */
076: public void setNumber(String newValue) {
077: number = newValue;
078: }
079:
080: /**
081: * Set the area code
082: * @param newValue the new value
083: */
084: public void setAreaCode(String newValue) {
085: areaCode = newValue;
086: }
087:
088: /**
089: * Set the country code
090: * @param newValue the new value
091: */
092: public void setCountryCode(String newValue) {
093: countryCode = newValue;
094: }
095:
096: /**
097: * Set the extension
098: * @param newValue the new value
099: */
100: public void setExtension(String newValue) {
101: extension = newValue;
102: }
103: }
|