Class ParameterSupport


  • public class ParameterSupport
    extends Object
    Helper class to handle EJBQL query parameters.
    Author:
    Michael Bouschen, Shing Wai Chan
    • Constructor Detail

      • ParameterSupport

        public ParameterSupport​(Method method)
        Constructor.
        Parameters:
        method - the Method instance of the finder/selector method.
    • Method Detail

      • getParameterType

        public Class getParameterType​(String ejbqlParamDecl)
        Returns type of the EJBQL parameter by input parameter declaration string. The specified string denotes a parameter application in EJBQL. It has the form "?" where is the parameter number starting with 1.
        Returns:
        class instance representing the parameter type.
      • getParameterType

        public Class getParameterType​(int paramNumber)
        Returns the type of the EJBQL parameter by number. Note, the numbering of EJBQL parameters starts with 1, so the method expects 1 as the number of the first parameter.
        Returns:
        class instance representing the parameter type.
      • getParameterEjbName

        public String getParameterEjbName​(String ejbqlParamDecl)
        Get EJB name corresponding to the EJBQL parameter by input parameter declaration string.
        Parameters:
        ejbqlParamDecl - denotes a parameter application in EJBQL. It has the form "?" where is the parameter number starting with 1.
        Returns:
        class instance representing the parameter type.
      • getParameterEjbName

        public String getParameterEjbName​(int paramNumber)
        Get EJB name corresponding to the EJBQL parameter number.
        Parameters:
        paramNumber - numbering of parameters starting with 1
        Returns:
        class instance representing the parameter type.
      • setParameterEjbName

        public void setParameterEjbName​(String ejbqlParamDecl,
                                        String ejbName)
        Set EJB name corresponding to the EJBQL parameter by input parameter declaration string.
        Parameters:
        ejbqlParamDecl - denotes a parameter application in EJBQL. It has the form "?" where is the parameter number starting with 1.
        ejbName -
      • getParameterEjbNames

        public String[] getParameterEjbNames()
        Get all EJB names corresponding to the EJBQL parameters.
        Returns:
        class instance representing the parameter type.
      • getParameterName

        public String getParameterName​(String ejbqlParamDecl)
        Returns the name of the corresponding JDO parameter. The specified string denotes a parameter application in EJBQL. It has the form "?" where is the parameter number starting with 1.
        Returns:
        name of JDOQL parameter
      • getParameterName

        public String getParameterName​(int paramNumber)
        Returns the name of the corresponding JDO parameter by parameter number.
        Returns:
        name of JDOQL parameter
      • getParameterCount

        public int getParameterCount()
        Returns the number of parameters.
        Returns:
        parameter count.