public override object NullSafeGet(DbDataReader rs, string[] names, ISessionImplementor session, object owner) { //TODO: move to attribute var value = (byte)NHibernateUtil.Byte.NullSafeGet(rs, names[0], session); if (value == 1) { return(PartyStateFactory.Create <PendingState>()); } else if (value == 2) { return(PartyStateFactory.Create <ConfirmedState>()); } else if (value == 255) { return(PartyStateFactory.Create <RejectedState>()); } throw new NotImplementedException(); }
protected Party(long id) { this.Id = id; this.State = PartyStateFactory.Create <PendingState>(); }
public override PartyState GotoRejected() { return(PartyStateFactory.Create <RejectedState>()); }
public override PartyState GotoConfirmed() { return(PartyStateFactory.Create <ConfirmedState>()); }