Package com.dnanexus

Class DXDataObject.DescribeOptions

  • Enclosing class:
    DXDataObject

    public static class DXDataObject.DescribeOptions
    extends Object
    Configuration options for a describe call on a data object (e.g. DXDataObject.describe(DescribeOptions)) to control what optional fields get returned and what project to obtain project-specific metadata from.

    Examples:

     DescribeOptions.get().inProject(proj).withDetails()
    DescribeOptions.get().withProperties()
    • Method Detail

      • get

        public static DXDataObject.DescribeOptions get()
        Returns a default instance of DescribeOptions that returns no optional fields and selects the project arbitrarily.
        Returns:
        a newly initialized DescribeOptions object
      • inProject

        public DXDataObject.DescribeOptions inProject​(DXContainer project)
        Returns a DescribeOptions that behaves like the current one, except that project-specific metadata will be retrieved from the specified project or container. Attempts to invoke accessors on the resulting DXDataObject.Describe object corresponding to fields that were not requested will throw IllegalStateException.
        Parameters:
        project - project or container from which to obtain project-specific metadata
        Returns:
        a new DescribeOptions object
      • withCustomFields

        public DXDataObject.DescribeOptions withCustomFields​(String... fieldNamesToInclude)
        Returns a DescribeOptions that behaves like the current one, except that only the specified fields will be included in the result. Attempts to invoke accessors on the resulting DXDataObject.Describe object corresponding to fields that were not requested will throw IllegalStateException.
        Parameters:
        fieldNamesToInclude - API fields to be included
        Returns:
        a new DescribeOptions object
      • withCustomFields

        public DXDataObject.DescribeOptions withCustomFields​(Collection<? extends String> fieldNamesToInclude)
        Returns a DescribeOptions that behaves like the current one, except that only the fields in the specified collection will be included in the result.
        Parameters:
        fieldNamesToInclude - collection of API fields to be included
        Returns:
        a new DescribeOptions object
      • withDetails

        public DXDataObject.DescribeOptions withDetails()
        Returns a DescribeOptions that behaves like the current one, except that the details field will be included in the result.
        Returns:
        a new DescribeOptions object
      • withProperties

        public DXDataObject.DescribeOptions withProperties()
        Returns a DescribeOptions that behaves like the current one, except that the properties field will be included in the result.
        Returns:
        a new DescribeOptions object