- java.lang.Object
-
- org.datanucleus.store.query.JDOQLQueryHelper
-
public class JDOQLQueryHelper extends Object
JDOQL query helper class providing key information about the language etc.
-
-
Constructor Summary
Constructors Constructor Description JDOQLQueryHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getCandidateFromJDOQLString(String query)
Convenience method to extract the FROM candidate from a JDOQL query string.static String
getJDOQLForExpression(Expression expr)
static boolean
isKeyword(String name)
Convenience method returning if the supplied name is a keyword for this query language.static boolean
isKeywordExtended(String name)
Convenience method returning if the supplied name is a keyword for this query language, allowing the DataNucleus extension keywords (UPDATE, DELETE, SET).static boolean
isValidJavaIdentifierForJDOQL(String s)
Utility to check if a name is a valid Java identifier.
-
-
-
Method Detail
-
isKeyword
public static boolean isKeyword(String name)
Convenience method returning if the supplied name is a keyword for this query language.- Parameters:
name
- Name to check- Returns:
- Whether it is a keyword
-
isKeywordExtended
public static boolean isKeywordExtended(String name)
Convenience method returning if the supplied name is a keyword for this query language, allowing the DataNucleus extension keywords (UPDATE, DELETE, SET).- Parameters:
name
- Name to check- Returns:
- Whether it is a keyword
-
isValidJavaIdentifierForJDOQL
public static boolean isValidJavaIdentifierForJDOQL(String s)
Utility to check if a name is a valid Java identifier. Used by JDOQL in validating the names of parameters/variables.- Parameters:
s
- The name- Returns:
- Whether it is a valid identifier in Java.
-
getCandidateFromJDOQLString
public static String getCandidateFromJDOQLString(String query)
Convenience method to extract the FROM candidate from a JDOQL query string.- Parameters:
query
- The query string- Returns:
- The from candidate
-
getJDOQLForExpression
public static String getJDOQLForExpression(Expression expr)
-
-