From: <fg...@us...> - 2009-06-06 12:53:19
|
Revision: 1239 http://openutils.svn.sourceforge.net/openutils/?rev=1239&view=rev Author: fgrilli Date: 2009-06-06 12:15:46 +0000 (Sat, 06 Jun 2009) Log Message: ----------- javadoc: added warning about objects returned by this factory not being thread-safe Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-06-05 13:24:45 UTC (rev 1238) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-06-06 12:15:46 UTC (rev 1239) @@ -34,7 +34,9 @@ } /** - * A factory for Magnolia CMS specific Criteria implementation + * A factory for Magnolia CMS specific Criteria implementation <br> + * <strong>Warning: the object returned by this method is not thread-safe</strong>To use it as a shared global + * variable, client-code must coordinate access to it. * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager @@ -48,18 +50,20 @@ } /** - * A factory for Magnolia CMS specific Criteria implementation + * A factory for Magnolia CMS specific Criteria implementation <br> + * <strong>Warning: the object returned by this method is not thread-safe</strong>To use it as a shared global + * variable, client-code must coordinate access to it. * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" - * @param classType Class<?> - the list method of this implementation must return instances of this type + * @param clazz Class<?> - the list method of this implementation must return instances of this type * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteria(String path, info.magnolia.cms.core.search.QueryManager queryManager, - String itemType, Class< ? > classType) + String itemType, Class< ? > clazz) { - return new MagnoliaCriteriaImpl(path, queryManager, itemType, classType); + return new MagnoliaCriteriaImpl(path, queryManager, itemType, clazz); } /** @@ -70,7 +74,9 @@ * {@link Criteria#setFirstResult(int)} is set to 0).<br> * Please notice that if {@link Criteria#setMaxResults(int)} is not explicitly called before the * {@link Criteria#list()} method, the latter will return the entire resultset as in - * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String)} + * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String)} <br> + * <strong>Warning: the object returned by this method is not thread-safe</strong>To use it as a shared global + * variable, client-code must coordinate access to it. * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager @@ -91,28 +97,19 @@ * {@link Criteria#setFirstResult(int)} is set to 0).<br> * Please notice that if {@link Criteria#setMaxResults(int)} is not explicitly called before the * {@link Criteria#list()} method, the latter will return the entire resultset as in - * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String, Class)} + * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String, Class)} <br> + * <strong>Warning: the object returned by this method is not thread-safe</strong>To use it as a shared global + * variable, client-code must coordinate access to it. * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" - * @param classType Class<?> - the list method of this implementation must return instances of this type + * @param clazz Class<?> - the list method of this implementation must return instances of this type * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteriaWithLimit(String path, - info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > classType) + info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > clazz) { - return new MagnoliaCriteriaWithLimitImpl(path, queryManager, itemType, classType); + return new MagnoliaCriteriaWithLimitImpl(path, queryManager, itemType, clazz); } - - /* - * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the - * predicate - * @param queryManager - an instance of javax.jcr.query.QueryManager - * @param itemType String - depends on the implementation - * @return an instance of a JCR-specific implementation of {@link Criteria} - * @throws UnsupportedOperationException as it is not implemented yet public static Criteria - * createJCRCriteria(String path, javax.jcr.query.QueryManager queryManager, String itemType) { throw new - * UnsupportedOperationException(); } - */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |