本文整理了Java中org.datanucleus.store.query.Query.getCandidateClassName
方法的一些代码示例,展示了Query.getCandidateClassName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getCandidateClassName
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:getCandidateClassName
暂无
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
if (query.getCandidateClassName() != null)
queryName = query.getCandidateClassName() + "_" + name;
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
/**
* Convenience method to return if the specified query should use an "UPDATE" lock on returned objects.
* First checks whether serializeRead is set on the query and, if not, falls back to the setting for the class.
* @param query The query
* @return Whether to use an "UPDATE" lock
*/
public static boolean useUpdateLockForQuery(Query query)
{
if (query.getSerializeRead() != null)
{
if (!query.getExecutionContext().getTransaction().isActive())
{
// Only applies in a transaction
return false;
}
// Query value takes top priority
return query.getSerializeRead();
}
// Fallback to transaction or class itself
return query.getExecutionContext().getSerializeReadForClass(query.getCandidateClassName());
}
内容来源于网络,如有侵权,请联系作者删除!