com.openexchange.api
Class OXContact

java.lang.Object
  extended bycom.openexchange.api.OXObject
      extended bycom.openexchange.api.OXSqlObject
          extended bycom.openexchange.api.OXCommon
              extended bycom.openexchange.api.OXContact
All Implemented Interfaces:
java.lang.Cloneable

public class OXContact
extends OXCommon

OXContact

Author:
Sebastian Kauss

Nested Class Summary
 class OXContact.DistributionList
           
 class OXContact.SearchQuery
           
 
Field Summary
static java.lang.String ANNIVERSARY
           
static java.lang.String ASSISTANTS_NAME
           
static java.lang.String BIRTHDAY
           
static java.lang.String BRANCHES
           
static java.lang.String BUSINESS_CATEGORY
           
static java.lang.String BUSINESS_CITY
           
static java.lang.String BUSINESS_COUNTRY
           
static java.lang.String BUSINESS_POSTAL_CODE
           
static java.lang.String BUSINESS_STATE
           
static java.lang.String BUSINESS_STREET
           
static java.lang.String CALLBACK
           
static java.lang.String CITY
           
static java.lang.String COMMERCIAL_REGISTER
           
static java.lang.String COMPANY
           
static java.lang.String COUNTRY
           
static java.lang.String DEFAULTADDRESS
           
static int DEFAULTFOLDER
           
static java.lang.String DEPARTMENT
           
static java.lang.String DISPLAY_NAME
           
static java.lang.String DISTRIBUTIONLIST
           
static java.lang.String DISTRIBUTIONLIST_FLAG
           
static java.lang.String EMAIL1
           
static java.lang.String EMAIL2
           
static java.lang.String EMAIL3
           
static int EMAILFIELD1
           
static int EMAILFIELD2
           
static int EMAILFIELD3
           
static java.lang.String EMPLOYEE_TYPE
           
static java.lang.String FAX_BUSINESS
           
static java.lang.String FAX_HOME
           
static java.lang.String FAX_OTHER
           
static java.lang.String FIRST_NAME
           
static java.lang.String IMAGE1
           
static int INDEPENDENT
           
static java.lang.String INSTANT_MESSENGER
           
static java.lang.String INSTANT_MESSENGER2
           
static java.lang.String IP_PHONE
           
static java.lang.String ISDN
           
static java.lang.String LAST_NAME
           
static java.lang.String LINK_FLAG
           
static java.lang.String LINKS
           
static java.lang.String MANAGERS_NAME
           
static java.lang.String MARTITAL_STATUS
           
static java.lang.String MOBILE1
           
static java.lang.String MOBILE2
           
static java.lang.String MORE_INFO
           
static java.lang.String NICKNAME
           
static java.lang.String NOTE
           
static java.lang.String NUMBER_OF_CHILDREN
           
static java.lang.String NUMBER_OF_EMPLOYEE
           
static java.lang.String PAGER
           
static java.lang.String PHONE_ASSISTANT
           
static java.lang.String PHONE_BUSINESS
           
static java.lang.String PHONE_BUSINESS2
           
static java.lang.String PHONE_CAR
           
static java.lang.String PHONE_COMPANY
           
static java.lang.String PHONE_HOME
           
static java.lang.String PHONE_HOME2
           
static java.lang.String PHONE_OTHER
           
static java.lang.String POSITION
           
static java.lang.String POSTAL_CODE
           
static java.lang.String PRIMARY
           
static java.lang.String PROFESSION
           
static java.lang.String RADIO
           
static java.lang.String ROOM_NUMBER
           
static java.lang.String SALES_VOLUME
           
static java.lang.String SECOND_CITY
           
static java.lang.String SECOND_COUNTRY
           
static java.lang.String SECOND_NAME
           
static java.lang.String SECOND_POSTAL_CODE
           
static java.lang.String SECOND_STATE
           
static java.lang.String SECOND_STREET
           
static java.lang.String SPOUSE_NAME
           
static java.lang.String STATE
           
static java.lang.String STREET
           
static java.lang.String SUFFIX
           
static java.lang.String TAX_ID
           
static java.lang.String TELEX
           
static java.lang.String TITLE
           
static java.lang.String TTY_TDD
           
static java.lang.String URL
           
static java.lang.String USERFIELD01
           
static java.lang.String USERFIELD02
           
static java.lang.String USERFIELD03
           
static java.lang.String USERFIELD04
           
static java.lang.String USERFIELD05
           
static java.lang.String USERFIELD06
           
static java.lang.String USERFIELD07
           
static java.lang.String USERFIELD08
           
static java.lang.String USERFIELD09
           
static java.lang.String USERFIELD10
           
static java.lang.String USERFIELD11
           
static java.lang.String USERFIELD12
           
static java.lang.String USERFIELD13
           
static java.lang.String USERFIELD14
           
static java.lang.String USERFIELD15
           
static java.lang.String USERFIELD16
           
static java.lang.String USERFIELD17
           
static java.lang.String USERFIELD18
           
static java.lang.String USERFIELD19
           
static java.lang.String USERFIELD20
           
 
Fields inherited from class com.openexchange.api.OXCommon
ATTACHMENT_FLAG, CATEGORIES, CREATED_BY, FOLDER_ID, MODIFIED_BY, PERSONAL_FOLDER_ID
 
Fields inherited from class com.openexchange.api.OXSqlObject
DELETED, NEW_AND_MODIFIED
 
Fields inherited from class com.openexchange.api.OXObject
CREATION_TIME, LAST_MODIFIED, OBJECT_ID
 
Method Summary
 void addLink(int contact_id, java.lang.String displayname)
          add the contact with the given id and displayname to the actuell contact
 java.lang.Object clone()
          clones the object
 OXObject create(java.lang.Object internalobject)
           
static OXContact createOXContact(java.lang.Object internalobject)
          creates a new Instance of OXContact
 void createQuery(OXContact.SearchQuery oxsearch)
          creates a extended Query with the given SearchQuery
 void delete()
          delete the contact
 java.util.Date getAnniversary()
          return the anniversary
 java.util.Date getBirthday()
          return the birthday
 java.lang.String getDisplayname()
          return the Displayname
 OXContact.DistributionList getDistributionList()
          return the DistributionList
 int getDoublicateID()
          return the id of the object with the same attributes.
 java.lang.String getFirstname()
          return the Firstname
 java.lang.String getLastname()
          return the Lastname
 java.lang.String getLinkName(int contact_id)
          return the name of the linked list of the given contact_id
 int[] getLinks()
          return an array of ids of all linked contacts
 OXSearchQuery getSearchQuery()
          return the OXSearchQuery
 boolean isDistributionList()
          return true if the contact contains a distributionlist otherwise false
 void load()
          load the object with all informations
 void removeLink(int contact_id)
          remove the contact with the given id from the actuell contact
 void reset()
          reset the object to the default values
 void save()
          save the contact
 void setAnniversary(java.util.Date anniversary)
          set the anniversary
 void setBirthday(java.util.Date birthday)
          set the birthday
 void setDeleteQuery(java.util.Date since)
          creates a Query to get private deleted objects since
 void setDeleteQuery(java.util.Date since, int folder_id)
          creates a Query to get all deleted objects since given date in folder
 void setDisplayname(java.lang.String displayname)
          set the Displayname
 void setDistributionList(OXContact.DistributionList distributionlist)
          set the Distributionlist
 void setFirstname(java.lang.String firstname)
          set the Firstname
 void setLastname(java.lang.String lastname)
          set the Lastname
 void setSimpleQuery(java.util.Date since)
          creates a Query to get all private objects since the given date
 void setSimpleQuery(java.util.Date since, int folder_id)
          creates a Query to get all private objects since the given date in folder
 
Methods inherited from class com.openexchange.api.OXCommon
delete, delete, getCreatedBy, getFolderID, getModifiedBy, hasAttachments, load, setFolderID, setReturnnames
 
Methods inherited from class com.openexchange.api.OXSqlObject
canDelete, canRead, canWrite, destroy, getNext, getSQL_ORDER, getSQL_SELECT, getSQL_WHERE, getSQL, insert, load, setSQL_ORDER, setSQL_WHERE, setSQL
 
Methods inherited from class com.openexchange.api.OXObject
contains, get, getConnection, getCreationTime, getInternalFieldname, getLastModified, getMandatoryFields, getMappedField, getObjectID, getPassword, getReadableFields, getUser, getWriteableFields, isNull, iterator, put, remove, set, setInternalObject, setObjectID, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISPLAY_NAME

public static final java.lang.String DISPLAY_NAME
See Also:
Constant Field Values

LAST_NAME

public static final java.lang.String LAST_NAME
See Also:
Constant Field Values

FIRST_NAME

public static final java.lang.String FIRST_NAME
See Also:
Constant Field Values

SECOND_NAME

public static final java.lang.String SECOND_NAME
See Also:
Constant Field Values

SUFFIX

public static final java.lang.String SUFFIX
See Also:
Constant Field Values

TITLE

public static final java.lang.String TITLE
See Also:
Constant Field Values

STREET

public static final java.lang.String STREET
See Also:
Constant Field Values

POSTAL_CODE

public static final java.lang.String POSTAL_CODE
See Also:
Constant Field Values

CITY

public static final java.lang.String CITY
See Also:
Constant Field Values

STATE

public static final java.lang.String STATE
See Also:
Constant Field Values

COUNTRY

public static final java.lang.String COUNTRY
See Also:
Constant Field Values

BIRTHDAY

public static final java.lang.String BIRTHDAY
See Also:
Constant Field Values

MARTITAL_STATUS

public static final java.lang.String MARTITAL_STATUS
See Also:
Constant Field Values

NUMBER_OF_CHILDREN

public static final java.lang.String NUMBER_OF_CHILDREN
See Also:
Constant Field Values

PROFESSION

public static final java.lang.String PROFESSION
See Also:
Constant Field Values

NICKNAME

public static final java.lang.String NICKNAME
See Also:
Constant Field Values

SPOUSE_NAME

public static final java.lang.String SPOUSE_NAME
See Also:
Constant Field Values

ANNIVERSARY

public static final java.lang.String ANNIVERSARY
See Also:
Constant Field Values

NOTE

public static final java.lang.String NOTE
See Also:
Constant Field Values

DEPARTMENT

public static final java.lang.String DEPARTMENT
See Also:
Constant Field Values

POSITION

public static final java.lang.String POSITION
See Also:
Constant Field Values

EMPLOYEE_TYPE

public static final java.lang.String EMPLOYEE_TYPE
See Also:
Constant Field Values

ROOM_NUMBER

public static final java.lang.String ROOM_NUMBER
See Also:
Constant Field Values

BUSINESS_STREET

public static final java.lang.String BUSINESS_STREET
See Also:
Constant Field Values

BUSINESS_POSTAL_CODE

public static final java.lang.String BUSINESS_POSTAL_CODE
See Also:
Constant Field Values

BUSINESS_CITY

public static final java.lang.String BUSINESS_CITY
See Also:
Constant Field Values

BUSINESS_STATE

public static final java.lang.String BUSINESS_STATE
See Also:
Constant Field Values

BUSINESS_COUNTRY

public static final java.lang.String BUSINESS_COUNTRY
See Also:
Constant Field Values

NUMBER_OF_EMPLOYEE

public static final java.lang.String NUMBER_OF_EMPLOYEE
See Also:
Constant Field Values

SALES_VOLUME

public static final java.lang.String SALES_VOLUME
See Also:
Constant Field Values

TAX_ID

public static final java.lang.String TAX_ID
See Also:
Constant Field Values

COMMERCIAL_REGISTER

public static final java.lang.String COMMERCIAL_REGISTER
See Also:
Constant Field Values

BRANCHES

public static final java.lang.String BRANCHES
See Also:
Constant Field Values

BUSINESS_CATEGORY

public static final java.lang.String BUSINESS_CATEGORY
See Also:
Constant Field Values

MORE_INFO

public static final java.lang.String MORE_INFO
See Also:
Constant Field Values

MANAGERS_NAME

public static final java.lang.String MANAGERS_NAME
See Also:
Constant Field Values

ASSISTANTS_NAME

public static final java.lang.String ASSISTANTS_NAME
See Also:
Constant Field Values

SECOND_STREET

public static final java.lang.String SECOND_STREET
See Also:
Constant Field Values

SECOND_POSTAL_CODE

public static final java.lang.String SECOND_POSTAL_CODE
See Also:
Constant Field Values

SECOND_CITY

public static final java.lang.String SECOND_CITY
See Also:
Constant Field Values

SECOND_STATE

public static final java.lang.String SECOND_STATE
See Also:
Constant Field Values

SECOND_COUNTRY

public static final java.lang.String SECOND_COUNTRY
See Also:
Constant Field Values

PHONE_BUSINESS

public static final java.lang.String PHONE_BUSINESS
See Also:
Constant Field Values

PHONE_BUSINESS2

public static final java.lang.String PHONE_BUSINESS2
See Also:
Constant Field Values

FAX_BUSINESS

public static final java.lang.String FAX_BUSINESS
See Also:
Constant Field Values

CALLBACK

public static final java.lang.String CALLBACK
See Also:
Constant Field Values

PHONE_CAR

public static final java.lang.String PHONE_CAR
See Also:
Constant Field Values

PHONE_COMPANY

public static final java.lang.String PHONE_COMPANY
See Also:
Constant Field Values

PHONE_HOME

public static final java.lang.String PHONE_HOME
See Also:
Constant Field Values

PHONE_HOME2

public static final java.lang.String PHONE_HOME2
See Also:
Constant Field Values

FAX_HOME

public static final java.lang.String FAX_HOME
See Also:
Constant Field Values

MOBILE1

public static final java.lang.String MOBILE1
See Also:
Constant Field Values

MOBILE2

public static final java.lang.String MOBILE2
See Also:
Constant Field Values

PHONE_OTHER

public static final java.lang.String PHONE_OTHER
See Also:
Constant Field Values

FAX_OTHER

public static final java.lang.String FAX_OTHER
See Also:
Constant Field Values

EMAIL1

public static final java.lang.String EMAIL1
See Also:
Constant Field Values

EMAIL2

public static final java.lang.String EMAIL2
See Also:
Constant Field Values

EMAIL3

public static final java.lang.String EMAIL3
See Also:
Constant Field Values

URL

public static final java.lang.String URL
See Also:
Constant Field Values

ISDN

public static final java.lang.String ISDN
See Also:
Constant Field Values

PAGER

public static final java.lang.String PAGER
See Also:
Constant Field Values

PRIMARY

public static final java.lang.String PRIMARY
See Also:
Constant Field Values

RADIO

public static final java.lang.String RADIO
See Also:
Constant Field Values

TELEX

public static final java.lang.String TELEX
See Also:
Constant Field Values

TTY_TDD

public static final java.lang.String TTY_TDD
See Also:
Constant Field Values

INSTANT_MESSENGER

public static final java.lang.String INSTANT_MESSENGER
See Also:
Constant Field Values

INSTANT_MESSENGER2

public static final java.lang.String INSTANT_MESSENGER2
See Also:
Constant Field Values

IP_PHONE

public static final java.lang.String IP_PHONE
See Also:
Constant Field Values

USERFIELD01

public static final java.lang.String USERFIELD01
See Also:
Constant Field Values

USERFIELD02

public static final java.lang.String USERFIELD02
See Also:
Constant Field Values

USERFIELD03

public static final java.lang.String USERFIELD03
See Also:
Constant Field Values

USERFIELD04

public static final java.lang.String USERFIELD04
See Also:
Constant Field Values

USERFIELD05

public static final java.lang.String USERFIELD05
See Also:
Constant Field Values

USERFIELD06

public static final java.lang.String USERFIELD06
See Also:
Constant Field Values

USERFIELD07

public static final java.lang.String USERFIELD07
See Also:
Constant Field Values

USERFIELD08

public static final java.lang.String USERFIELD08
See Also:
Constant Field Values

USERFIELD09

public static final java.lang.String USERFIELD09
See Also:
Constant Field Values

USERFIELD10

public static final java.lang.String USERFIELD10
See Also:
Constant Field Values

USERFIELD11

public static final java.lang.String USERFIELD11
See Also:
Constant Field Values

USERFIELD12

public static final java.lang.String USERFIELD12
See Also:
Constant Field Values

USERFIELD13

public static final java.lang.String USERFIELD13
See Also:
Constant Field Values

USERFIELD14

public static final java.lang.String USERFIELD14
See Also:
Constant Field Values

USERFIELD15

public static final java.lang.String USERFIELD15
See Also:
Constant Field Values

USERFIELD16

public static final java.lang.String USERFIELD16
See Also:
Constant Field Values

USERFIELD17

public static final java.lang.String USERFIELD17
See Also:
Constant Field Values

USERFIELD18

public static final java.lang.String USERFIELD18
See Also:
Constant Field Values

USERFIELD19

public static final java.lang.String USERFIELD19
See Also:
Constant Field Values

USERFIELD20

public static final java.lang.String USERFIELD20
See Also:
Constant Field Values

PHONE_ASSISTANT

public static final java.lang.String PHONE_ASSISTANT
See Also:
Constant Field Values

DEFAULTADDRESS

public static final java.lang.String DEFAULTADDRESS
See Also:
Constant Field Values

COMPANY

public static final java.lang.String COMPANY
See Also:
Constant Field Values

DISTRIBUTIONLIST

public static final java.lang.String DISTRIBUTIONLIST
See Also:
Constant Field Values

DISTRIBUTIONLIST_FLAG

public static final java.lang.String DISTRIBUTIONLIST_FLAG
See Also:
Constant Field Values

LINKS

public static final java.lang.String LINKS
See Also:
Constant Field Values

LINK_FLAG

public static final java.lang.String LINK_FLAG
See Also:
Constant Field Values

IMAGE1

public static final java.lang.String IMAGE1
See Also:
Constant Field Values

INDEPENDENT

public static final int INDEPENDENT
See Also:
Constant Field Values

EMAILFIELD1

public static final int EMAILFIELD1
See Also:
Constant Field Values

EMAILFIELD2

public static final int EMAILFIELD2
See Also:
Constant Field Values

EMAILFIELD3

public static final int EMAILFIELD3
See Also:
Constant Field Values

DEFAULTFOLDER

public static final int DEFAULTFOLDER
See Also:
Constant Field Values
Method Detail

create

public OXObject create(java.lang.Object internalobject)

createOXContact

public static OXContact createOXContact(java.lang.Object internalobject)
                                 throws OXPermissionException
creates a new Instance of OXContact

Parameters:
internalobject -
Returns:
oxcontact
Throws:
OXPermissionException

setDeleteQuery

public void setDeleteQuery(java.util.Date since)
                    throws java.lang.Exception,
                           OXConflictException,
                           OXPermissionException
creates a Query to get private deleted objects since

Specified by:
setDeleteQuery in class OXCommon
Parameters:
since -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

setDeleteQuery

public void setDeleteQuery(java.util.Date since,
                           int folder_id)
                    throws java.lang.Exception,
                           OXPermissionException
creates a Query to get all deleted objects since given date in folder

Parameters:
since -
folder_id -
Throws:
java.lang.Exception
OXPermissionException

setSimpleQuery

public void setSimpleQuery(java.util.Date since)
                    throws java.lang.Exception,
                           OXConflictException,
                           OXPermissionException
creates a Query to get all private objects since the given date

Specified by:
setSimpleQuery in class OXCommon
Parameters:
since -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

setSimpleQuery

public void setSimpleQuery(java.util.Date since,
                           int folder_id)
                    throws java.lang.Exception,
                           OXConflictException,
                           OXPermissionException
creates a Query to get all private objects since the given date in folder

Specified by:
setSimpleQuery in class OXCommon
Parameters:
since -
folder_id -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

createQuery

public void createQuery(OXContact.SearchQuery oxsearch)
                 throws java.lang.Exception,
                        OXConflictException
creates a extended Query with the given SearchQuery

Parameters:
oxsearch -
Throws:
java.lang.Exception
OXConflictException

load

public void load()
          throws java.lang.Exception,
                 OXConflictException,
                 OXPermissionException
load the object with all informations

Specified by:
load in class OXSqlObject
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

getBirthday

public java.util.Date getBirthday()
return the birthday

Returns:
birthday

getAnniversary

public java.util.Date getAnniversary()
return the anniversary

Returns:
anniverary

getLastname

public java.lang.String getLastname()
return the Lastname

Returns:
lastname

getFirstname

public java.lang.String getFirstname()
return the Firstname

Returns:
firstname

getDisplayname

public java.lang.String getDisplayname()
return the Displayname

Returns:
displayname

getDistributionList

public OXContact.DistributionList getDistributionList()
return the DistributionList

Returns:
distributionlist

getSearchQuery

public OXSearchQuery getSearchQuery()
return the OXSearchQuery

Specified by:
getSearchQuery in class OXSqlObject
Returns:
oxsearchquery

isDistributionList

public boolean isDistributionList()
return true if the contact contains a distributionlist otherwise false

Returns:
has_distributionlist

getLinkName

public java.lang.String getLinkName(int contact_id)
return the name of the linked list of the given contact_id

Returns:
displayname

getLinks

public int[] getLinks()
return an array of ids of all linked contacts

Returns:
linked_contacts

setBirthday

public void setBirthday(java.util.Date birthday)
set the birthday

Parameters:
birthday -

setAnniversary

public void setAnniversary(java.util.Date anniversary)
set the anniversary

Parameters:
anniversary -

setLastname

public void setLastname(java.lang.String lastname)
set the Lastname

Parameters:
lastname -

setFirstname

public void setFirstname(java.lang.String firstname)
set the Firstname

Parameters:
firstname -

setDisplayname

public void setDisplayname(java.lang.String displayname)
set the Displayname

Parameters:
displayname -

setDistributionList

public void setDistributionList(OXContact.DistributionList distributionlist)
set the Distributionlist

Parameters:
distributionlist -

addLink

public void addLink(int contact_id,
                    java.lang.String displayname)
add the contact with the given id and displayname to the actuell contact

Parameters:
contact_id -
displayname -

removeLink

public void removeLink(int contact_id)
remove the contact with the given id from the actuell contact

Parameters:
contact_id -

save

public void save()
          throws java.lang.Exception
save the contact

Specified by:
save in class OXSqlObject
Throws:
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception,
                   OXPermissionException,
                   OXConflictException
delete the contact

Specified by:
delete in class OXObject
Returns:
true if delete was successful
Throws:
java.lang.Exception
OXPermissionException
OXConflictException

reset

public void reset()
reset the object to the default values

Overrides:
reset in class OXSqlObject

getDoublicateID

public int getDoublicateID()
return the id of the object with the same attributes. Returns -1 if no equal object found.

Specified by:
getDoublicateID in class OXCommon

clone

public java.lang.Object clone()
clones the object

Overrides:
clone in class OXCommon