org.qi4j.api.usecase

## Class Usecase

- java.lang.Object
- - org.qi4j.api.usecase.Usecase

- All Implemented Interfaces:
    Serializable, MetaInfoHolder

      public final class Usecase
      extends Object
      implements Serializable, MetaInfoHolder

  A Usecase. A Usecase is used as a model for UnitOfWork, and helps implementations decide what to do in certain circumstances.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Usecase` | `DEFAULT`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `metaInfo(Class<T> infoType)` Meta-info for the usecase.
    `String` | `name()` Name of the usecase.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DEFAULT

          public static final Usecase DEFAULT

  - ### Method Detail

    - #### name

          public String name()

      Name of the usecase.
      Returns:
        the name

    - #### metaInfo

          public <T> T metaInfo(Class<T> infoType)

      Meta-info for the usecase. This can be of any type, and is typically set when creating the usecase and read during the execution of the usecase.
      Specified by:
        `metaInfo` in interface `MetaInfoHolder`
      Parameters:
        `infoType` - the MetaInfo type to retrieve.
      Returns:
        the previously stored metaInfo of the given type for the usecase.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`