Class ServiceQuery.Multiplicity

java.lang.Object
jadex.providedservice.impl.search.ServiceQuery.Multiplicity
Enclosing class:
ServiceQuery<T>

public static class ServiceQuery.Multiplicity extends Object
Define cases for multiplicity.
  • Field Details

    • MANY

      public static final int MANY
      Constant for multiplicity many.
      See Also:
    • UNDEFINED

      public static final int UNDEFINED
      Constant for multiplicity undefined.
      See Also:
    • ZERO_ONE

      public static ServiceQuery.Multiplicity ZERO_ONE
      '0..1' multiplicity for single optional service.
    • ONE

      public static ServiceQuery.Multiplicity ONE
      '1' multiplicity for required service (default for searchService methods).
    • ZERO_MANY

      public static ServiceQuery.Multiplicity ZERO_MANY
      '0..*' multiplicity for optional multi service (default for searchServices methods).
    • ONE_MANY

      public static ServiceQuery.Multiplicity ONE_MANY
      '1..*' multiplicity for required service (default for searchService methods).
  • Constructor Details

    • Multiplicity

      public Multiplicity()
      Bean constructor. Not meant for direct use. Defaults to invalid multiplicity ('0..0')!
    • Multiplicity

      public Multiplicity(int from, int to)
      Create a multiplicity.
      Parameters:
      from - The minimal number of services for the search/query being considered successful (positive integer or 0).
      to - The maximal number of services returned by the search/query (positive integer or -1 for unlimited).
  • Method Details

    • getFrom

      public int getFrom()
      Get the 'from' value, i.e. the minimal number of services required. Otherwise search ends with ServiceNotFoundException.
    • setFrom

      public void setFrom(int from)
      Set the 'from' value, i.e. the minimal number of services required. Otherwise search ends with ServiceNotFoundException.
      Parameters:
      from - Positive integer or 0
    • getTo

      public int getTo()
      Get the 'to' value, i.e. The maximal number of services returned. Afterwards search/query will terminate.
    • setTo

      public void setTo(int to)
      Get the 'to' value, i.e. The maximal number of services returned. Afterwards search/query will terminate.
      Parameters:
      to - Positive integer or -1 for unlimited.
    • toString

      public String toString()
      Get a string representation of the multiplicity.
      Overrides:
      toString in class Object