public static B GetData <A, B>(IAbstractDal pDal, IOrdinal pOrdinal, System.Data.IDataReader pReader, bool pAddToQuery) where A : IAbstractDal, new() where B : IVO, new() { if (pAddToQuery) { pDal.Ordinal = pOrdinal; return((B)pDal.GetData(pReader)); } return(default(B)); }
public void GetOrdinal(IOrdinal pOrdinal) { try { Ordinal = pOrdinal; GetOrdinal(); } catch (Exception ex) { throw new DALException(ex.Message, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name, "Não foi possível obter o Ordinal.", ex); } }
public static A AddSibling <A>(IAbstractDal pSource, IOrdinal pOrdinal, bool pAddToQuery, string pCustomKey, bool pReadOnly = false, CustomKeyHand pHand = CustomKeyHand.Left) where A : IAbstractDal, new() { A lReturn = default(A); if (pAddToQuery || pOrdinal.SiblingsBitwise()) { lReturn = new A(); lReturn.Parent = pSource; pSource.Query.AddEntityLeftJoinCustomKey(lReturn, pSource.EntityAlias, pCustomKey, pHand, pReadOnly); lReturn.GetOrdinal(pOrdinal); } else if (pSource.EntityAlias == "1" && pSource.Persistence && !pReadOnly) { lReturn = new A(); pSource.Query.SaveAtributes.Add(pCustomKey, string.Concat("@", pCustomKey)); } return(lReturn); }
public static A AddSibling <A>(IAbstractDal pSource, IOrdinal pOrdinal, bool pAddToQuery) where A : IAbstractDal, new() { A lReturn = default(A); if (pAddToQuery || pOrdinal.SiblingsBitwise()) { lReturn = new A(); lReturn.Parent = pSource; pSource.Query.AddEntityLeftJoin(lReturn, pSource.EntityAlias); lReturn.GetOrdinal(pOrdinal); } else if (pSource.EntityAlias == "1" && pSource.Persistence) { lReturn = new A(); pSource.Query.SaveAtributes.Add(lReturn.EntityKey, lReturn.EntityKey.Insert(0, "@")); } return(lReturn); }
public PointInTime(IOrdinal ordinal, IDaySelector daySelector) { _ordinal = ordinal; _daySelector = daySelector; }
public static A AddSibling <A>(IAbstractDal pSource, IOrdinal pOrdinal, bool pAddToQuery, string pCustomKey, CustomKeyHand pHand = CustomKeyHand.Left) where A : IAbstractDal, new() { return(AddSibling <A>(pSource, pOrdinal, pAddToQuery, pCustomKey, false, pHand)); }
public int CompareTo(IOrdinal value) => this.OrdinalValue.CompareTo(value.OrdinalValue);
public IValue Min(IOrdinal value) => this.OrdinalValue < value.OrdinalValue ? this.Clone() : value.Clone();
public IValue Max(IOrdinal value) => this.OrdinalValue > value.OrdinalValue ? this.Clone() : value.Clone();
public PointInMonth(IOrdinal ordinal, IDaySelector daySelector, IPeriodSelector <MonthPeriod> monthSelector) { _ordinal = ordinal; _daySelector = daySelector; _monthSelector = monthSelector; }
public OrdinalPeriodSelector(IOrdinal ordinal) { _ordinal = ordinal; }