CatalogPropertiesDataSet
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
The CatalogPropertiesDataSet class contains all the attributes for a property in the Catalog System. You can access the DataRowCollection of the dataset’s data table by using the CatalogProperties property. You can access each row in the collection by using the CatalogPropertiesDataSet..::.CatalogProperty class.
This dataset contains all the built-in and user-defined property attributes. The following table contains the built-in properties for this dataset.
Property |
Description |
---|---|
Gets or sets a Boolean value that specifies whether this property should automatically be assigned to all newly created product definitions. |
|
Gets or sets a Boolean value that specifies whether this property is a built-in property. |
|
Gets or sets a string that specifies the currency to which this property belongs for catalog properties of the Currency data type; maximum length is 128 characters. This value is null if this property is accessed and it does not have a defined value. |
|
Gets or sets an integer value that specifies the catalog data type for the property. This property is one of the values of the CatalogDataType enumeration. The possible values are as follows:
The Catalog System allows conversion of string properties to text properties. |
|
Gets or sets the default value for catalog properties of the Boolean data type. |
|
Gets or sets a decimal value that specifies the default value for catalog properties of the Currency data type. |
|
Gets or sets the default value for catalog properties of the DateTime data type. |
|
Gets or sets a double value that specifies the default value for catalog properties of the Float and Double data types. |
|
Gets or sets an integer that specifies the default value for catalog properties of the Integer and BigInteger data types. |
|
Gets or sets a string that specifies the default value for non-multilingual catalog properties of the String, Enumeration, and FilePath data types. |
|
Gets or sets a Boolean value that specifies whether this property is displayed as a base catalog property. |
|
Gets or sets a Boolean value that specifies whether this property should be displayed in the list of products. |
|
Gets or sets a string that specifies the non-multilingual display names for the catalog properties. An empty string is returned if this property is accessed and it does not have a defined value. |
|
Gets or sets a Boolean value that specifies whether the value of the catalog property in catalog categories and products should be displayed on the site. |
|
Gets or sets a Boolean value that specifies whether the contents of this property should be exported to the Data Warehouse for analysis and reporting. |
|
Gets or sets a Boolean value that specifies whether a catalog property can be included in results that are returned from specification searches performed on categories. |
|
Gets or sets a Boolean value that specifies whether a catalog property is free-text searchable. This property can be set only for catalog properties of String, Enumeration, FilePath, and Text data types. |
|
Gets or sets a Boolean value that specifies whether this property should have a value when it is used in catalogs. |
|
Gets or sets a Boolean value that specifies whether this property is multilingual. |
|
Gets or sets a decimal value that specifies the maximum value that can be defined for catalog properties of the Currency data type. |
|
Gets or sets the maximum value that can be set for catalog properties of the DateTime data type. |
|
Gets or sets a double value that specifies the maximum value that can be set for catalog properties of the Float and Double data types. |
|
Gets or sets an integer that specifies the maximum value that can be set for catalog properties of the Integer and BigInteger data types. |
|
Gets or sets an integer that specifies the maximum length that can be defined for catalog properties of the String data type. The maximum length value for string properties cannot exceed 4000. For FilePath and Enumeration data types, this value is 256 and 128, respectively, and cannot be changed. For Text data types, this value is ignored. |
|
Gets or sets a decimal value that specifies the minimum value that can be defined for catalog properties of the Currency data type. |
|
Gets or sets the minimum value that can be set for catalog properties of the DateTime data type. |
|
Gets or sets a double value that specifies the minimum value that can be set for catalog properties of the Float and Double data types. |
|
Gets or sets an integer that specifies the minimum value for catalog properties of the Integer and BigInteger data types. |
|
Gets or sets an integer that specifies the minimum length that can be defined for catalog properties of the String data type. The minimum length value for string properties should be less than 4000. For Text, FilePath, and Enumeration data types, this value is 0 and cannot be changed. |
|
Gets a string that specifies the name of the property in the Catalog System; maximum length is 128 characters. |
|
Gets a binary value that specifies the last time that the row was updated. This property is for internal use only. |
In addition to the built-in properties, the CatalogPropertiesDataSet class also contains user-defined attributes that can be added to the Catalog System. The following table contains the user-defined attributes for this dataset.
Property |
Description |
---|---|
u_defaultvalue_<Language identifier> |
Contains default values for multilingual catalog properties of the String, FilePath, and Enumeration data types in the language specified by <Language identifier>. For example, the column u_defaultvalue_en-US contains the default values for String, Enumeration, and FilePath catalog properties for the language "en-US". |
DisplayName_<Language identifier> |
Contains the display names for the catalog properties in the language specified by <Language identifier>. For example, the column DisplayName_en-US contains the display names for the properties in the language "en-US". |
Constraints
The CatalogPropertiesDataSet class defines a unique constraint on the PropertyName property.
Using the CatalogPropertiesDataSet Class
The following example demonstrates how to access the properties of the CatalogPropertiesDataSet class.
public static void UseDataset(CatalogContext context, string propertyName, string displayName)
{
// Create a new property and add attributes.
CatalogProperty catalogProperty = catalogContext.CreateProperty(propertyName, CatalogDataType.String, 10);
CatalogPropertiesDataSet catalogProperties = catalogProperty.Information;
CatalogPropertiesDataSet.CatalogProperty propertyInfo = catalogProperties.CatalogProperties[0];
propertyInfo.DisplayName = displayName;
propertyInfo.LanguageSensitive = true;
propertyInfo.IsFreeTextSearchable = true;
propertyInfo.MaximumStringLength = 10;
propertyInfo.MaximumStringLength = 100;
propertyInfo["u_defaultvalue_en-US"] = "DefaultValue in en-US";
// Save the new property to the Catalog System.
catalogProperty.Save();
// Iterate through the dataset and access each property.
foreach(CatalogPropertiesDataSet.CatalogProperty catalogPropertyInfo in catalogContext.GetProperties().CatalogProperties)
{
string propertyName = catalogPropertyInfo.PropertyName;
CatalogDataType dataType = (CatalogDataType)catalogPropertyInfo.DataType;
}
}
The CatalogPropertiesDataSetSchema Class
The CatalogPropertiesDataSetSchema class provides constants for all the built-in columns in the dataset and defines all the associated methods. The following table contains the associated methods for this class.
Method |
Description |
---|---|
Returns true if the columnName in the dataset cannot be updated, or false if the columnName in the dataset can be updated. |
|
Returns true if the columnName is a built-in column in the dataset, or false if the columnName is a user-defined property. |