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); } } }
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; }
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; }
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; }
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); }
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); }
internal ObjectMetadataCache(AdomdConnection connection, InternalObjectType objectType, string requestType, ListDictionary restrictions) : this(connection, objectType, requestType, restrictions, false) { }
internal ObjectMetadataCache(AdomdConnection connection, InternalObjectType objectType, string requestType, ListDictionary restrictions, bool isNestedSchema) : this(null, connection, objectType, requestType, restrictions, null) { this.isNestedSchema = isNestedSchema; }
private static int GetIndexForInternalType(InternalObjectType objectType) { return(CubeMetadataCache.internalTypeMap[objectType]); }
public NativeObjectInfoAttribute(ObjectTypes objectType, InternalObjectType internalObjectType) { this.ObjectType = objectType; this.InternalObjectType = internalObjectType; }
private ObjectMetadataCache GetObjectCache(InternalObjectType objectType) { return(this.objectMetadataCaches[CubeMetadataCache.GetIndexForInternalType(objectType)]); }
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) { }
IObjectCache IMetadataCache.GetObjectCache(InternalObjectType objectType) { return(this.GetObjectCache(objectType)); }
void IMetadataCache.Populate(InternalObjectType objectType) { this.EnsureNotAbandoned(); this.EnsureValid(); this.Populate(objectType); }
void IMetadataCache.Refresh(InternalObjectType objectType) { this.EnsureNotAbandoned(); this.EnsureValid(); this.Refresh(objectType); }
private void Refresh(InternalObjectType objectType) { ObjectMetadataCache objectCache = this.GetObjectCache(objectType); objectCache.RefreshSelf(); }
private DataTable GetObjectsParentTable(InternalObjectType objectType) { return(this.GetObjectTable(this.GetObjectsParentObjectCache(objectType))); }
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)) { }
internal CacheBasedNotFilteredCollection(AdomdConnection connection, InternalObjectType objectType, IMetadataCache metadataCache) : base(connection, objectType, metadataCache) { }