示例#1
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 = long.Parse(reader.GetValue(0).ToString());
                        objectIds.Add(objectId);
                    }

                    reader.Close();
                }
            }

            return(objectIds);
        }
示例#2
0
        protected override IList <long> GetObjectIds()
        {
            if (this.Strategy != null)
            {
                return(this.Strategy.ExtentGetCompositeAssociations(this.AssociationType.RelationType));
            }

            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 = long.Parse(reader.GetValue(0).ToString());
                            objectIds.Add(objectId);
                        }

                        reader.Close();
                    }
                }
            }

            return(objectIds);
        }
示例#3
0
 public ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IAssociationType associationType)
     : base(extent)
 {
     this.root            = root;
     this.associationType = associationType;
 }
示例#4
0
 public ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IRoleType roleType)
     : base(extent)
 {
     this.root     = root;
     this.roleType = roleType;
 }