当前位置: 首页>>代码示例>>Java>>正文


Java AbstractSession.executeQuery方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:jmrunge,项目名称:osiris-platform,代码行数:29,代码来源:QuerySequence.java

示例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);
    }
}
 
开发者ID:jmrunge,项目名称:osiris-platform,代码行数:26,代码来源:QuerySequence.java

示例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);
    }
}
 
开发者ID:jmrunge,项目名称:osiris-platform,代码行数:32,代码来源:QuerySequence.java


注:本文中的org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。