Forums de discussion

Dynamic Query query

siddhant jain, modifié il y a 9 années.

Dynamic Query query

Junior Member Publications: 69 Date d'inscription: 19/03/13 Publications récentes
Hi all,
can anyone expalin me that what does the below line do :


DynamicQuery dq=DynamicQueryFactoryUtil.forClass(MyClass.class);


i.e. does it indicates the class loader to load MyClass in memory or it simply decalir that the dynamic query will be executed on the table associated with the class.
because we cannot use the dynamic query object more than once in code. If we have a cenerio where we have to write 2 dynamic quries on same table then we have to write the above code twice as we do have a method to add a criterion but no method to remove it or simply reset the object.




thanks
Siddhant
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Dynamic Query query

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
siddhant jain:
does it indicates the class loader to load MyClass in memory or it simply decalir that the dynamic query will be executed on the table associated with the class.


Yes, it does both.

because we cannot use the dynamic query object more than once in code.


correct.