本文整理汇总了Java中android.content.ContentProviderOperation.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java ContentProviderOperation.Builder方法的具体用法?Java ContentProviderOperation.Builder怎么用?Java ContentProviderOperation.Builder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.content.ContentProviderOperation
的用法示例。
在下文中一共展示了ContentProviderOperation.Builder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
for (RowData<T> rowData : mDelegates)
{
rowData.updatedBuilder(transactionContext, builder);
}
return builder;
}
示例2: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return mDelegate.updatedBuilder(transactionContext, builder)
.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, mFirstName == null ? null : mFirstName.toString())
.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, mLastName == null ? null : mLastName.toString());
}
示例3: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
// note that all data types use the same column for TYPE
return mDelegate.updatedBuilder(transactionContext, builder).withValue(ContactsContract.CommonDataKinds.Phone.TYPE, mType);
}
示例4: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return mDelegate.updatedBuilder(transactionContext, builder)
.withValue(ContactsContract.CommonDataKinds.Organization.JOB_DESCRIPTION, mJobDescription == null ? null : mJobDescription.toString());
}
示例5: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return builder
.withValue(ContactsContract.CommonDataKinds.Photo.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
.withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, mPhotoData);
}
示例6: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return mDelegate.updatedBuilder(transactionContext, builder)
// note this is universal, because all supported data types use the same type and label column for custom labels
.withValue(ContactsContract.CommonDataKinds.Phone.TYPE, ContactsContract.CommonDataKinds.BaseTypes.TYPE_CUSTOM)
.withValue(ContactsContract.CommonDataKinds.Phone.LABEL, mLabel.toString());
}
示例7: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return mDelegate.updatedBuilder(transactionContext, builder)
.withValue(ContactsContract.CommonDataKinds.StructuredName.PHONETIC_GIVEN_NAME, mFirstName == null ? null : mFirstName.toString())
.withValue(ContactsContract.CommonDataKinds.StructuredName.PHONETIC_MIDDLE_NAME, mMiddleName == null ? null : mMiddleName.toString())
.withValue(ContactsContract.CommonDataKinds.StructuredName.PHONETIC_FAMILY_NAME, mLastName == null ? null : mLastName.toString());
}
示例8: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return mDelegate.updatedBuilder(transactionContext, builder)
.withValue(ContactsContract.CommonDataKinds.StructuredPostal.REGION, mRegion == null ? null : mRegion.toString());
}
示例9: matchesSafely
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@Override
protected boolean matchesSafely(ContentProviderOperation.Builder builder, Description mismatchDescription)
{
Integer typeValue = new Field<Integer>(builder, "mType").value();
if (mExpectedType.ordinal() + 1 /* 1-based */ != typeValue)
{
mismatchDescription.appendText(String.format(Locale.ENGLISH, "was an %s operation", Type.values()[typeValue - 1]));
return false;
}
return true;
}
示例10: matchesSafely
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@Override
protected boolean matchesSafely(ContentProviderOperation.Builder builder, Description mismatchDescription)
{
boolean yieldable = new Field<Boolean>(builder, "mYieldAllowed").value();
if (mYieldable != yieldable)
{
mismatchDescription.appendText(String.format(Locale.ENGLISH, "yieldable was %s", Boolean.toString(yieldable)));
return false;
}
return true;
}
示例11: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return builder
.withValue(ContactsContract.CommonDataKinds.Note.MIMETYPE, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE)
.withValue(ContactsContract.CommonDataKinds.Note.NOTE, mNote.toString());
}
示例12: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
// add content item type here, so other name data can just delegate this part
return builder.withValue(ContactsContract.CommonDataKinds.StructuredName.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE);
}
示例13: updatedBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder updatedBuilder(TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder)
{
return builder.withValue(mKey, mValue == null ? null : mValue.toString());
}
示例14: putOperationBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder putOperationBuilder(@NonNull TransactionContext transactionContext)
{
return withSelection(ContentProviderOperation.newUpdate(mUri), BaseColumns._ID);
}
示例15: contentOperationBuilder
import android.content.ContentProviderOperation; //导入方法依赖的package包/类
@NonNull
@Override
public ContentProviderOperation.Builder contentOperationBuilder(@NonNull TransactionContext transactionContext) throws UnsupportedOperationException
{
return mDelegate.contentOperationBuilder(transactionContext).withValue("account_type", mAccount.type).withValue("account_name", mAccount.name);
}