Class FileExportQuery

java.lang.Object
io.gdcc.spi.export.FileExportQuery

public final class FileExportQuery extends Object
Defines what file metadata to retrieve and at what level of detail for file-oriented export operations.

This is a pure data-shape specification: it answers which files should be included and how much detail about them should be fetched. It deliberately does not address how much data to retrieve per call — pagination is a separate, orthogonal concern expressed via a PageRequest at the method level.

A FileExportQuery may be used standalone in file-centric export methods, or composed inside a DatasetExportQuery to specify how file metadata should be shaped within a dataset export.

Instances are immutable and must be constructed via builder() or cloned using builder(FileExportQuery). Use all() for the standard "all files" query with no special filtering. Use none() for the standard "no files" query.

See Also:
  • Method Details

    • builder

      public static FileExportQuery.Builder builder()
      Returns a builder for creating new queries.
    • builder

      public static FileExportQuery.Builder builder(FileExportQuery source)
      Creates a new Builder instance initialized with the properties of the given FileExportQuery.
      Parameters:
      source - the FileExportQuery instance from which to copy properties
      Returns:
      a new Builder instance with properties copied from the provided query
    • all

      public static FileExportQuery all()
      Get a simple query: "include all files without filtering any nor including special details"
      Returns:
      ALL
    • none

      public static FileExportQuery none()
      Get a simple query: "skip all files"
      Returns:
      NONE
    • predicates

      public Set<FileMetadataPredicates> predicates()
      Returns the file metadata predicates that control which files are included and what level of detail is fetched for each.
      Returns:
      an unmodifiable set of FileMetadataPredicates; never null
    • requires

      public boolean requires(FileMetadataPredicates predicate)
      Determine if this query was built requiring a certain FileMetadataPredicates.
      Parameters:
      predicate - to check for
      Returns:
      true if required, false otherwise
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object