@ExperimentalAppSearchApi
public class Person.BuilderBase<T extends Person.BuilderBase<T>> extends Thing.BuilderBase

Known direct subclasses
Person.Builder

Builder class for Person.


Summary

Public constructors

Constructor for Person.BuilderBase with all the existing values of an Person.

BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String name
)

Constructor for Person.BuilderBase.

Public methods

@NonNull Person

Builds the Person.

@NonNull T

Sets a list of AdditionalName for that Person.

@NonNull T

Sets a list of affiliations for this Person.

@NonNull T
setBot(boolean isBot)

Sets whether this Person is a bot.

@NonNull T

Sets a list of ContactPoint for the Person.

@NonNull T

Sets the external Uri from a String representation for this Person.

@NonNull T
setExternalUri(@NonNull Uri externalUri)

Sets an external Uri for this Person.

@NonNull T

Sets the family name of this Person.

@NonNull T

Sets the given name of this Person.

@NonNull T

Sets the Uri of the profile image from a String representation for the Person.

@NonNull T
setImageUri(@NonNull Uri imageUri)

Sets the Uri of the profile image for the Person.

@NonNull T
setImportant(boolean isImportant)

Sets whether this Person is important.

@NonNull T

Sets whether this Person is a bot.

@NonNull T

Sets whether this Person is important.

@NonNull T

Sets the middle name of this Person.

@NonNull T

Sets the notes about this Person.

@NonNull T

Sets a list of relations for this Person, like "Father" or "Mother".

Inherited methods

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(@NonNull Person person)

Constructor for Person.BuilderBase with all the existing values of an Person.

Parameters
@NonNull Person person

The existing Person to copy values from.

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String name
)

Constructor for Person.BuilderBase.

Parameters
@NonNull String namespace

Namespace for the Person Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Person Document. See Document.Id.

@NonNull String name

The searchable full name of this Person. E.g. "Larry Page", or "Page, Larry".

Public methods

build

public @NonNull Person build()

Builds the Person.

setAdditionalNames

Added in 1.2.0-alpha02
public @NonNullsetAdditionalNames(@NonNull List<Person.AdditionalName> additionalNames)

Sets a list of AdditionalName for that Person.

Only types defined in AdditionalName.NameType are accepted.

setAffiliations

Added in 1.2.0-alpha02
public @NonNullsetAffiliations(@NonNull List<String> affiliations)

Sets a list of affiliations for this Person. Like company, school, etc.

setBot

Added in 1.2.0-alpha02
public @NonNullsetBot(boolean isBot)

Sets whether this Person is a bot.

setContactPoints

Added in 1.2.0-alpha02
public @NonNullsetContactPoints(@NonNull List<ContactPoint> contactPoints)

Sets a list of ContactPoint for the Person.

More information could be found in ContactPoint.

setExternalUri

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
public @NonNullsetExternalUri(@NonNull String externalUri)

Sets the external Uri from a String representation for this Person. A Uri can be any of the following:

For mailto: and tel: URI schemes, it is recommended that the path portion refers to a valid contact in the Contacts Provider.

setExternalUri

Added in 1.2.0-alpha02
public @NonNullsetExternalUri(@NonNull Uri externalUri)

Sets an external Uri for this Person. Or null if no Uri is provided. A Uri can be any of the following:

For mailto: and tel: URI schemes, it is recommended that the path portion refers to a valid contact in the Contacts Provider.

setFamilyName

Added in 1.2.0-alpha02
public @NonNullsetFamilyName(@NonNull String familyName)

Sets the family name of this Person.

setGivenName

Added in 1.2.0-alpha02
public @NonNullsetGivenName(@NonNull String givenName)

Sets the given name of this Person.

setImageUri

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
public @NonNullsetImageUri(@NonNull String imageUri)

Sets the Uri of the profile image from a String representation for the Person.

setImageUri

Added in 1.2.0-alpha02
public @NonNullsetImageUri(@NonNull Uri imageUri)

Sets the Uri of the profile image for the Person.

setImportant

Added in 1.2.0-alpha02
public @NonNullsetImportant(boolean isImportant)

Sets whether this Person is important.

setIsBot

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
public @NonNullsetIsBot(boolean isBot)

Sets whether this Person is a bot.

setIsImportant

Added in 1.2.0-alpha02
@ExperimentalAppSearchApi
public @NonNullsetIsImportant(boolean isImportant)

Sets whether this Person is important.

setMiddleName

Added in 1.2.0-alpha02
public @NonNullsetMiddleName(@NonNull String middleName)

Sets the middle name of this Person.

For Person with multiple middle names, they can all be set in this single string. Each middle name could be separated by a whitespace like "middleName1 middleName2 middleName3".

setNotes

Added in 1.2.0-alpha02
public @NonNullsetNotes(@NonNull List<String> notes)

Sets the notes about this Person.

setRelations

Added in 1.2.0-alpha02
public @NonNullsetRelations(@NonNull List<String> relations)

Sets a list of relations for this Person, like "Father" or "Mother".