org.datanucleus.query
Class JDOQLQueryHelper

java.lang.Object
  extended by org.datanucleus.query.JDOQLQueryHelper

public class JDOQLQueryHelper
extends java.lang.Object

JDOQL query helper class providing key information about the language etc.


Field Summary
static java.lang.String[] SINGLE_STRING_KEYWORDS
          Keywords used in single-string JDOQL.
static java.lang.String[] SINGLE_STRING_KEYWORDS_LOWERCASE
          Keywords in lowercase (we avoid calling toLowerCase() multiple times, which is expensive operation)
 
Constructor Summary
JDOQLQueryHelper()
           
 
Method Summary
static java.lang.String getJDOQLForExpression(Expression expr)
           
static boolean isKeyword(java.lang.String name)
          Convenience method returning if the supplied name is a keyword for this query language.
static boolean isKeywordExtended(java.lang.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(java.lang.String s)
          Utility to check if a name is a valid Java identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLE_STRING_KEYWORDS

public static final java.lang.String[] SINGLE_STRING_KEYWORDS
Keywords used in single-string JDOQL. Uppercase variants specified here, but we allow the lowercase form.


SINGLE_STRING_KEYWORDS_LOWERCASE

public static final java.lang.String[] SINGLE_STRING_KEYWORDS_LOWERCASE
Keywords in lowercase (we avoid calling toLowerCase() multiple times, which is expensive operation)

Constructor Detail

JDOQLQueryHelper

public JDOQLQueryHelper()
Method Detail

isKeyword

public static boolean isKeyword(java.lang.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(java.lang.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(java.lang.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.

getJDOQLForExpression

public static java.lang.String getJDOQLForExpression(Expression expr)


Copyright © 2011. All Rights Reserved.