Query (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.store.records, class: Query

Package org.apache.hadoop.hdfs.server.federation.store.records

# Class Query<T extends BaseRecord>

java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.records.Query<T>

Type Parameters:
  `T` - Type of the record to query.

public class Query<T extends BaseRecord> extends Object
Check if a record matches a query. The query is usually a partial record.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Query(T part)`
  Create a query to search for a partial record.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `getPartial()`
  Get the partial record used to query.
  `boolean`
  `matches(T other)`
  Check if a record matches the primary keys or the partial record.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Query

    public Query(T part)
    Create a query to search for a partial record.
    Parameters:
      `part` - It defines the attributes to search.

- ## Method Details

  - ### getPartial

    public T getPartial()
    Get the partial record used to query.
    Returns:
      The partial record used for the query.

  - ### matches

    public boolean matches(T other)
    Check if a record matches the primary keys or the partial record.
    Parameters:
      `other` - Record to check.
    Returns:
      If the record matches. Don't match if there is no partial.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`