TranslationHelper Class |
Namespace: CMS.DataEngine
public class TranslationHelper
The TranslationHelper type exposes the following members.
Name | Description | |
---|---|---|
TranslationHelper |
Constructor.
| |
TranslationHelper(DataTable) |
Constructor. Creates the helper initialized with given translation table.
|
Name | Description | |
---|---|---|
AUTO_PARENTID |
Automatic parent ID.
| |
AUTO_SITEID |
Automatic site ID
| |
AUTO_SITENAME |
Automatic site name (Get by SiteIDs from DB).
| |
mConnection |
Connection object used to access data.
| |
NO_SITE |
No site condition for registering records.
| |
QUERY_OBJECT_TYPE_COLUMN |
Name of the computed column that contains (real) object type of current row.
Column is used in data query obtaining code names and other information based on ID and object type.
Requested object type can differ from real object type when original and related object types are defined.
| |
RECORD_CLASS_NAME_COLUMN |
Name of column with object's class name identifier in a record's DataRow.
| |
RECORD_CODE_NAME_COLUMN |
Name of column with object's code name in a record's DataRow.
| |
RECORD_GROUP_ID_COLUMN |
Name of column with object's group identifier in a record's DataRow.
| |
RECORD_GUID_COLUMN |
Name of column with object's GUID in a record's DataRow.
| |
RECORD_ID_COLUMN |
Name of column with object's identifier in a record's DataRow.
| |
RECORD_INFO_COLUMN |
Name of column with object's additional information in a record's DataRow.
| |
RECORD_OBJECT_TYPE_COLUMN |
Name of column with object's class name in a record's DataRow.
| |
RECORD_PARENT_ID_COLUMN |
Name of column with object's parent identifier in a record DataRow.
| |
RECORD_SITE_NAME_COLUMN |
Name of column with object's site name in a record's DataRow.
| |
TRANSLATION_TABLE |
Name of translation table
|
Name | Description | |
---|---|---|
IDConversion |
ID conversion table [objectType.ToLowerCSafe()] -> hash table [OldID -> NewID]
| |
TranslationTable |
Returns the translation table.
| |
UseDisplayNameAsCodeName |
If true, display name is used instead of the code name.
|
Name | Description | |
---|---|---|
AddIDTranslation |
Adds the ID translation to the translation table.
| |
ChangeCodeName |
Changes the object code name in the table.
| |
Clear |
Clears the translation table.
| |
FilterExistingRecords |
Filters the existing records from the given array.
| |
GetCodeName(String, Int32) |
Returns the code name of the specified object.
| |
GetCodeName(String, Int32, String) |
Returns the code name of the specified object.
| |
GetDefaultValue |
Gets default value.
| |
GetEmptyTable |
Returns empty translation table.
| |
GetID |
Returns the object ID for specified record.
| |
GetIDFromDB |
Gets the object ID from the database.
| |
GetIDWithFallback |
Returns the object ID for specified record calling GetID(TranslationParameters).
If record could not be found, method falls back to GetIDFromDB(GetIDParameters, String) and eventually registers DB object in the helper.
If neither attempt results into valid object ID, 0 is returned.
| |
GetNewID(String, Int32, String, Int32, String, String, String) |
Gets the new ID for given old ID.
| |
GetNewID(String, Int32, String, Int32, String, String, String, Boolean, Int32) |
Gets the new ID for given old ID.
| |
GetNewIDs |
Gets the dictionary of new IDs for the given list of old IDs [oldId => [ newId, newGroupId ]]
Caches the newly retrieved items in the conversion cache
| |
GetParentType |
Gets the parent object type for specified object type.
| |
GetRecord(TranslationParameters) |
Gets the record specified by parameters.
| |
GetRecord(String, Int32) |
Gets the record by ID.
| |
GetSafeClassName |
Gets the safe class name.
| |
GetTranslationsXml |
Gets the translations XML
| |
HasRecords |
Returns true if the helper contains some records.
| |
IsEmpty |
Determines whether the given translation helper contains any translations or not.
| |
IsExcluded |
Returns true of the column is excluded.
| |
RecordExists |
Returns true if specified record exists in translation table.
| |
RegisterDynamicRecords |
Registers the records from the given table.
| |
RegisterRecord(BaseInfo) |
Registers the record for object ID within given translation table.
| |
RegisterRecord(Int32, TranslationParameters, String) |
Registers the record within given translation table.
| |
RegisterRecords(IListInt32, String, String, String) |
Registers the records from the given list.
| |
RegisterRecords(String, IListInt32, String, String) |
Registers the records from the given ID list.
| |
RegisterRecords(DataTable, String, String, String, String) |
Registers the records from the given table.
| |
RemoveDefaultValue |
Removes default value.
| |
SetDefaultValue |
Sets default value.
| |
TranslateColumn(DataRow, String, String, Int32) |
Translates the DataRow column.
| |
TranslateColumn(GeneralizedInfo, String, String, Int32, Boolean, Boolean) |
Translates the column value of the given info object.
| |
TranslateColumn(IDataContainer, String, String, Int32, Boolean, Boolean) |
Translates the column value of the given container.
| |
TranslateColumns |
Translates all reference object columns.
| |
TranslateListColumn |
Translates the column value with list of IDs of the given info object.
|
Name | Description | |
---|---|---|
GetForeignID |
Returns the ID of specified object.
(Defined by TranslationHelperForeignKeyExtensions.) |