Provides interfaces to a union type representing values which may contain one of many different sub-types. These are useful for specifying search criteria and composite return values.

The value of searches specified using the criteria of this package when the MAJ API is used in conjunction with a persistence entity manager is not clear. In this case, it is far better to define queries using an expressive query language that make use of the optimised search algorithms of the underlying store (database). However, searching using criteria is implemented in for searching for {@linkplain tv.amwa.maj.model.Package packages} and {@linkplain tv.amwa.maj.model.EssenceData essence data} in the MAJ API in a way that can be used by a standalone application. These methods use the {@linkplain tv.amwa.maj.union.SearchCriteria search criteria} defined in this package.

The {@linkplain tv.amwa.maj.union.IdentificationCriteria identification criteria} and {@linkplain tv.amwa.maj.union.DefinitionCriteria definition criteria} defined in this package are not currently used in the MAJ API and may be deprecated in the near future.

## Heritage

The original versions of the interfaces of this package were derived from the `union` type definitions in the existing C-based AAF reference implementation, from file "`AAFTypes.h`". Java does not have a union type definition so abstract interfaces are used instead, with each sub-interface representing an element of the union. This is a little bit cumbersome as it requires several files Java for a concept that can be expressed so simply in C. However, it achieves the same result as each search criteria only takes the memory required to represent that criteria.

An example of the union type definition a set of criteria were derived from is:

        typedef struct _aafDefinitionCrit_t
        {
            aafDefinitionCritType_t type;
            union
            {
                aafDefinitionKind_t    defKind;
                aafString_t            name;
                aafClassID_t           objClass;
            } tags;
        } aafDefinitionCrit_t;

This converts into the Java abstract interface {@link tv.amwa.maj.union.DefinitionCriteria DefinitionCriteria} with sub-interfaces {@link tv.amwa.maj.union.DefinitionCriteriaByKind DefinitionCriteriaByKind}, {@link tv.amwa.maj.union.DefinitionCriteriaByName DefinitionCriteriaByName} and {@link tv.amwa.maj.union.DefinitionCriteriaByClass DefinitionCriteriaByClass}. The type of the definition criteria is specified by enumeration {@link tv.amwa.maj.union.DefinitionCriteriaType DefinitionCriteriaType}.

@see tv.amwa.maj.model.ContentStorage#getPackages(SearchCriteria) @see tv.amwa.maj.model.Preface#getPackages(SearchCriteria)