CrossListQueryCache.GetSiteData CrossListQueryCache.GetSiteData CrossListQueryCache.GetSiteData Method

Definition

Overloads

GetSiteData(SPSite) GetSiteData(SPSite) GetSiteData(SPSite)

Gets the cache data that is based on the CrossListQueryInfo specification.

GetSiteData(SPWeb) GetSiteData(SPWeb) GetSiteData(SPWeb)

Gets the data from the SPWeb object.

GetSiteData(SPSite, String) GetSiteData(SPSite, String) GetSiteData(SPSite, String)

Gets the cache data from the specified site and from the specified webUrl.

GetSiteData(SPWeb, SPSiteDataQuery) GetSiteData(SPWeb, SPSiteDataQuery) GetSiteData(SPWeb, SPSiteDataQuery)

Gets the data by using the specified SPSiteDataQuery object.

GetSiteData(SPSite) GetSiteData(SPSite) GetSiteData(SPSite)

Gets the cache data that is based on the CrossListQueryInfo specification.

public:
 System::Data::DataTable ^ GetSiteData(Microsoft::SharePoint::SPSite ^ site);
public System.Data.DataTable GetSiteData (Microsoft.SharePoint.SPSite site);
Public Function GetSiteData (site As SPSite) As DataTable
Parameters
site
SPSite SPSite SPSite

The SPSite object that is used to retrieve the data.

Returns

The cache data that is based on the CrossListQueryInfo specification.

Examples

// Execute QueryCbqQueryVersionInfo userCbqQuery = queryCache.UserQueryVersionInfo;CrossListQueryCache xlqCache = new CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo);DataTable data =  xlqCache.GetSiteData(SPContext.Current.Site);
' Execute QueryDim userCbqQuery As CbqQueryVersionInfo = queryCache.UserQueryVersionInfoDim xlqCache As New CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo)Dim data As DataTable = xlqCache.GetSiteData(SPContext.Current.Site)

Remarks

Can be used only to query a single site collection. Using this object to query multiple site collections is not supported. If this function is called from a web part, it can only be used to query data from the site collection where the web part is deployed.

GetSiteData(SPWeb) GetSiteData(SPWeb) GetSiteData(SPWeb)

Gets the data from the SPWeb object.

public:
 System::Data::DataTable ^ GetSiteData(Microsoft::SharePoint::SPWeb ^ web);
public System.Data.DataTable GetSiteData (Microsoft.SharePoint.SPWeb web);
Public Function GetSiteData (web As SPWeb) As DataTable
Parameters
web
SPWeb SPWeb SPWeb

The target SPWeb object to get cache data from.

Returns

The data the SPWeb object retrieves from the web parameter.

Examples

// Execute QueryCbqQueryVersionInfo userCbqQuery = queryCache.UserQueryVersionInfo;CrossListQueryCache xlqCache = new CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo);DataTable data =  xlqCache.GetSiteData(SPContext.Current.Site);
' Execute QueryDim userCbqQuery As CbqQueryVersionInfo = queryCache.UserQueryVersionInfoDim xlqCache As New CrossListQueryCache(userCbqQuery.VersionCrossListQueryInfo)Dim data As DataTable = xlqCache.GetSiteData(SPContext.Current.Site)

Remarks

When you call this method, the webUrl of the CrossListQueryInfo property is ignored.

GetSiteData(SPSite, String) GetSiteData(SPSite, String) GetSiteData(SPSite, String)

Gets the cache data from the specified site and from the specified webUrl.

public:
 System::Data::DataTable ^ GetSiteData(Microsoft::SharePoint::SPSite ^ site, System::String ^ webUrl);
public System.Data.DataTable GetSiteData (Microsoft.SharePoint.SPSite site, string webUrl);
Public Function GetSiteData (site As SPSite, webUrl As String) As DataTable
Parameters
site
SPSite SPSite SPSite

The SPSite from which data is retrieved.

webUrl
String String String

The webUrl of the web site to retrieve the data from.

Returns

The cache data that is retrieved from the webUrl of the SPSite object.

Remarks

When this method is called, the webUrl of the CrossListQueryInfo property is ignored.

GetSiteData(SPWeb, SPSiteDataQuery) GetSiteData(SPWeb, SPSiteDataQuery) GetSiteData(SPWeb, SPSiteDataQuery)

Gets the data by using the specified SPSiteDataQuery object.

public:
 System::Data::DataTable ^ GetSiteData(Microsoft::SharePoint::SPWeb ^ web, Microsoft::SharePoint::SPSiteDataQuery ^ query);
public System.Data.DataTable GetSiteData (Microsoft.SharePoint.SPWeb web, Microsoft.SharePoint.SPSiteDataQuery query);
Public Function GetSiteData (web As SPWeb, query As SPSiteDataQuery) As DataTable
Parameters
web
SPWeb SPWeb SPWeb

The target SPWeb object to get cache data from.

query
SPSiteDataQuery SPSiteDataQuery SPSiteDataQuery

The SPSiteDataQuery object that is used to get data.

Returns

The data that is retrieved by using the specified SPSiteDataQuery object.

Remarks

The Collaborative Application Markup Language (CAML) of the CrossListQueryInfo property is ignored when this method is called.

Applies to