org.qi4j.api.usecase
Class Usecase
java.lang.Object
org.qi4j.api.usecase.Usecase
- All Implemented Interfaces:
- java.io.Serializable, MetaInfoHolder
public final class Usecase
- extends java.lang.Object
- implements java.io.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
Method Summary |
|
metaInfo(java.lang.Class<T> infoType)
Meta-info for the usecase. |
java.lang.String |
name()
Name of the usecase. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT
public static final Usecase DEFAULT
name
public java.lang.String name()
- Name of the usecase.
- Returns:
- the name
metaInfo
public <T> T metaInfo(java.lang.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 java.lang.String toString()
- Overrides:
toString
in class java.lang.Object