#region Apache Notice
/*****************************************************************************
* $Revision: 408099 $
* $LastChangedDate$
* $LastChangedBy$
*
* iBATIS.NET Data Mapper
* Copyright (C) 2008/2005 - The Apache Software Foundation
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
********************************************************************************/
#endregion
using Apache.Ibatis.DataMapper.Data;
using Apache.Ibatis.DataMapper.DataExchange;
using Apache.Ibatis.DataMapper.MappedStatements;
using Apache.Ibatis.DataMapper.Model.Cache;
using Apache.Ibatis.DataMapper.Model.ParameterMapping;
using Apache.Ibatis.DataMapper.Model.ResultMapping;
using Apache.Ibatis.DataMapper.Session;
namespace Apache.Ibatis.DataMapper.Model
{
///
/// Holds all the iBATIS core model (statement, alias, resultMap, parameterMap, dataSource).
/// Used by the to build Mapper.
///
public interface IModelStore
{
///
/// Name used to identify the
///
string Id { get; }
///
/// Gets or sets the data mapper.
///
/// The data mapper.
IDataMapper DataMapper { set; get; }
/////
///// Gets or sets the data source.
/////
///// The data source.
//IDataSource DataSource { set; get; }
///
/// Gets or sets the data exchange factory.
///
/// The data exchange factory.
DataExchangeFactory DataExchangeFactory { set; get; }
///
/// Gets or sets the session store.
///
/// The session store.
ISessionStore SessionStore { set; get; }
///
/// Gets the DB helper parameter cache.
///
/// The DB helper parameter cache.
DBHelperParameterCache DBHelperParameterCache { get; }
///
/// Gets the session factory.
///
/// The session factory.
ISessionFactory SessionFactory { set; get; }
///
/// Get a ParameterMap by name
///
/// The name of the ParameterMap
/// The ParameterMap
ParameterMap GetParameterMap(string name);
///
/// Adds a (named) ParameterMap.
///
/// the ParameterMap to add
void AddParameterMap(ParameterMap parameterMap);
///
/// Gets a ResultMap by name
///
/// The name of the result map
/// The ResultMap
IResultMap GetResultMap(string name);
///
/// Adds a (named) ResultMap
///
/// The ResultMap to add
void AddResultMap(IResultMap resultMap);
///
/// Adds a (named) MappedStatement.
///
/// The statement to add
void AddMappedStatement(IMappedStatement mappedStatement);
///
/// Gets a MappedStatement by id
///
/// The id of the statement
/// The MappedStatement
IMappedStatement GetMappedStatement(string id);
///
/// Adds a (named) cache model.
///
/// The cache model.
void AddCacheModel(CacheModel cacheModel);
///
/// Gets a cache model by id
///
/// The id of the cache model
/// The cache model
CacheModel GetCacheModel(string id);
///
/// Flushes the caches.
///
void FlushCaches();
}
}