public abstract class EntityUpdateBuilder extends Object
EntityUpdate
objects.Modifier | Constructor and Description |
---|---|
protected |
EntityUpdateBuilder(EntityDocument revision)
Initializes new builder object for constructing update of given base entity
revision.
|
protected |
EntityUpdateBuilder(EntityIdValue entityId,
long revisionId)
Initializes new builder object for constructing update of entity with given
ID.
|
Modifier and Type | Method and Description |
---|---|
abstract EntityUpdate |
build()
Creates new
EntityUpdate object with contents of this builder object. |
static EntityUpdateBuilder |
forBaseRevision(EntityDocument revision)
Creates new builder object for constructing update of given base entity
revision.
|
static EntityUpdateBuilder |
forBaseRevisionId(EntityIdValue entityId,
long revisionId)
Creates new builder object for constructing update of entity with given
revision ID.
|
static EntityUpdateBuilder |
forEntityId(EntityIdValue entityId)
Creates new builder object for constructing update of entity with given ID.
|
protected EntityUpdateBuilder(EntityIdValue entityId, long revisionId)
entityId
- ID of the entity that is to be updatedrevisionId
- ID of the base entity revision to be updated or zero if not
availableNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is as placeholder IDprotected EntityUpdateBuilder(EntityDocument revision)
revision
- base entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
has a placeholder IDpublic static EntityUpdateBuilder forBaseRevisionId(EntityIdValue entityId, long revisionId)
Supported entity IDs include ItemIdValue
, PropertyIdValue
,
LexemeIdValue
, FormIdValue
, SenseIdValue
, and
MediaInfoIdValue
.
entityId
- ID of the entity that is to be updatedrevisionId
- ID of the base entity revision to be updated or zero if not
availableNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is of unrecognized type or it's a placeholder
IDpublic static EntityUpdateBuilder forEntityId(EntityIdValue entityId)
Supported entity IDs include ItemIdValue
, PropertyIdValue
,
LexemeIdValue
, FormIdValue
, SenseIdValue
, and
MediaInfoIdValue
.
entityId
- ID of the entity that is to be updatedNullPointerException
- if entityId
is null
IllegalArgumentException
- if entityId
is of unrecognized type or it's a placeholder
IDpublic static EntityUpdateBuilder forBaseRevision(EntityDocument revision)
Supported entity types include ItemDocument
,
PropertyDocument
, LexemeDocument
, FormDocument
,
SenseDocument
, and MediaInfoDocument
.
revision
- base entity revision to be updatedNullPointerException
- if revision
is null
IllegalArgumentException
- if revision
is of unrecognized type or its ID is a
placeholder IDpublic abstract EntityUpdate build()
EntityUpdate
object with contents of this builder object.Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage