Package jadex.bridge.service.search
Class ServiceQuery.Multiplicity
- java.lang.Object
- 
- jadex.bridge.service.search.ServiceQuery.Multiplicity
 
- 
- Enclosing class:
- ServiceQuery<T>
 
 public static class ServiceQuery.Multiplicity extends java.lang.ObjectDefine cases for multiplicity.
- 
- 
Field SummaryFields Modifier and Type Field Description static ServiceQuery.MultiplicityONE'1' multiplicity for required service (default for searchService methods).static ServiceQuery.MultiplicityONE_MANY'1..*' multiplicity for required service (default for searchService methods).static ServiceQuery.MultiplicityZERO_MANY'0..*' multiplicity for optional multi service (default for searchServices methods).static ServiceQuery.MultiplicityZERO_ONE'0..1' multiplicity for single optional service.
 - 
Constructor SummaryConstructors Constructor Description Multiplicity()Bean constructor.Multiplicity(int from, int to)Create a multiplicity.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFrom()Get the 'from' value, i.e.intgetTo()Get the 'to' value, i.e.voidsetFrom(int from)Set the 'from' value, i.e.voidsetTo(int to)Get the 'to' value, i.e.java.lang.StringtoString()Get a string representation of the multiplicity.
 
- 
- 
- 
Field Detail- 
ZERO_ONEpublic static ServiceQuery.Multiplicity ZERO_ONE '0..1' multiplicity for single optional service.
 - 
ONEpublic static ServiceQuery.Multiplicity ONE '1' multiplicity for required service (default for searchService methods).
 - 
ZERO_MANYpublic static ServiceQuery.Multiplicity ZERO_MANY '0..*' multiplicity for optional multi service (default for searchServices methods).
 - 
ONE_MANYpublic static ServiceQuery.Multiplicity ONE_MANY '1..*' multiplicity for required service (default for searchService methods).
 
- 
 - 
Constructor Detail- 
Multiplicitypublic Multiplicity() Bean constructor. Not meant for direct use. Defaults to invalid multiplicity ('0..0')!
 - 
Multiplicitypublic 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 Detail- 
getFrompublic int getFrom() Get the 'from' value, i.e. the minimal number of services required. Otherwise search ends with ServiceNotFoundException.
 - 
setFrompublic 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
 
 - 
getTopublic int getTo() Get the 'to' value, i.e. The maximal number of services returned. Afterwards search/query will terminate.
 - 
setTopublic 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.
 
 - 
toStringpublic java.lang.String toString() Get a string representation of the multiplicity.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-