public QueryThemeTable(ILayer layer, string name) : this()
        {
            if (layer == null)
            {
                return;
            }

            base.Text = name;

            _layerID     = layer.ID;
            _datasetID   = layer.DatasetID;
            _queryFields = new QueryThemeQueryFieldDef();
            _visFields   = new QueryThemeVisibleFieldDef();
        }
        public void Load(IPersistStream stream)
        {
            base.Text  = (string)stream.Load("Text", "");
            _layerID   = (int)stream.Load("LayerID", -1);
            _datasetID = (int)stream.Load("DatasetID", -1);

            _queryFields = stream.Load("FieldDefs", null, new QueryThemeQueryFieldDef()) as QueryThemeQueryFieldDef;
            if (_queryFields == null)
            {
                _queryFields = new QueryThemeQueryFieldDef();
            }
            _visFields = stream.Load("VisibleFieldDefs", null, new QueryThemeVisibleFieldDef()) as QueryThemeVisibleFieldDef;
            if (_visFields == null)
            {
                _visFields = new QueryThemeVisibleFieldDef();
            }
        }