public virtual IAttributeSetInstanceExtensionFieldState Get(string index, bool forCreation, bool nullAllowed)
        {
            AttributeSetInstanceExtensionFieldId globalId = new AttributeSetInstanceExtensionFieldId(_attributeSetInstanceExtensionFieldGroupState.Id, index);

            if (_loadedAttributeSetInstanceExtensionFieldStates.ContainsKey(globalId))
            {
                return(_loadedAttributeSetInstanceExtensionFieldStates[globalId]);
            }
            if (forCreation || ForReapplying)
            {
                var state = new AttributeSetInstanceExtensionFieldState(ForReapplying);
                state.AttributeSetInstanceExtensionFieldId = globalId;
                _loadedAttributeSetInstanceExtensionFieldStates.Add(globalId, state);
                return(state);
            }
            else
            {
                var state = AttributeSetInstanceExtensionFieldStateDao.Get(globalId, nullAllowed);
                if (state != null)
                {
                    _loadedAttributeSetInstanceExtensionFieldStates.Add(globalId, state);
                }
                return(state);
            }
        }
Esempio n. 2
0
        public virtual IAttributeSetInstanceExtensionFieldState Get(string index)
        {
            AttributeSetInstanceExtensionFieldId globalId = new AttributeSetInstanceExtensionFieldId(_attributeSetInstanceExtensionFieldGroupState.Id, index);

            if (_loadedAttributeSetInstanceExtensionFieldStates.ContainsKey(globalId))
            {
                return(_loadedAttributeSetInstanceExtensionFieldStates[globalId]);
            }
            var state = AttributeSetInstanceExtensionFieldStateDao.Get(globalId);

            _loadedAttributeSetInstanceExtensionFieldStates.Add(globalId, state);
            return(state);
        }