1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.car.dialer.storage; 18 19 import androidx.annotation.Nullable; 20 import androidx.room.Entity; 21 import androidx.room.PrimaryKey; 22 23 /** Favorite number entity */ 24 @Entity(tableName = "favorite_number_entity") 25 public class FavoriteNumberEntity { 26 @PrimaryKey(autoGenerate = true) 27 private int mIndex; 28 29 private String mContactLookupKey; 30 31 /** Needed to refresh the contact lookup uri. */ 32 private long mContactId; 33 34 private CipherWrapper<String> mPhoneNumber; 35 36 private String mAccountName; 37 38 private String mAccountType; 39 setIndex(int index)40 public void setIndex(int index) { 41 mIndex = index; 42 } 43 getIndex()44 public int getIndex() { 45 return mIndex; 46 } 47 setContactLookupKey(String contactLookupKey)48 public void setContactLookupKey(String contactLookupKey) { 49 mContactLookupKey = contactLookupKey; 50 } 51 getContactLookupKey()52 public String getContactLookupKey() { 53 return mContactLookupKey; 54 } 55 setContactId(long contactId)56 public void setContactId(long contactId) { 57 mContactId = contactId; 58 } 59 getContactId()60 public long getContactId() { 61 return mContactId; 62 } 63 setPhoneNumber(@ullable CipherWrapper<String> phoneNumber)64 public void setPhoneNumber(@Nullable CipherWrapper<String> phoneNumber) { 65 mPhoneNumber = phoneNumber; 66 } 67 68 @Nullable getPhoneNumber()69 public CipherWrapper<String> getPhoneNumber() { 70 return mPhoneNumber; 71 } 72 setAccountName(String accountName)73 public void setAccountName(String accountName) { 74 mAccountName = accountName; 75 } 76 getAccountName()77 public String getAccountName() { 78 return mAccountName; 79 } 80 setAccountType(String accountType)81 public void setAccountType(String accountType) { 82 mAccountType = accountType; 83 } 84 getAccountType()85 public String getAccountType() { 86 return mAccountType; 87 } 88 } 89