Package com.ibatis.sqlmap.engine.cache

Examples of com.ibatis.sqlmap.engine.cache.CacheKey.update()


            key.update(txManager);
            if (txManager.getConfig().getDataSource() != null) {
                key.update(txManager.getConfig().getDataSource());
            }
        }
        key.update(System.identityHashCode(this));
        return key.hashCode();
    }

    protected StatementScope beginStatementScope(SessionScope sessionScope, MappedStatement mappedStatement) {
        try {//ζˆ‘εŠ δΈŠηš„
View Full Code Here


    public CacheKey getCacheKey(StatementScope statementScope, ParameterMap parameterMap, Object parameterObject) {
        CacheKey key = new CacheKey();
        Object[] data = getData(statementScope, parameterMap, parameterObject);
        for (int i = 0; i < data.length; i++) {
            if (data[i] != null) {
                key.update(data[i]);
            }
        }
        return key;
    }
View Full Code Here

    }

    public int hashCode() {
        CacheKey key = new CacheKey();
        if (txManager != null) {
            key.update(txManager);
            if (txManager.getConfig().getDataSource() != null) {
                key.update(txManager.getConfig().getDataSource());
            }
        }
        key.update(System.identityHashCode(this));
View Full Code Here

    }

    public Object executeQueryForObject(StatementScope statementScope, Transaction trans, Object parameterObject,
            Object resultObject) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForObject");
        Object object = cacheModel.getObject(cacheKey);
        if (object == CacheModel.NULL_OBJECT) {
            //  This was cached, but null
            object = null;
        } else if (object == null) {
View Full Code Here

    }

    public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults,
            int maxResults) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForList");
        cacheKey.update(skipResults);
        cacheKey.update(maxResults);
        Object listAsObject = cacheModel.getObject(cacheKey);
        List list;
        if (listAsObject == CacheModel.NULL_OBJECT) {
View Full Code Here

    public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults,
            int maxResults) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForList");
        cacheKey.update(skipResults);
        cacheKey.update(maxResults);
        Object listAsObject = cacheModel.getObject(cacheKey);
        List list;
        if (listAsObject == CacheModel.NULL_OBJECT) {
            // The cached object was null
View Full Code Here

    public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults,
            int maxResults) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForList");
        cacheKey.update(skipResults);
        cacheKey.update(maxResults);
        Object listAsObject = cacheModel.getObject(cacheKey);
        List list;
        if (listAsObject == CacheModel.NULL_OBJECT) {
            // The cached object was null
            list = null;
View Full Code Here

    }

    public CacheKey getCacheKey(StatementScope statementScope, Object parameterObject) {
        CacheKey key = statement.getCacheKey(statementScope, parameterObject);
        if (!cacheModel.isReadOnly() && !cacheModel.isSerialize()) {
            key.update(statementScope.getSession());
        }
        return key;
    }

    public void setBaseCacheKey(int base) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.