本文整理汇总了Java中org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractSession.executeQuery方法的具体用法?Java AbstractSession.executeQuery怎么用?Java AbstractSession.executeQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.persistence.internal.sessions.AbstractSession
的用法示例。
在下文中一共展示了AbstractSession.executeQuery方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: select
import org.eclipse.persistence.internal.sessions.AbstractSession; //导入方法依赖的package包/类
/**
* INTERNAL:
*/
protected Object select(Accessor accessor, AbstractSession writeSession, String seqName, Integer size) {
ValueReadQuery query = getSelectQuery();
if (query != null) {
if (accessor != null) {
// PERF: Prepare the query before being cloned.
// Also BUG: SQLCall could not be prepared concurrently by different queries.
// Setting user define allow custom SQL query to be prepared without translation row.
query.setIsUserDefined(true);
query.checkPrepare(writeSession, null);
query = (ValueReadQuery)query.clone();
query.setAccessor(accessor);
}
} else {
query = buildSelectQuery(seqName, size);
if (accessor != null) {
query.setAccessor(accessor);
}
}
Vector args = createArguments(query, seqName, size);
if (args != null) {
return writeSession.executeQuery(query, args);
} else {
return writeSession.executeQuery(query);
}
}
示例2: test
import org.eclipse.persistence.internal.sessions.AbstractSession; //导入方法依赖的package包/类
protected Object test(Accessor accessor, AbstractSession writeSession, String seqName, Integer size) {
ValueReadQuery query = getTestQuery();
if (query != null) {
if (accessor != null) {
// PERF: Prepare the query before being cloned.
// Also BUG: SQLCall could not be prepared concurrently by different queries.
// Setting user define allow custom SQL query to be prepared without translation row.
query.setIsUserDefined(true);
query.checkPrepare(writeSession, null);
query = (ValueReadQuery)query.clone();
query.setAccessor(accessor);
}
} else {
query = buildTestQuery(seqName);
if (accessor != null) {
query.setAccessor(accessor);
}
}
Vector args = createArguments(query, seqName, size);
if (args != null) {
return writeSession.executeQuery(query, args);
} else {
return writeSession.executeQuery(query);
}
}
示例3: update
import org.eclipse.persistence.internal.sessions.AbstractSession; //导入方法依赖的package包/类
/**
* INTERNAL:
*/
protected void update(Accessor accessor, AbstractSession writeSession, String seqName, Number sizeOrNewValue) {
DataModifyQuery query = getUpdateQuery();
if (query != null) {
if (accessor != null) {
// PERF: Prepare the query before being cloned.
// Also BUG: SQLCall could not be prepared concurrently by different queries.
// Setting user define allow custom SQL query to be prepared without translation row.
query.setIsUserDefined(true);
query.checkPrepare(writeSession, null);
query = (DataModifyQuery)query.clone();
query.setAccessor(accessor);
}
} else {
query = buildUpdateQuery(seqName, sizeOrNewValue);
if (query == null) {
return;
}
if (accessor != null) {
query.setAccessor(accessor);
}
}
Vector args = createArguments(query, seqName, sizeOrNewValue);
if (args != null) {
writeSession.executeQuery(query, args);
} else {
writeSession.executeQuery(query);
}
}