Class EntityUpdateImpl

java.lang.Object
org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
All Implemented Interfaces:
EntityUpdate
Direct Known Subclasses:
StatementDocumentUpdateImpl

public abstract class EntityUpdateImpl extends Object implements EntityUpdate
Jackson implementation of EntityUpdate.
  • Constructor Details

    • EntityUpdateImpl

      protected EntityUpdateImpl(EntityIdValue entityId, long revisionId)
      Initializes new entity update.
      Parameters:
      entityId - ID of the entity that is to be updated
      revisionId - base entity revision to be updated or zero if not available
      Throws:
      NullPointerException - if entityId is null
      IllegalArgumentException - if entityId is a placeholder ID or it does not match base revision document ID (if provided)
  • Method Details

    • getEntityId

      public EntityIdValue getEntityId()
      Description copied from interface: EntityUpdate
      Returns ID of the entity that is being updated.
      Specified by:
      getEntityId in interface EntityUpdate
      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 interface EntityUpdate
      Returns:
      entity revision that is being updated or zero