Constructors Summary |
---|
protected EJBQueryImpl(EntityManagerImpl entityManager)Base constructor for EJBQueryImpl. Initializes basic variables.
An EJBQLQueryImpl may only ever be tied to one entityManager.
super(entityManager);
|
public EJBQueryImpl(DatabaseQuery query, EntityManagerImpl entityManager)Create an EJBQueryImpl with a TopLink query.
super(query, entityManager);
|
public EJBQueryImpl(String ejbql, EntityManagerImpl entityManager)Build an EJBQueryImpl based on the given ejbql string
super(ejbql, entityManager);
|
public EJBQueryImpl(String queryDescription, EntityManagerImpl entityManager, boolean isNamedQuery)Create an EJBQueryImpl with either a query name or an ejbql string
super(queryDescription, entityManager, isNamedQuery);
|
Methods Summary |
---|
protected java.lang.Object | convertTemporalType(java.lang.Object value, javax.persistence.TemporalType type)Convert the given object to the class represented by the given temporal type.
ConversionManager conversionManager = ((oracle.toplink.essentials.internal.sessions.AbstractSession)getEntityManager().getActiveSession()).getDatasourcePlatform().getConversionManager();
if (type == TemporalType.TIME) {
return conversionManager.convertObject(value, ClassConstants.TIME);
} else if (type == TemporalType.TIMESTAMP) {
return conversionManager.convertObject(value, ClassConstants.TIMESTAMP);
} else if (type == TemporalType.DATE) {
return conversionManager.convertObject(value, ClassConstants.SQLDATE);
}
return value;
|
public oracle.toplink.essentials.ejb.cmp3.EntityManager | getEntityManager()Return the entityManager this query is tied to.
return (EntityManager)entityManager;
|
public javax.persistence.Query | setFirstResult(int startPosition)Set the position of the first result to retrieve.
try {
entityManager.verifyOpen();
setFirstResultInternal(startPosition);
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setFlushMode(javax.persistence.FlushModeType flushMode)Set the flush mode type to be used for the query execution.
try {
entityManager.verifyOpen();
if (flushMode == null) {
getDatabaseQuery().setFlushOnExecute(null);
} else {
getDatabaseQuery().setFlushOnExecute(flushMode == FlushModeType.AUTO);
}
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setHint(java.lang.String hintName, java.lang.Object value)Set an implementation-specific hint.
If the hint name is not recognized, it is silently ignored.
try {
entityManager.verifyOpen();
setHintInternal(hintName, value);
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setMaxResults(int maxResult)Set the maximum number of results to retrieve.
try {
entityManager.verifyOpen();
setMaxResultsInternal(maxResult);
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setParameter(java.lang.String name, java.lang.Object value)Bind an argument to a named parameter.
try {
entityManager.verifyOpen();
setParameterInternal(name, value);
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setParameter(java.lang.String name, java.util.Date value, javax.persistence.TemporalType temporalType)Bind an instance of java.util.Date to a named parameter.
return setParameter(name, convertTemporalType(value, temporalType));
|
public javax.persistence.Query | setParameter(java.lang.String name, java.util.Calendar value, javax.persistence.TemporalType temporalType)Bind an instance of java.util.Calendar to a named parameter.
return setParameter(name, convertTemporalType(value, temporalType));
|
public javax.persistence.Query | setParameter(int position, java.lang.Object value)Bind an argument to a positional parameter.
try {
entityManager.verifyOpen();
setParameterInternal(position, value);
return this;
} catch (RuntimeException e) {
setRollbackOnly();
throw e;
}
|
public javax.persistence.Query | setParameter(int position, java.util.Date value, javax.persistence.TemporalType temporalType)Bind an instance of java.util.Date to a positional parameter.
return setParameter(position, convertTemporalType(value, temporalType));
|
public javax.persistence.Query | setParameter(int position, java.util.Calendar value, javax.persistence.TemporalType temporalType)Bind an instance of java.util.Calendar to a positional parameter.
return setParameter(position, convertTemporalType(value, temporalType));
|
protected void | throwNoResultException(java.lang.String message)
throw new NoResultException(message);
|
protected void | throwNonUniqueResultException(java.lang.String message)
throw new NonUniqueResultException(message);
|