org.qi4j.api.usecase
Class Usecase

java.lang.Object
  extended by org.qi4j.api.usecase.Usecase
All Implemented Interfaces:
Serializable

public final class Usecase
extends Object
implements Serializable

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
static Usecase DEFAULT
           
 
Method Summary
<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.

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