コード例 #1
0
        private void Populate(InternalObjectType objectType)
        {
            ObjectMetadataCache objectCache = this.GetObjectCache(objectType);
            bool isInitialized = objectCache.IsInitialized;
            bool isPopulated   = objectCache.IsPopulated;

            if (!isInitialized || !isPopulated)
            {
                objectCache.PopulateSelf();
                if (!isInitialized)
                {
                    this.CreatePrimaryKeys(objectCache.CacheTable, objectType);
                    this.cacheDataset.Tables.Add(objectCache.CacheTable);
                }
                DataTable objectsParentTable = this.GetObjectsParentTable(objectType);
                if (objectsParentTable != null)
                {
                    objectCache.Relation = this.CreateRelation(objectsParentTable, objectCache.CacheTable, objectCache.RelationColumn);
                }
                ObjectMetadataCache objectsChildObjectCache = this.GetObjectsChildObjectCache(objectType);
                if (this.GetObjectTable(objectsChildObjectCache) != null)
                {
                    objectsChildObjectCache.Relation = this.CreateRelation(objectCache.CacheTable, objectsChildObjectCache.CacheTable, objectsChildObjectCache.RelationColumn);
                }
            }
        }
コード例 #2
0
 private static string[] GetColumnNamesToCompareForUpdate(InternalObjectType objectType)
 {
     if (objectType == InternalObjectType.InternalTypeCube)
     {
         return(ObjectMetadataCache.columnNamesForCubeValidation);
     }
     return(null);
 }
 internal SchemaRowsetCacheData(InternalObjectType objectType, string requestType, string relationColumnName, string[] primaryKeyColumns, string uniqueNameColumnName, KeyValuePair <string, string>[] additionalStaticRestrictions)
 {
     this.objectType                   = objectType;
     this.requestType                  = requestType;
     this.relationColumnName           = relationColumnName;
     this.primaryKeyColumns            = primaryKeyColumns;
     this.uniqueNameColumnName         = uniqueNameColumnName;
     this.additionalStaticRestrictions = additionalStaticRestrictions;
 }
コード例 #4
0
        private void CreatePrimaryKeys(DataTable table, InternalObjectType objectType)
        {
            SchemaRowsetCacheData schemaRowsetCacheData = CubeMetadataCache.SchemaRowsetsData[CubeMetadataCache.GetIndexForInternalType(objectType)];

            DataColumn[] array = new DataColumn[schemaRowsetCacheData.PrimaryKeyColumns.Length];
            for (int i = 0; i < schemaRowsetCacheData.PrimaryKeyColumns.Length; i++)
            {
                array[i] = table.Columns[schemaRowsetCacheData.PrimaryKeyColumns[i]];
            }
            table.PrimaryKey = array;
        }
コード例 #5
0
 internal ObjectMetadataCache(IMetadataCache metadataCache, AdomdConnection connection, InternalObjectType objectType, string requestType, ListDictionary restrictions, string relationColumn)
 {
     this.msgDelegate    = new AdomdUtils.GetInvalidatedMessageDelegate(this.GetMessageForCacheExpiration);
     this.isInitialized  = false;
     this.cacheState     = MetadataCacheState.Empty;
     this.metadataCache  = metadataCache;
     this.connection     = connection;
     this.objectType     = objectType;
     this.requestType    = requestType;
     this.restrictions   = restrictions;
     this.relationColumn = relationColumn;
 }
コード例 #6
0
        private string GetMessageForCacheExpiration()
        {
            InternalObjectType internalObjectType = this.objectType;

            if (internalObjectType == InternalObjectType.InternalTypeMiningService)
            {
                return(SR.Metadata_MiningServicesCollectionHasbeenUpdated);
            }
            if (internalObjectType == InternalObjectType.InternalTypeCube)
            {
                return(SR.Metadata_CubesCollectionHasbeenUpdated);
            }
            return(null);
        }
コード例 #7
0
        private ObjectMetadataCache GetObjectsChildObjectCache(InternalObjectType objectType)
        {
            switch (objectType)
            {
            case InternalObjectType.InternalTypeDimension:
                return(this.GetObjectCache(InternalObjectType.InternalTypeHierarchy));

            case InternalObjectType.InternalTypeHierarchy:
                return(this.GetObjectCache(InternalObjectType.InternalTypeLevel));

            case InternalObjectType.InternalTypeLevel:
                return(this.GetObjectCache(InternalObjectType.InternalTypeLevelProperty));

            case InternalObjectType.InternalTypeMember:
                return(null);

            case (InternalObjectType)5:
                goto IL_56;

            case InternalObjectType.InternalTypeMeasure:
            case InternalObjectType.InternalTypeKpi:
                break;

            default:
                switch (objectType)
                {
                case InternalObjectType.InternalTypeNamedSet:
                case InternalObjectType.InternalTypeLevelProperty:
                    break;

                default:
                    goto IL_56;
                }
                break;
            }
            return(null);

IL_56:
            return(null);
        }
コード例 #8
0
 internal ObjectMetadataCache(AdomdConnection connection, InternalObjectType objectType, string requestType, ListDictionary restrictions) : this(connection, objectType, requestType, restrictions, false)
 {
 }
コード例 #9
0
 internal ObjectMetadataCache(AdomdConnection connection, InternalObjectType objectType, string requestType, ListDictionary restrictions, bool isNestedSchema) : this(null, connection, objectType, requestType, restrictions, null)
 {
     this.isNestedSchema = isNestedSchema;
 }
コード例 #10
0
 private static int GetIndexForInternalType(InternalObjectType objectType)
 {
     return(CubeMetadataCache.internalTypeMap[objectType]);
 }
コード例 #11
0
 public NativeObjectInfoAttribute(ObjectTypes objectType, InternalObjectType internalObjectType)
 {
     this.ObjectType         = objectType;
     this.InternalObjectType = internalObjectType;
 }
コード例 #12
0
 private ObjectMetadataCache GetObjectCache(InternalObjectType objectType)
 {
     return(this.objectMetadataCaches[CubeMetadataCache.GetIndexForInternalType(objectType)]);
 }
コード例 #13
0
 private static bool IsSupportedInternalType(InternalObjectType objectType)
 {
     return(CubeMetadataCache.internalTypeMap.ContainsKey(objectType));
 }
 internal SchemaRowsetCacheData(InternalObjectType objectType, string requestType, string relationColumnName, string[] primaryKeyColumns, string uniqueNameColumnName) : this(objectType, requestType, relationColumnName, primaryKeyColumns, uniqueNameColumnName, null)
 {
 }
コード例 #15
0
 IObjectCache IMetadataCache.GetObjectCache(InternalObjectType objectType)
 {
     return(this.GetObjectCache(objectType));
 }
コード例 #16
0
 void IMetadataCache.Populate(InternalObjectType objectType)
 {
     this.EnsureNotAbandoned();
     this.EnsureValid();
     this.Populate(objectType);
 }
コード例 #17
0
 void IMetadataCache.Refresh(InternalObjectType objectType)
 {
     this.EnsureNotAbandoned();
     this.EnsureValid();
     this.Refresh(objectType);
 }
コード例 #18
0
        private void Refresh(InternalObjectType objectType)
        {
            ObjectMetadataCache objectCache = this.GetObjectCache(objectType);

            objectCache.RefreshSelf();
        }
コード例 #19
0
 private DataTable GetObjectsParentTable(InternalObjectType objectType)
 {
     return(this.GetObjectTable(this.GetObjectsParentObjectCache(objectType)));
 }
コード例 #20
0
        private string GetUniqueNameColumn(InternalObjectType objectType)
        {
            SchemaRowsetCacheData schemaRowsetCacheData = CubeMetadataCache.SchemaRowsetsData[CubeMetadataCache.GetIndexForInternalType(objectType)];

            return(schemaRowsetCacheData.UniqueNameColumnName);
        }
 internal CacheBasedCollection(AdomdConnection connection, InternalObjectType objectType, IMetadataCache metadataCache) : this(connection, metadataCache.GetObjectCache(objectType))
 {
 }
コード例 #22
0
 internal CacheBasedNotFilteredCollection(AdomdConnection connection, InternalObjectType objectType, IMetadataCache metadataCache) : base(connection, objectType, metadataCache)
 {
 }