public < E > long increment ( PartitionKey key , String fieldName , long amount , EntityMapper < E > entityMapper ) { Increment increment = entityMapper . mapToIncrement ( key , fieldName , amount ) ; HTableInterface table = pool . getTable ( tableName ) ; Result result ; try { result = table . increment ( increment ) ; } catch ( IOException e ) { throw new DatasetIOException ( "Error incrementing field." , e ) ; } return entityMapper . mapFromIncrementResult ( result , fieldName ) ; }
Execute an increment on an entity field . This field must be a type that supports increments . Returns the new increment value of type long .