public GetDataModelfromKindId ( |
||
kindId | The KindId of the Kind | |
리턴 | ReloadGlobals.DataModel |
/// <summary> /// Use this contructor to create a StoreDataSpecifier that requests an /// array Range. /// </summary> /// <param name="indices">The array ranges you want to fetch</param> /// <param name="kindId">The Kind ID of the requsted Kind</param> /// <param name="model">The Data Model this Kind uses</param> /// <param name="generation">The generation_counter of this value</param> public StoredDataSpecifier(List<ArrayRange> indices, UInt32 kindId, UInt64 generation, UsageManager manager) { if (kindId == 0) throw new ArgumentNullException( "StoredDataSpecifier does not support null or 0 values"); if (manager.GetDataModelfromKindId(kindId) != ReloadGlobals.DataModel.ARRAY) throw new ArgumentException( "Use this contructor only for array data Fetch requests"); if (indices == null) throw new ArgumentNullException( "StoredDataSpecifier for array needs at least one ArrayRange!"); //While multiple ranges MAY be specified, they MUST NOT overlap. indices.Sort(); myManager = manager; this.kindId = kindId; this.generation = generation; this.indices = new List<ArrayRange>(); this.indices.AddRange(indices); foreach (ArrayRange arrayRange in indices) { length += (UInt16)8; // 2 times an UInt32 } }
/// <summary> /// Use this contructor to create a StoreDataSpecifier that requests a dictionary. /// </summary> /// <param name="keys">The value keys to be fetched. Set this parameter null to create a wildcard fetch.</param> /// <param name="kindId">The Kind ID of the requsted Kind</param> /// <param name="model">The Data Model this Kind uses</param> /// <param name="generation">The generation_counter of this value</param> public StoredDataSpecifier(List<string> keys, UInt32 kindId, UInt64 generation, UsageManager manager) { if (kindId == 0) throw new ArgumentNullException("StoredDataSpecifier does not support null or 0 values"); if (manager.GetDataModelfromKindId(kindId) != ReloadGlobals.DataModel.DICTIONARY) throw new ArgumentException("Use this contructor only for dictionary data Fetch requests"); this.kindId = kindId; this.generation = generation; this.keys = keys; myManager = manager; // wildcast if (keys != null || keys.Count == 0) { length += 0; } else { foreach (string key in keys) { length += (UInt16)key.Length; } } }
/// <summary> /// Use this contructor to create a StoreDataSpecifier that requests a singale value. /// </summary> /// <param name="kindId">The Kind ID of the requsted Kind</param> /// <param name="model">The Data Model this Kind uses</param> /// <param name="generation">The generation_counter of this value</param> public StoredDataSpecifier(UInt32 kindId, UInt64 generation, UsageManager manager) { if (kindId == 0) throw new ArgumentNullException("StoredDataSpecifier does not support null or 0 values"); if (manager.GetDataModelfromKindId(kindId) != ReloadGlobals.DataModel.SINGLE_VALUE) throw new ArgumentException("Use this contructor only for single value Fetch requests"); this.kindId = kindId; this.generation = generation; length = 0; myManager = manager; }