Implementing the QueryFunction class

This topic describes the steps needed to implement your new QueryFunction class.

To implement your new QueryFunction, you must:
  • Add private filter or configuration properties.
  • Create getters and setters for any filter properties you add.
  • For any property that is not a String, create a setter property that takes a String and does conversion.
  • Define a no-arg constructor (protected access modifier optional, but recommended).
  • Implement the abstract methods getSetters, getGetters, applyToENEQuery, applyToDiscoveryServiceQuery, and toString. You can use the getSetters and getGetters methods from the sample QueryFunction.
Note: Because .toString() is used in .equals(), you should make sure that two QueryFunction objects that are the same return the same value. Specifically, .toJSON().toString() does not guarantee ordering of JSON properties, so two QueryFunction objects with the same member values may not return the same value if .toString() was implemented using .toJSON().toString.