12644d947574240b71c427d457f7a775dc160ec09Yorke Lee/* 22644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Copyright (C) 2012 The Android Open Source Project 32644d947574240b71c427d457f7a775dc160ec09Yorke Lee * 42644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Licensed under the Apache License, Version 2.0 (the "License"); 52644d947574240b71c427d457f7a775dc160ec09Yorke Lee * you may not use this file except in compliance with the License. 62644d947574240b71c427d457f7a775dc160ec09Yorke Lee * You may obtain a copy of the License at 72644d947574240b71c427d457f7a775dc160ec09Yorke Lee * 82644d947574240b71c427d457f7a775dc160ec09Yorke Lee * http://www.apache.org/licenses/LICENSE-2.0 92644d947574240b71c427d457f7a775dc160ec09Yorke Lee * 102644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Unless required by applicable law or agreed to in writing, software 112644d947574240b71c427d457f7a775dc160ec09Yorke Lee * distributed under the License is distributed on an "AS IS" BASIS, 122644d947574240b71c427d457f7a775dc160ec09Yorke Lee * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 132644d947574240b71c427d457f7a775dc160ec09Yorke Lee * See the License for the specific language governing permissions and 142644d947574240b71c427d457f7a775dc160ec09Yorke Lee * limitations under the License. 152644d947574240b71c427d457f7a775dc160ec09Yorke Lee */ 162644d947574240b71c427d457f7a775dc160ec09Yorke Lee 1769c182afb0e6d82a341a28b4317aa703af768906Gary Maipackage com.android.contacts.model.dataitem; 182644d947574240b71c427d457f7a775dc160ec09Yorke Lee 192644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.content.ContentValues; 202644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.provider.ContactsContract; 212644d947574240b71c427d457f7a775dc160ec09Yorke Leeimport android.provider.ContactsContract.CommonDataKinds.Organization; 222644d947574240b71c427d457f7a775dc160ec09Yorke Lee 232644d947574240b71c427d457f7a775dc160ec09Yorke Lee/** 242644d947574240b71c427d457f7a775dc160ec09Yorke Lee * Represents an organization data item, wrapping the columns in 252644d947574240b71c427d457f7a775dc160ec09Yorke Lee * {@link ContactsContract.CommonDataKinds.Organization}. 262644d947574240b71c427d457f7a775dc160ec09Yorke Lee */ 272644d947574240b71c427d457f7a775dc160ec09Yorke Leepublic class OrganizationDataItem extends DataItem { 282644d947574240b71c427d457f7a775dc160ec09Yorke Lee 292644d947574240b71c427d457f7a775dc160ec09Yorke Lee /* package */ OrganizationDataItem(ContentValues values) { 302644d947574240b71c427d457f7a775dc160ec09Yorke Lee super(values); 312644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 322644d947574240b71c427d457f7a775dc160ec09Yorke Lee 332644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getCompany() { 342644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.COMPANY); 352644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 362644d947574240b71c427d457f7a775dc160ec09Yorke Lee 372644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getLabel() { 382644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.LABEL); 392644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 402644d947574240b71c427d457f7a775dc160ec09Yorke Lee 412644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getTitle() { 422644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.TITLE); 432644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 442644d947574240b71c427d457f7a775dc160ec09Yorke Lee 452644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getDepartment() { 462644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.DEPARTMENT); 472644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 482644d947574240b71c427d457f7a775dc160ec09Yorke Lee 492644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getJobDescription() { 502644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.JOB_DESCRIPTION); 512644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 522644d947574240b71c427d457f7a775dc160ec09Yorke Lee 532644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getSymbol() { 542644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.SYMBOL); 552644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 562644d947574240b71c427d457f7a775dc160ec09Yorke Lee 572644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getPhoneticName() { 582644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.PHONETIC_NAME); 592644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 602644d947574240b71c427d457f7a775dc160ec09Yorke Lee 612644d947574240b71c427d457f7a775dc160ec09Yorke Lee public String getOfficeLocation() { 622644d947574240b71c427d457f7a775dc160ec09Yorke Lee return getContentValues().getAsString(Organization.OFFICE_LOCATION); 632644d947574240b71c427d457f7a775dc160ec09Yorke Lee } 642644d947574240b71c427d457f7a775dc160ec09Yorke Lee} 65