public BeanMetaDataCacheExtension(Type beanType, IAnnotationReaderFactory annotationReaderFactory, bool relation) : base() { this.BeanType = beanType; this._relation = relation; this.AnnotationReaderFactory = annotationReaderFactory; }
public BeanMetaDataForUpdateNonConcurrency(Type beanType, IAnnotationReaderFactory annotationReaderFactory, bool relation) : base() { this.BeanType = beanType; this._relation = relation; this.AnnotationReaderFactory = annotationReaderFactory; }
protected override void SetupDao(IDataSource dataSource) { ICommandFactory commandFactory = CreateCommandFactory(); IDataReaderFactory dataReaderFactory = CreateDataReaderFactory(commandFactory); IAnnotationReaderFactory annotationReaderFactory = CreateAnnotationReaderFactory(); _daoMetaDataFactory = new S2DaoMetaDataFactoryImpl(dataSource, commandFactory, annotationReaderFactory, dataReaderFactory); _daoInterceptor = new S2DaoInterceptor(_daoMetaDataFactory); }
// =============================================================================== // Constructor // =========== public S2DaoMetaDataFactoryImpl(IDataSource dataSource, ICommandFactory commandFactory, IAnnotationReaderFactory readerFactory, IDataReaderFactory dataReaderFactory) { _dataSource = dataSource; _commandFactory = commandFactory; _readerFactory = readerFactory; _dataReaderFactory = dataReaderFactory; HandleSqlLogRegistry(); if (!DBFluteConfig.GetInstance().IsLocked) { DBFluteConfig.GetInstance().Lock(); } }
public IBeanMetaData FindOrCreateCachedMetaIfNeeds(Type beanClass, IAnnotationReaderFactory factory, IDatabaseMetaData dbMetaData, IDbms dbms) { if (IsDBFluteEntity(beanClass)) { IBeanMetaData cachedMeta = GetMetaFromCache(beanClass); if (cachedMeta != null) { return(cachedMeta); } else { BeanMetaDataCacheExtension bmdExt = new BeanMetaDataCacheExtension(beanClass, factory, false); bmdExt.MetaMap = _metaMap; bmdExt.Initialize(dbMetaData, dbms); return(bmdExt); } } return(null); }