protected IBeanMetaData CreateSpecifiedOutsideSqlCursorBeanMetaData(MethodInfo method)
        {
            BeanMetaDataCacheExtension bmdExt = new BeanMetaDataCacheExtension(GetOutsideSqlDefaultBeanClass(method), this.AnnotationReaderFactory, false);

            bmdExt.Initialize(_dbMetaData, _dbms);// Don't use cache!
            return(bmdExt);
        }
        protected IBeanMetaData CreateSpecifiedOutsideSqlCustomizeBeanMetaData(Type clazz)
        {
            BeanMetaDataCacheExtension bmdExt = new BeanMetaDataCacheExtension(clazz, this.AnnotationReaderFactory, false);

            bmdExt.Initialize(_dbMetaData, _dbms);// Don't use cache!
            return(bmdExt);
        }
        protected IBeanMetaData GetOutsideSqlBeanMetaData(MethodInfo mi, IDatabaseMetaData databaseMetaData, Seasar.Dao.IDbms dbInfo)
        {
            Type beanClass4SelectMethodByManual = GetOutsideSqlDefaultBeanClass(mi);

            if (beanClass4SelectMethodByManual.Equals(_beanType))
            {
                return(_beanMetaData);
            }
            BeanMetaDataCacheExtension bmdExt = new BeanMetaDataCacheExtension(beanClass4SelectMethodByManual, _annotationReaderFactory, false);

            bmdExt.Initialize(databaseMetaData, dbInfo);// Don't use cache!
            return(bmdExt);
        }
        // ===============================================================================
        //                                                         Initialization Override
        //                                                         =======================
        public override void Initialize()
        {
            _daoInterface     = GetDaoInterface(_daoType);
            _annotationReader = AnnotationReaderFactory.CreateDaoAnnotationReader(_daoType);
            _beanType         = _annotationReader.GetBeanType();
            _dbms             = GetDbms(_dataSource);

            // Initialize bean-meta-data!
            BeanMetaDataCacheHandler handler = new BeanMetaDataCacheHandler(_beanMetaDataCacheMap);

            _beanMetaData = handler.FindOrCreateCachedMetaIfNeeds(_beanType, _annotationReaderFactory, _dbMetaData, _dbms);
            if (_beanMetaData == null)
            {
                _beanMetaData = new BeanMetaDataCacheExtension(_beanType, _annotationReaderFactory, false);// Don't use cache!
            }

            // For lazy initializing methods!
            // SetupSqlCommand();
        }
 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);
 }
        protected override IBeanMetaData CreateRelationBeanMetaData(PropertyInfo propertyInfo, IDatabaseMetaData dbMetaData, IDbms dbms)
        {
            if (_metaMap != null)
            {
                BeanMetaDataCacheHandler handler   = new BeanMetaDataCacheHandler(_metaMap);
                IBeanMetaData            cachedBmd = handler.FindOrCreateCachedMetaIfNeeds(propertyInfo.PropertyType, AnnotationReaderFactory, dbMetaData, dbms);
                if (cachedBmd != null)
                {
                    return(cachedBmd);
                }
            }
            bool isRelation = false;

            if (this.NestNo > 0)
            {
                isRelation = true;
            }
            BeanMetaDataCacheExtension bmdExt = new BeanMetaDataCacheExtension(propertyInfo.PropertyType, this.AnnotationReaderFactory, isRelation);

            bmdExt.NestNo = this.NestNo + 1;
            bmdExt.Initialize(dbMetaData, dbms);
            return(bmdExt);
        }