|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.spoledge.audao.parser.gql.GqlDynamic
public class GqlDynamic
Parses GQL queries to low-level GAE API calls. This class is not thread safe. Synchronization must be done externally.
Field Summary | |
---|---|
protected DatastoreService |
ds
|
protected FetchOptions |
fo
|
protected boolean |
keysOnly
|
protected Log |
log
The logger. |
protected boolean |
multipleQueries
|
Constructor Summary | |
---|---|
GqlDynamic()
|
Method Summary | |
---|---|
protected java.lang.String |
formatError(java.lang.String gql,
java.lang.Throwable t)
Formats error message. |
FetchOptions |
getFetchOptions()
Returns the FetchOptions of the last query. |
Query |
parseQuery(java.lang.String gql,
java.lang.Object... params)
Parses GQL query. |
Query |
parseQueryCond(Query query,
java.lang.String gql,
java.lang.Object... params)
Parses GQL query condition. |
PreparedQuery |
prepareMultipleQueries(Query query,
boolean keysOnly)
Prepares a GQL query. |
PreparedQuery |
prepareQuery(java.lang.String gql,
java.lang.Object... params)
Prepares a GQL query. |
void |
setDatastoreService(DatastoreService ds)
Sets the DatastoreService which is needed for multiple queries. |
boolean |
wasMultipleQueries()
Returns true iff the last query was a multiple query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Log log
protected DatastoreService ds
protected FetchOptions fo
protected boolean multipleQueries
protected boolean keysOnly
Constructor Detail |
---|
public GqlDynamic()
Method Detail |
---|
public void setDatastoreService(DatastoreService ds)
setDatastoreService
in interface GQLDynamicQuery
public Query parseQuery(java.lang.String gql, java.lang.Object... params)
parseQuery
in interface GQLDynamicQuery
gql
- the GQL queryparams
- the parameters to the GQL (referenced by :1, :2, ...)public PreparedQuery prepareQuery(java.lang.String gql, java.lang.Object... params)
prepareQuery
in interface GQLDynamicQuery
gql
- the GQL queryparams
- the parameters to the GQL (referenced by :1, :2, ...)public Query parseQueryCond(Query query, java.lang.String gql, java.lang.Object... params)
parseQueryCond
in interface GQLDynamicQuery
query
- the initial querygql
- the GQL queryparams
- the parameters to the GQL (referenced by :1, :2, ...)public PreparedQuery prepareMultipleQueries(Query query, boolean keysOnly)
prepareMultipleQueries
in interface GQLDynamicQuery
public boolean wasMultipleQueries()
wasMultipleQueries
in interface GQLDynamicQuery
public FetchOptions getFetchOptions()
getFetchOptions
in interface GQLDynamicQuery
protected java.lang.String formatError(java.lang.String gql, java.lang.Throwable t)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |