Interface.Stateless

Java, Groovy, Python, JavaScript and TypeScript

ide.Java.Interface.Stateless = true | false | xxx (default=false)

True | False

With the true value the interface is generated stateless and generic, and this type is then also an additional para­meter in the methods and in the Execute method of the rules module:

Entry in an LFET.Project.ini-file:
ide.Java.Interface.Stateless = true
Entry in an LFET.Project.yaml-file:
ide.Java:
  Enabled: true

  Interface:
    Stateless: true
Example of a ge­ne­ra­ted Java interface and rules module with this parameter:
interface ZahlungswegeOnlineshop_Iface<T>
{
  boolean isBestellwert_Gering(T model);
  boolean isBestellwert_Normal(T model);
class ZahlungswegeOnlineshop_RulesEngine
{
  <T> void execute(ZahlungswegeOnlineshop_Iface iface, T model)
  {
    if (iface.isBestellwert_Gering(model) )
    {
      if (iface.isRegionInnerhalbVonDeutschland_Nord(model) )
      {
        iface.doKreditkarteDPunktVISA_VISA(model);
        iface.doOnlineDPunktPaypal_Paypal(model);
        iface.doOnlineDPunktSofortueberweisungPunktDe_Sofort(model);
        iface.doLastschriftverfahren_LSV(model);
      }
For comparison, the same Java interface and rules module without this parameter:
interface ZahlungswegeOnlineshop_Iface
{
  booleanisBestellwert_Gering();
  booleanisBestellwert_Normal();
class ZahlungswegeOnlineshop_RulesEngine
{
  void execute(ZahlungswegeOnlineshop_Ifaceiface)
  {
    if(iface.isBestellwert_Gering() )
    {
      if (iface.isRegionInnerhalbVonDeutschland_Nord() )
      {
        iface.doKreditkarteDPunktVISA_VISA();
        iface.doOnlineDPunktPaypal_Paypal();
        iface.doOnlineDPunktSofortueberweisungPunktDe_Sofort();
        iface.doLastschriftverfahren_LSV();
      }

Bounded Type

ide.Java.Interface.Stateless = boundedType

With a value other than true or false the interface is generated stateless and generic with bounded type:

ide.Java.Interface.Stateless = package.MyType
Example of a ge­ne­ra­ted Java interface and rules module with this parameter:
interface ZahlungswegeOnlineshop_Iface<T extends package.MyType>
{
  public boolean isBestellwert_Gering(T model);
  public boolean isBestellwert_Normal(T model);
class ZahlungswegeOnlineshop_RulesEngine
{
  <T extends package.MyType> void execute(ZahlungswegeOnlineshop_Iface iface, T model)
  {
    if (iface.isBestellwert_Gering(model) )
    {
      if (iface.isRegionInnerhalbVonDeutschland_Nord(model) )
      {
        iface.doKreditkarteDPunktVISA_VISA(model);
        iface.doOnlineDPunktPaypal_Paypal(model);
        iface.doOnlineDPunktSofortueberweisungPunktDe_Sofort(model);
        iface.doLastschriftverfahren_LSV(model);
      }