示例#1
0
 public AnyPart(Type entity, Member property)
 {
     this.entity   = entity;
     this.property = property;
     access        = new AccessStrategyBuilder <AnyPart <T> >(this, value => attributes.Set(x => x.Access, value));
     cascade       = new CascadeExpression <AnyPart <T> >(this, value => attributes.Set(x => x.Cascade, value));
 }
 public OneToOnePart(Type entity, Member property)
 {
     access        = new AccessStrategyBuilder <OneToOnePart <TOther> >(this, value => attributes.Set(x => x.Access, value));
     fetch         = new FetchTypeExpression <OneToOnePart <TOther> >(this, value => attributes.Set(x => x.Fetch, value));
     cascade       = new CascadeExpression <OneToOnePart <TOther> >(this, value => attributes.Set(x => x.Cascade, value));
     this.entity   = entity;
     this.property = property;
 }
示例#3
0
        public AnyPart(Type entity, Member member)
        {
            this.entity = entity;
            this.member = member;
            access      = new AccessStrategyBuilder <AnyPart <T> >(this, value => attributes.Set("Access", Layer.UserSupplied, value));
            cascade     = new CascadeExpression <AnyPart <T> >(this, value => attributes.Set("Cascade", Layer.UserSupplied, value));

            SetDefaultAccess();
        }
 public ManyToOnePart(Type entity, Member property)
 {
     this.entity   = entity;
     this.property = property;
     access        = new AccessStrategyBuilder <ManyToOnePart <TOther> >(this, value => attributes.Set(x => x.Access, value));
     fetch         = new FetchTypeExpression <ManyToOnePart <TOther> >(this, value => attributes.Set(x => x.Fetch, value));
     cascade       = new CascadeExpression <ManyToOnePart <TOther> >(this, value => attributes.Set(x => x.Cascade, value));
     notFound      = new NotFoundExpression <ManyToOnePart <TOther> >(this, value => attributes.Set(x => x.NotFound, value));
 }
 public HibernateMappingPart()
 {
     defaultCascade = new CascadeExpression <HibernateMappingPart>(this, value =>
     {
         var current = attributes.Get("DefaultCascade") as string;
         attributes.Set("DefaultCascade", Layer.UserSupplied, current == null ? value : string.Format("{0},{1}", current, value));
     });
     defaultAccess = new AccessStrategyBuilder <HibernateMappingPart>(this, value => attributes.Set("DefaultAccess", Layer.UserSupplied, value));
 }
示例#6
0
        //PROTOTYPE1: ADDED

        public OneToOnePart(Type entity, Member member)
        {
            access      = new AccessStrategyBuilder <OneToOnePart <TOther> >(this, value => attributes.Set("Access", Layer.UserSupplied, value));
            fetch       = new FetchTypeExpression <OneToOnePart <TOther> >(this, value => attributes.Set("Fetch", Layer.UserSupplied, value));
            cascade     = new CascadeExpression <OneToOnePart <TOther> >(this, value => attributes.Set("Cascade", Layer.UserSupplied, value));
            this.entity = entity;
            this.member = member;

            SetDefaultAccess();
        }
示例#7
0
        public AnyPart(Type entity, Member member)
        {
            this.entity = entity;
            this.member = member;
            access      = new AccessStrategyBuilder <AnyPart <T> >(this, value => attributes.Set("Access", Layer.UserSupplied, value));
            cascade     = new CascadeExpression <AnyPart <T> >(this, value =>
            {
                var current = attributes.Get("Cascade") as string;
                attributes.Set("Cascade", Layer.UserSupplied, current == null ? value : string.Format("{0},{1}", current, value));
            });

            SetDefaultAccess();
        }
示例#8
0
        public ManyToOnePart(Type entity, Member member)
        {
            this.entity = entity;
            this.member = member;
            access      = new AccessStrategyBuilder <ManyToOnePart <TOther> >(this, value => attributes.Set("Access", Layer.UserSupplied, value));
            fetch       = new FetchTypeExpression <ManyToOnePart <TOther> >(this, value => attributes.Set("Fetch", Layer.UserSupplied, value));
            cascade     = new CascadeExpression <ManyToOnePart <TOther> >(this, value =>
            {
                var current = attributes.Get("Cascade") as string;
                attributes.Set("Cascade", Layer.UserSupplied, current == null ? value : string.Format("{0},{1}", current, value));
            });
            notFound = new NotFoundExpression <ManyToOnePart <TOther> >(this, value => attributes.Set("NotFound", Layer.UserSupplied, value));

            SetDefaultAccess();
        }
示例#9
0
 public HibernateMappingPart()
 {
     defaultCascade = new CascadeExpression <HibernateMappingPart>(this, value => attributes.Set(x => x.DefaultCascade, value));
     defaultAccess  = new AccessStrategyBuilder <HibernateMappingPart>(this, value => attributes.Set(x => x.DefaultAccess, value));
 }
示例#10
0
 public HibernateMappingPart()
 {
     defaultCascade = new CascadeExpression <HibernateMappingPart>(this, value => attributes.Set("DefaultCascade", Layer.UserSupplied, value));
     defaultAccess  = new AccessStrategyBuilder <HibernateMappingPart>(this, value => attributes.Set("DefaultAccess", Layer.UserSupplied, value));
 }