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();
        }
示例#2
0
 protected Party(long id)
 {
     this.Id    = id;
     this.State = PartyStateFactory.Create <PendingState>();
 }
示例#3
0
 public override PartyState GotoRejected()
 {
     return(PartyStateFactory.Create <RejectedState>());
 }
示例#4
0
 public override PartyState GotoConfirmed()
 {
     return(PartyStateFactory.Create <ConfirmedState>());
 }