be.SIRAPRISE.client.jsba
Annotation Type ConstructorFor


public @interface ConstructorFor

The ConstructorFor annotation allows the jsba runtime to decide which constructor to use for building jsba objects from the tuples in a relation returned from a query. The jsba runtime searches for and selects the constructor to use in the following order of preference :

  1. A public constructor with a single argument of a type/class that implements the Tuple interface. It is the responsibility of the designer to ensure that only one such constructor exists. If more than one such constructor exists, results are unpredictable.
  2. A public constructor annotated by a ConstructorFor annotation. The constructor selected will be the one that : It is the responsibility of the designer to ensure that only one such constructor exists (i.e. there cannot be 'draws' in terms of attribute count). If more than one such constructors can be found, results are unpredictable.
  3. A public no-arg constructor.

Author:
Erwin

Required Element Summary
 java.lang.String[] attributeNames
          The name(s) of the attributes to which the arguments in the annotated constructor correspond.
 

Element Detail

attributeNames

public abstract java.lang.String[] attributeNames
The name(s) of the attributes to which the arguments in the annotated constructor correspond. There must be exactly as many attribute names in the annotation as there are arguments in the constructor.