Interface RecordView<R>

Type Parameters:
R - Mapped record type.
All Superinterfaces:
ContinuousQuerySource<R>, CriteriaQuerySource<R>, DataStreamerTarget<R>

public interface RecordView<R> extends DataStreamerTarget<R>, CriteriaQuerySource<R>, ContinuousQuerySource<R>
Table view interface provides methods to access table records.
See Also:
  • Method Details

    • get

      R get(@Nullable @Nullable Transaction tx, R keyRec)
      Gets a record with the same key column values as the given one from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      Record with all columns filled from the table.
    • getAsync

      CompletableFuture<R> getAsync(@Nullable @Nullable Transaction tx, R keyRec)
      Asynchronously gets a record with the same key column values as the given one from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • getAll

      List<R> getAll(@Nullable @Nullable Transaction tx, Collection<R> keyRecs)
      Gets records from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRecs - Records with key columns set. The records cannot be null.
      Returns:
      Records with all columns filled from the table. The order of collection elements is guaranteed to be the same as the order of keyRecs. If a record does not exist, the element at the corresponding index of the resulting collection is null.
    • getAllAsync

      CompletableFuture<List<R>> getAllAsync(@Nullable @Nullable Transaction tx, Collection<R> keyRecs)
      Asynchronously gets records from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRecs - Records with the key columns set. The records cannot be null.
      Returns:
      Future that will return records with all columns filled from the table. The order of collection elements is guaranteed to be the same as the order of keyRecs. If a record does not exist, the element at the corresponding index of the resulting collection is null.
    • contains

      boolean contains(@Nullable @Nullable Transaction tx, R keyRec)
      Determines whether a table contains an entry for the specified key.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - A record with key columns set. The key cannot be null.
      Returns:
      True if a value exists for every specified key, false otherwise.
      Throws:
      MarshallerException - if the key doesn't match the schema.
    • containsAsync

      CompletableFuture<Boolean> containsAsync(@Nullable @Nullable Transaction tx, R keyRec)
      Determines whether a table contains an entry for the specified key.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - A record with key columns set. The key cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
      Throws:
      MarshallerException - if the key doesn't match the schema.
    • containsAll

      boolean containsAll(@Nullable @Nullable Transaction tx, Collection<R> keys)
      Determines whether a table contains entries for all given keys.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keys - Keys whose presence is to be verified. The collection and it's values cannot be null.
      Returns:
      True if a value exists for every specified key, false otherwise.
      Throws:
      MarshallerException - if the key doesn't match the schema.
    • containsAllAsync

      CompletableFuture<Boolean> containsAllAsync(@Nullable @Nullable Transaction tx, Collection<R> keys)
      Determines whether a table contains entries for all given keys.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keys - Keys whose presence is to be verified. The collection and it's values cannot be null.
      Returns:
      Future that represents the pending completion of the operation. The result of the future will be true if a value exists for every specified key, false otherwise.
      Throws:
      MarshallerException - if the key doesn't match the schema.
    • upsert

      void upsert(@Nullable @Nullable Transaction tx, R rec)
      Inserts a record into a table, if it does not exist, or replaces an existing one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to insert into the table. The record cannot be null.
    • upsertAsync

      CompletableFuture<Void> upsertAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to insert into the table. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • upsertAll

      void upsertAll(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Inserts records into a table, if they do not exist, or replaces the existing ones.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to insert into the table. The records cannot be null.
    • upsertAllAsync

      CompletableFuture<Void> upsertAllAsync(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to insert into the table. The records cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • getAndUpsert

      R getAndUpsert(@Nullable @Nullable Transaction tx, R rec)
      Inserts a record into a table, or replaces an existing record and returns the replaced record.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - A record to insert into the table. The record cannot be null.
      Returns:
      Replaced record or null if it did not exist.
    • getAndUpsertAsync

      CompletableFuture<R> getAndUpsertAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously inserts a record into a table, or replaces an existing record and returns the replaced record.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to insert into the table. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • insert

      boolean insert(@Nullable @Nullable Transaction tx, R rec)
      Inserts a record into a table if it does not exists.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to insert into the table. The record cannot be null.
      Returns:
      True if successful, false otherwise.
    • insertAsync

      CompletableFuture<Boolean> insertAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously inserts a record into a table if it does not exists.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to insert into the table. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • insertAll

      List<R> insertAll(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Inserts into a table records that do not exist, skips those that exist.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to insert into the table. The records cannot be null.
      Returns:
      Skipped records. The order of collection elements is guaranteed to be the same as the order of recs. If a record is inserted, the element will be excluded from the collection result.
    • insertAllAsync

      CompletableFuture<List<R>> insertAllAsync(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Asynchronously inserts into a table records that do not exist, skips those that exist.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to insert into the table. The records cannot be null.
      Returns:
      Future representing pending completion of the operation, with rejected rows for insertion in the result. The order of collection elements is guaranteed to be the same as the order of recs. If a record is inserted, the element will be excluded from the collection result.
    • replace

      boolean replace(@Nullable @Nullable Transaction tx, R rec)
      Replaces an existing record associated with the same key column values as the given record.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to replace with. The record cannot be null.
      Returns:
      True if a record was found and replaced successfully, false otherwise.
    • replace

      boolean replace(@Nullable @Nullable Transaction tx, R oldRec, R newRec)
      Replaces an expected record in the table with the given new one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      oldRec - Record to replace. The record cannot be null.
      newRec - Record to replace with. The record cannot be null.
      Returns:
      True if a record was replaced successfully, false otherwise.
    • replaceAsync

      CompletableFuture<Boolean> replaceAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously replaces an existing record associated with the same key columns values as the given record.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to replace with. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • replaceAsync

      CompletableFuture<Boolean> replaceAsync(@Nullable @Nullable Transaction tx, R oldRec, R newRec)
      Asynchronously replaces an existing record in the table with the given new one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      oldRec - Record to replace. The record cannot be null.
      newRec - Record to replace with. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • getAndReplace

      R getAndReplace(@Nullable @Nullable Transaction tx, R rec)
      Gets an existing record associated with the same key columns values as the given one, then replaces it with the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to replace with. The record cannot be null.
      Returns:
      Replaced record or null if it did not exist.
    • getAndReplaceAsync

      CompletableFuture<R> getAndReplaceAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously gets an existing record associated with the same key column values as the given one, then replaces it with the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to replace with. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • delete

      boolean delete(@Nullable @Nullable Transaction tx, R keyRec)
      Deletes a record with the same key column values as the given one from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      True if removed successfully, false otherwise.
    • deleteAsync

      CompletableFuture<Boolean> deleteAsync(@Nullable @Nullable Transaction tx, R keyRec)
      Asynchronously deletes a record with the same key column values as the given one from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • deleteExact

      boolean deleteExact(@Nullable @Nullable Transaction tx, R rec)
      Deletes the given record from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to delete. The record cannot be null.
      Returns:
      True if removed successfully, false otherwise.
    • deleteExactAsync

      CompletableFuture<Boolean> deleteExactAsync(@Nullable @Nullable Transaction tx, R rec)
      Asynchronously deletes the given record from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      rec - Record to delete. The record cannot be null.
      Returns:
      Future tha represents the pending completion of the operation.
    • getAndDelete

      R getAndDelete(@Nullable @Nullable Transaction tx, R keyRec)
      Gets and deletes from a table a record with the same key column values as the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      Removed record or null if it did not exist.
    • getAndDeleteAsync

      CompletableFuture<R> getAndDeleteAsync(@Nullable @Nullable Transaction tx, R keyRec)
      Asynchronously gets and deletes from a table a record with the same key columns values as the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRec - Record with the key columns set. The record cannot be null.
      Returns:
      Future that represents the pending completion of the operation.
    • deleteAll

      List<R> deleteAll(@Nullable @Nullable Transaction tx, Collection<R> keyRecs)
      Removes from a table records with the same key column values as the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRecs - Records with the key columns set. The records cannot be null.
      Returns:
      Records with the key columns set that did not exist. The order of collection elements is guaranteed to be the same as the order of keyRecs. If a record is removed, the element will be excluded from the collection result.
    • deleteAllAsync

      CompletableFuture<List<R>> deleteAllAsync(@Nullable @Nullable Transaction tx, Collection<R> keyRecs)
      Asynchronously removes from a table records with the same key column values as the given one.
      Parameters:
      tx - Transaction or null for implicit transaction.
      keyRecs - Records with the key columns set. The records cannot be null.
      Returns:
      Future represents the pending completion of the operation, with rejected rows for deletion in the result. The order of collection elements is guaranteed to be the same as the order of keyRecs. If a record is removed, the element will be excluded from the collection result.
    • deleteAllExact

      List<R> deleteAllExact(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Remove the given records from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to delete. The records cannot be null.
      Returns:
      Records that were not deleted. The order of collection elements is guaranteed to be the same as the order of recs. If a record is removed, the element will be excluded from the collection result.
    • deleteAllExactAsync

      CompletableFuture<List<R>> deleteAllExactAsync(@Nullable @Nullable Transaction tx, Collection<R> recs)
      Asynchronously removes the given records from a table.
      Parameters:
      tx - Transaction or null for implicit transaction.
      recs - Records to delete. The records cannot be null.
      Returns:
      Future represents the pending completion of the operation, with rejected rows for deletion in the result. The order of collection elements is guaranteed to be the same as the order of recs. If a record is removed, the element will be excluded from the collection result.