public virtual IAttributeValueState Get(string value) { AttributeValueId globalId = new AttributeValueId(_attributeState.AttributeId, value); if (_loadedAttributeValueStates.ContainsKey(globalId)) { return _loadedAttributeValueStates[globalId]; } var state = AttributeValueStateDao.Get(globalId); _loadedAttributeValueStates.Add (globalId, state); return state; }
public virtual IAttributeValueMvoStateEvent GetStateEvent(AttributeValueId attributeValueId, long version) { var e = (IAttributeValueMvoStateEvent)EventStore.GetStateEvent(ToEventStoreAggregateId(attributeValueId), version); if (e != null) { e.ReadOnly = true; } return(e); }
public virtual IAttributeValueMvoState Get(AttributeValueId attributeValueId) { var state = StateRepository.Get(attributeValueId); if (state != null && state.IsUnsaved) { state = null; } return(state); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } AttributeValueId other = obj as AttributeValueId; if (other == null) { return(false); } return(true && Object.Equals(this.AttributeId, other.AttributeId) && Object.Equals(this.Value, other.Value) ); }
public AttributeValueIdDto(AttributeValueId val) { this._value = val; }
public AttributeValueMvoStateEventId(AttributeValueId attributeValueId, long attributeVersion) { this._attributeValueId = attributeValueId; this._attributeVersion = attributeVersion; }
public abstract IEventStoreAggregateId ToEventStoreAggregateId(AttributeValueId aggregateId);