Class EntityUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
- All Implemented Interfaces:
EntityUpdate
- Direct Known Subclasses:
StatementDocumentUpdateImpl
Jackson implementation of
EntityUpdate
.-
Constructor Summary
ModifierConstructorDescriptionprotected
EntityUpdateImpl
(EntityIdValue entityId, long revisionId) Initializes new entity update. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns entity revision, upon which this update is built.Returns ID of the entity that is being updated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate
isEmpty
-
Constructor Details
-
EntityUpdateImpl
Initializes new entity update.- Parameters:
entityId
- ID of the entity that is to be updatedrevisionId
- base entity revision to be updated or zero if not available- Throws:
NullPointerException
- ifentityId
isnull
IllegalArgumentException
- ifentityId
is a placeholder ID or it does not match base revision document ID (if provided)
-
-
Method Details
-
getEntityId
Description copied from interface:EntityUpdate
Returns ID of the entity that is being updated.- Specified by:
getEntityId
in interfaceEntityUpdate
- Returns:
- ID of the updated entity
-
getBaseRevisionId
public long getBaseRevisionId()Description copied from interface:EntityUpdate
Returns entity revision, upon which this update is built. This might not be the latest revision of the entity as currently stored in Wikibase. If base revision was not provided, this method returns zero.- Specified by:
getBaseRevisionId
in interfaceEntityUpdate
- Returns:
- entity revision that is being updated or zero
-