Exemple #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;
 }
Exemple #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));
 }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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));
 }
Exemple #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));
 }