| java.lang.Object org.jpox.store.query.QueryUtils
QueryUtils | public class QueryUtils (Code) | | Utilities for use in queries.
version: $Revision: 1.23 $ |
Method Summary | |
public static Object | createResultObjectUsingArgumentedConstructor(Class resultClass, Object[] fieldValues) Convenience method to create an instance of the result class with the provided field
values, using a constructor taking the arguments. | public static Object | createResultObjectUsingDefaultConstructorAndSetters(Class resultClass, String[] resultFieldNames, Map resultClassFieldNames, Object[] fieldValues) Convenience method to create an instance of the result class with the provided field
values, using the default constructor and setting the fields using either public fields,
or setters, or a put method. | public static String[] | getExpressionsFromString(String str) Convenience method to split an expression string into its constituent parts where separated by commas. | public static Method | getPublicPutMethodForResultClass(Class resultClass) Convenience method to return the put(Object, Object method for the result class. | public static Method | getPublicSetMethodForFieldOfResultClass(Class resultClass, String fieldName, Class fieldType) Convenience method to return the setXXX method for a field of the result class. | public static boolean | resultClassIsSimple(String className) Utility to return if the passed result class is a simple type with a single value. | public static boolean | resultClassIsUserType(String className) Utility to return if the passed result class is a user-type, and so requires fields matching up. |
LOCALISER | final protected static Localiser LOCALISER(Code) | | Localiser for messages.
|
createResultObjectUsingArgumentedConstructor | public static Object createResultObjectUsingArgumentedConstructor(Class resultClass, Object[] fieldValues)(Code) | | Convenience method to create an instance of the result class with the provided field
values, using a constructor taking the arguments. If the returned object is null there
is no constructor with the correct signature.
Parameters: resultClass - The class of results that need creating Parameters: fieldValues - The field values The result class object |
createResultObjectUsingDefaultConstructorAndSetters | public static Object createResultObjectUsingDefaultConstructorAndSetters(Class resultClass, String[] resultFieldNames, Map resultClassFieldNames, Object[] fieldValues)(Code) | | Convenience method to create an instance of the result class with the provided field
values, using the default constructor and setting the fields using either public fields,
or setters, or a put method. If one of these parts is not found in the result class the
returned object is null.
Parameters: resultClass - Result class that we need to create an object of Parameters: resultFieldNames - Names of the fields in the results Parameters: resultClassFieldNames - Map of the result class fields, keyed by the field name Parameters: fieldValues - The field values The result class object |
getExpressionsFromString | public static String[] getExpressionsFromString(String str)(Code) | | Convenience method to split an expression string into its constituent parts where separated by commas.
This is used in the case of, for example, a result specification, to get the column definitions.
Parameters: str - The expression string The expression parts |
getPublicPutMethodForResultClass | public static Method getPublicPutMethodForResultClass(Class resultClass)(Code) | | Convenience method to return the put(Object, Object method for the result class.
Parameters: resultClass - The result class The put(Object, Object) method |
getPublicSetMethodForFieldOfResultClass | public static Method getPublicSetMethodForFieldOfResultClass(Class resultClass, String fieldName, Class fieldType)(Code) | | Convenience method to return the setXXX method for a field of the result class.
Parameters: resultClass - The result class Parameters: fieldName - Name of the field Parameters: fieldType - The type of the field being set The setter method |
resultClassIsSimple | public static boolean resultClassIsSimple(String className)(Code) | | Utility to return if the passed result class is a simple type with a single value.
Checks the class name against the supported "simple" JDOQL result-class types.
Parameters: className - the class name looked for Whether the result class is "simple". |
resultClassIsUserType | public static boolean resultClassIsUserType(String className)(Code) | | Utility to return if the passed result class is a user-type, and so requires fields matching up.
Parameters: className - the class name looked for Whether it is a user class |
|
|