Exemple #1
0
        protected override IList <long> GetObjectIds()
        {
            if (this.Strategy != null)
            {
                if (this.AssociationType != null)
                {
                    return(this.Strategy.ExtentGetCompositeAssociations(this.AssociationType));
                }
                else
                {
                    return(this.Strategy.Roles.GetCompositesRole(this.RoleType).ToList());
                }
            }

            this.session.Flush();

            var statement = new ExtentStatementRoot(this);
            var objectIds = new List <long>();

            var alias = this.BuildSql(statement);

            using (var command = statement.CreateDbCommand(alias))
            {
                if (command != null)
                {
                    using (var reader = command.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            var objectId = this.session.State.GetObjectIdForExistingObject(reader.GetValue(0).ToString());
                            objectIds.Add(objectId);
                        }
                    }
                }
            }

            return(objectIds);
        }
Exemple #2
0
        protected override IList <long> GetObjectIds()
        {
            this.Session.Flush();

            var statement = new ExtentStatementRoot(this);
            var alias     = this.BuildSql(statement);

            var objectIds = new List <long>();

            using (var command = statement.CreateDbCommand(alias))
            {
                using (var reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        var objectId = this.Session.State.GetObjectIdForExistingObject(reader.GetValue(0).ToString());
                        objectIds.Add(objectId);
                    }
                }
            }

            return(objectIds);
        }
Exemple #3
0
 internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IAssociationType associationType)
     : base(extent)
 {
     this.root            = root;
     this.AssociationType = associationType;
 }
Exemple #4
0
 internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IRoleType roleType)
     : base(extent)
 {
     this.root     = root;
     this.RoleType = roleType;
 }