To create a QueryManager object programmatically, use the constructor in the QueryManager class as shown in the following example.
QueryManager
QueryManager qm = new QueryManager();