|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.query.QueryUtils
org.datanucleus.store.rdbms.query.RDBMSQueryUtils
public class RDBMSQueryUtils
Utilities for use in queries specific to RDBMS.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.query.QueryUtils |
|---|
classArrayObjectObject, LOCALISER |
| Constructor Summary | |
|---|---|
RDBMSQueryUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getClassNameFromDiscriminatorResultSetRow(org.datanucleus.store.mapped.mapping.JavaTypeMapping discrimMapping,
org.datanucleus.metadata.DiscriminatorMetaData dismd,
java.sql.ResultSet rs,
org.datanucleus.ObjectManager om)
Convenience method that takes a result set that contains a discriminator column and returns the class name that it represents. |
static java.lang.String |
getClassNameFromDiscriminatorValue(java.lang.String discrimValue,
org.datanucleus.metadata.DiscriminatorMetaData dismd,
org.datanucleus.ObjectManager om)
Convenience method that takes a result set that contains a discriminator column and returns the class name that it represents. |
static java.sql.PreparedStatement |
getPreparedStatementForQuery(org.datanucleus.ManagedConnection conn,
org.datanucleus.store.mapped.expression.StatementText stmtText,
org.datanucleus.store.query.Query query)
Method to create a PreparedStatement for use with the query. |
static java.sql.PreparedStatement |
getPreparedStatementForQuery(org.datanucleus.ManagedConnection conn,
java.lang.String queryStmt,
org.datanucleus.store.query.Query query)
Method to create a PreparedStatement for use with the query. |
static java.lang.String |
getResultSetConcurrencyForQuery(org.datanucleus.store.query.Query query)
Accessor for the result set concurrency for the specified query. |
static java.lang.String |
getResultSetTypeForQuery(org.datanucleus.store.query.Query query)
Accessor for the result set type for the specified query. |
static void |
prepareStatementForExecution(java.sql.PreparedStatement ps,
org.datanucleus.store.query.Query query,
boolean applyTimeout)
Method to apply any restrictions to the created ResultSet. |
static boolean |
useUpdateLockForQuery(org.datanucleus.store.query.Query query)
Convenience method to return if the specified query should use an "UPDATE" lock on the objects returned. |
| Methods inherited from class org.datanucleus.query.QueryUtils |
|---|
compareExpressionValues, createResultObjectUsingArgumentedConstructor, createResultObjectUsingDefaultConstructorAndSetters, createResultObjectUsingDefaultConstructorAndSetters, expressionHasNotOperator, expressionHasOrOperator, getExpressionsFromString, getParameterExpressionForPosition, getPublicPutMethodForResultClass, getPublicSetMethodForFieldOfResultClass, getStringValue, getStringValueForExpression, getValueForParameterExpression, queryParameterTypesAreCompatible, queryReturnsSingleRow, resultClassIsSimple, resultClassIsUserType, resultHasOnlyAggregates |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RDBMSQueryUtils()
| Method Detail |
|---|
public static java.lang.String getClassNameFromDiscriminatorResultSetRow(org.datanucleus.store.mapped.mapping.JavaTypeMapping discrimMapping,
org.datanucleus.metadata.DiscriminatorMetaData dismd,
java.sql.ResultSet rs,
org.datanucleus.ObjectManager om)
discrimMapping - Mapping for the discriminator columndismd - Metadata for the discriminatorrs - The result setom - Object Manager
public static java.lang.String getClassNameFromDiscriminatorValue(java.lang.String discrimValue,
org.datanucleus.metadata.DiscriminatorMetaData dismd,
org.datanucleus.ObjectManager om)
discrimValue - Discriminator valuedismd - Metadata for the discriminator at the root (defining the strategy)om - ObjectManager
public static java.lang.String getResultSetTypeForQuery(org.datanucleus.store.query.Query query)
query - The query
public static java.lang.String getResultSetConcurrencyForQuery(org.datanucleus.store.query.Query query)
query - The query
public static boolean useUpdateLockForQuery(org.datanucleus.store.query.Query query)
query - The query
public static java.sql.PreparedStatement getPreparedStatementForQuery(org.datanucleus.ManagedConnection conn,
java.lang.String queryStmt,
org.datanucleus.store.query.Query query)
throws java.sql.SQLException
conn - the ConnectionqueryStmt - The statement text for the queryquery - The query
java.sql.SQLException - Thrown if an error occurs creating the statement
public static java.sql.PreparedStatement getPreparedStatementForQuery(org.datanucleus.ManagedConnection conn,
org.datanucleus.store.mapped.expression.StatementText stmtText,
org.datanucleus.store.query.Query query)
throws java.sql.SQLException
conn - the ConnectionstmtText - The statement textquery - The query
java.sql.SQLException - Thrown if an error occurs creating the statement
public static void prepareStatementForExecution(java.sql.PreparedStatement ps,
org.datanucleus.store.query.Query query,
boolean applyTimeout)
throws java.sql.SQLException
ps - The PreparedStatementquery - The queryapplyTimeout - Whether to apply the query timeout (if any) direct to the PreparedStatement
java.sql.SQLException - Thrown when an error occurs applying the constraints
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||