Package org.bgerp.cache

# Class ProcessTypeCache

java.lang.Object
org.bgerp.cache.Cache<ProcessTypeCache>
org.bgerp.cache.ProcessTypeCache

public class ProcessTypeCache extends Cache<ProcessTypeCache>
In-memory process types cache.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProcessTypeCache()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `flush(Connection con)`
  `static ProcessType`
  `getProcessType(int id)`
  Retrieves process type object.
  `static Map<Integer,ProcessType>`
  `getProcessTypeMap()`
  `static ProcessType`
  `getProcessTypeOrThrow(int id)`
  Gets process type by ID.
  `static ProcessType`
  `getProcessTypeSafe(int id)`
  Retrieves process type object null-safe.
  `static List<Status>`
  `getStatusList()`
  `static Map<Integer,Status>`
  `getStatusMap()`
  `static Status`
  `getStatusSafe(int statusId)`
  `static List<ProcessType>`
  `getTypeList()`
  `static List<ProcessType>`
  `getTypePath(int id)`
  `static ProcessType`
  `getTypeTreeRoot()`
  `protected ProcessTypeCache`
  `newInstance()`
  Creates a new cache instance

  ### Methods inherited from class org.bgerp.cache.Cache

  `isValid`

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

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

- ## Constructor Details

  - ### ProcessTypeCache

    public ProcessTypeCache()

- ## Method Details

  - ### getProcessTypeMap

    public static Map<Integer,ProcessType> getProcessTypeMap()

  - ### getProcessType

    public static ProcessType getProcessType(int id)
    Retrieves process type object.
    Parameters:
      `id` - ID.
    Returns:
      type instance or `null`.

  - ### getProcessTypeOrThrow

    public static ProcessType getProcessTypeOrThrow(int id) throws javassist.NotFoundException
    Gets process type by ID.
    Parameters:
      `id` - ID.
    Returns:
    Throws:
      `javassist.NotFoundException`

  - ### getProcessTypeSafe

    public static ProcessType getProcessTypeSafe(int id)
    Retrieves process type object null-safe.
    Parameters:
      `id` - ID.
    Returns:
      type instance or mock object with a title, generated out of `id`.

  - ### getTypeTreeRoot

    public static ProcessType getTypeTreeRoot()

  - ### getTypeList

    public static List<ProcessType> getTypeList()

  - ### getStatusList

    public static List<Status> getStatusList()

  - ### getStatusMap

    public static Map<Integer,Status> getStatusMap()

  - ### getStatusSafe

    public static Status getStatusSafe(int statusId)

  - ### getTypePath

    public static List<ProcessType> getTypePath(int id)

  - ### flush

    public static void flush(Connection con)

  - ### newInstance

    protected ProcessTypeCache newInstance()
    Description copied from class: `Cache`
    Creates a new cache instance
    Specified by:
      `newInstance` in class `Cache<ProcessTypeCache>`
    Returns:
      the instance