Class GenerationProvider

java.lang.Object
org.nuclos.api.provider.GenerationProvider

public class GenerationProvider extends Object
GenerationProvider provides methods for executing nuclos generations

This Class is usually used in Rule-classes and allows API access only

Author:
Matthias Reichart
  • Constructor Details

    • GenerationProvider

      GenerationProvider()
  • Method Details

    • setGenerationService

      public void setGenerationService(GenerationService genService)
    • execute

      public static <S extends BusinessObject, T extends BusinessObject> T execute(S s, Class<? extends Generation<S,T>> genClass) throws BusinessException
      Using the source object this method runs the given generation and returns the new created target object. The generation is type-safe, which determines the type of the source and the target object
      Parameters:
      s - - type-specific source-object
      genClass - Generation<S,T> - type-specific generation
      Returns:
      T - target-object
      Throws:
      BusinessException
    • execute

      public static <S extends BusinessObject, T extends BusinessObject> List<T> execute(List<S> s, Class<? extends Generation<S,T>> genClass) throws BusinessException
      Using the source objects this method runs the given generation and returns the new created target objects. The generation is type-safe, which determines the type of the source and the target objects.
      Note: If the generation object enables 'group by'-functionality, all grouping-arguments will be used. Otherwise for each source a target will be created and returned in the result list.
      Parameters:
      s - List<S> s - type-specific source-object
      genClass - Generation<S,T> genClass - type-specific generation
      Returns:
      List<T> - List of target-objects
      Throws:
      BusinessException