/** * PUBLIC: Configure the query to use an instance of the specified container class to hold the * result objects. The key used to index the value in the Map is the value returned by a call to * the specified zero-argument method. The method must be implemented by the class (or a * superclass) of the value to be inserted into the Map. * * <p>jdk1.2.x: The container class must implement (directly or indirectly) the Map interface. * * <p>jdk1.1.x: The container class must be a subclass of Hashtable. * * <p>The referenceClass must set before calling this method. */ public void useMapClass(Class concreteClass, String methodName) { // the reference class has to be specified before coming here if (getReferenceClass() == null) { throw QueryException.referenceClassMissing(this); } ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass); policy.setKeyName(methodName, getReferenceClass().getName()); setContainerPolicy(policy); }