Dmitri Plotnikov | e843f91 | 2010-09-16 15:21:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | */ |
Dmitri Plotnikov | 18ffaa2 | 2010-12-03 14:28:00 -0800 | [diff] [blame^] | 16 | package com.android.contacts; |
Dmitri Plotnikov | e843f91 | 2010-09-16 15:21:48 -0700 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * Meta-data for a contact group. We load all groups associated with the contact's |
| 20 | * constituent accounts. |
| 21 | */ |
| 22 | public final class GroupMetaData { |
| 23 | private String mAccountName; |
| 24 | private String mAccountType; |
| 25 | private long mGroupId; |
| 26 | private String mTitle; |
| 27 | private boolean mDefaultGroup; |
| 28 | private boolean mFavorites; |
| 29 | |
| 30 | public GroupMetaData(String accountName, String accountType, long groupId, String title, |
| 31 | boolean defaultGroup, boolean favorites) { |
Dmitri Plotnikov | 18ffaa2 | 2010-12-03 14:28:00 -0800 | [diff] [blame^] | 32 | this.mAccountName = accountName; |
| 33 | this.mAccountType = accountType; |
Dmitri Plotnikov | e843f91 | 2010-09-16 15:21:48 -0700 | [diff] [blame] | 34 | this.mGroupId = groupId; |
| 35 | this.mTitle = title; |
| 36 | this.mDefaultGroup = defaultGroup; |
| 37 | this.mFavorites = favorites; |
| 38 | } |
| 39 | |
| 40 | public String getAccountName() { |
| 41 | return mAccountName; |
| 42 | } |
| 43 | |
| 44 | public String getAccountType() { |
| 45 | return mAccountType; |
| 46 | } |
| 47 | |
| 48 | public long getGroupId() { |
| 49 | return mGroupId; |
| 50 | } |
| 51 | |
| 52 | public String getTitle() { |
| 53 | return mTitle; |
| 54 | } |
| 55 | |
| 56 | public boolean isDefaultGroup() { |
| 57 | return mDefaultGroup; |
| 58 | } |
| 59 | |
| 60 | public boolean isFavorites() { |
| 61 | return mFavorites; |
| 62 | } |
Dmitri Plotnikov | 18ffaa2 | 2010-12-03 14:28:00 -0800 | [diff] [blame^] | 63 | } |