/// <summary> /// Initializes a new instance of the <see cref="SelectKey"/> class. /// </summary> /// <param name="id">The id.</param> /// <param name="propertyName">Name of the property.</param> /// <param name="type">The type.</param> /// <param name="resultMaps">The result maps.</param> /// <param name="selectKeyType">Type of the select key.</param> /// <param name="sqlSource">The SQL source.</param> /// <param name="preserveWhitespace">Preserve whitespace.</param> public SelectKey( string id, string propertyName, Type type, ResultMapCollection resultMaps, SelectKeyType selectKeyType, ISqlSource sqlSource, bool preserveWhitespace ) : base(id, null, null, type, resultMaps, null, null, null, false, string.Empty, sqlSource, preserveWhitespace) { this.propertyName = propertyName; this.selectKeyType = selectKeyType; }
/// <summary> /// Deserializes the specified configuration in a <see cref="Select"/> object. /// </summary> /// <param name="modelStore">The model store.</param> /// <param name="config">The config.</param> /// <param name="configurationSetting"></param> /// <returns></returns> public override IStatement Deserialize(IModelStore modelStore, IConfiguration config, ConfigurationSetting configurationSetting) { BaseDeserialize(modelStore, config, configurationSetting); string propertyName = ConfigurationUtils.GetMandatoryStringAttribute(config, ConfigConstants.ATTRIBUTE_PROPERTY); SelectKeyType selectKeyType = ReadSelectKeyType(ConfigurationUtils.GetMandatoryStringAttribute(config, ConfigConstants.ATTRIBUTE_TYPE)); return(new SelectKey( config.Parent.Id + ConfigConstants.DOT + "SelectKey", propertyName, resultClass, resultsMap, selectKeyType, sqlSource, preserveWhitespace)); }