@Override public boolean exists(final long number) { return this.region .table(DyTalks.TBL) .frame() .through( new QueryValve() .withLimit(1) .withIndexName(DyTalks.IDX_NUMBERS) .withConsistentRead(false)) .where(DyTalks.ATTR_NUMBER, Conditions.equalTo(number)) .iterator() .hasNext(); }
@Override public Talk get(final long number) { return new DyTalk( this.region .table(DyTalks.TBL) .frame() .through( new QueryValve() .withLimit(1) .withIndexName(DyTalks.IDX_NUMBERS) .withConsistentRead(false) .withSelect(Select.SPECIFIC_ATTRIBUTES) .withAttributesToGet(DyTalks.HASH, DyTalks.ATTR_NUMBER)) .where(DyTalks.ATTR_NUMBER, Conditions.equalTo(number)) .iterator() .next()); }
@Override public Frame where(final String name, final String value) { return this.where(name, Conditions.equalTo(value)); }