Click or drag to resize

DataObject Class

Summary description for DataObject.
Inheritance Hierarchy

Namespace:  Omada.OE.Model
Assembly:  Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntax
C#
[SerializableAttribute]
public class DataObject : IDataObject, ICloneable, 
	IObjectWithId, IObjectWithGuid, IObjectWithDataVersion, IObjectWithAttributes, IObjectContainingDataObject

The DataObject type exposes the following members.

Constructors
  NameDescription
Public methodDataObject(Int32, DataObjectType, Int32)
Public methodDataObject(Int32, Int32, Int32)
Constructor taking ID, DataObjectType ID and parent ID
Top
Properties
  NameDescription
Public propertyAvailableInfo
Contains information about which attributes are available on the DataObject. If for instance the attribute DataExchangeConfigId is used and the information is not laoded, an exception is thrown. It is only used for DataObject instances which are loaded from the database. For newly created objects, all attributes are available. The different flags in the load options determines which attributes are available. Use IsInfoAvailable() to discover which attributes are available.
Public propertyChangeTime
This ChangeTime property is taken from the tblDataObject table column ChangeTime, which is not necessarily the same time as the CreateTime of the newest DataObjectVersion since the column can be updated independently for ILM integration purposes.
Public propertyCompleteTime
Contains the date when the object was completed. It is only relevant for Activity and Process object instances. The information is populated here due to filter and sorting features.
Public propertyCreatedBy
UserID of the User who created the object.
Public propertyCreateTime
Date when the object was created.
Public propertyCurrentVersion
Returns the current object version as defined in the database.
Public propertyDeleted
Returns true if the object is deleted.
Public propertyDeletedBy
User ID if the user who deleted the object
Public propertyDeleteTime
Date when object was deleted
Public propertyDisplayName
Contains the DisplayName of the data object. The DisplayName is formatted using the DisplayNameFormat of the data object type. If the DisplayNameFormat is empty, the DisplayName contains the name of the data object type and the number.
Public propertyFileAttachments
FilesAttachments contains the files which are attached to the DataObject. FilesAttachments is not always populated (according to load options)
Public propertyFixedFields
Contains a number of read-only FixedFields. The available fields are determined by the DataObjectType and on the load options. Use EnumUtils.FixedFieldRequiresExplicitLoading() to discover which field that may be available in the collection.
Public propertyId
The unique id of the data object.
Public propertyInheritsSecurity
Returns true if the object inherits it security from another object.
Public propertyItemInt32
Retriever/assigner of values for a property. The data type of a value depends on the property type and data type: Value property - Text: string Value property - Integer: int Value property - DateTime: DateTime Value property - Decimal: double Value property - Boolean: bool Value property - Hyperlink: string Value property - TimeSpan: TimeSpan Value property - MultiLangText: string (value in active user's language) Value property - Xml: string Set property: int Reference property: int
Public propertyItemString
Retriever/assigner of values for a property. The data type of a value depends on the property type and data type: Value property - Text: string Value property - Integer: int Value property - DateTime: DateTime Value property - Decimal: double Value property - Boolean: bool Value property - Hyperlink: string Value property - TimeSpan: TimeSpan Value property - MultiLangText: string (value in active user's language) Value property - Xml: string Set property: int Reference property: int
Public propertyLastVersion
Returns the last version in the Versions collection. It may be a yet unsaved version.
Public propertyNumber
Contains the Number of the data object (which was taken from a sequence when it was created).
Public propertyParentId
ParentId contains the ID of the parent DataObject. For new DataObjects the ParentId is 0. ParentId can and may only be set when creating a new DataObject where object must be put a certain place in the tree structure. If the object is the root of the tree structure, then ParentId = Id.
Public propertyStatic memberRootName
Return "Root"
Public propertySecurityObject
SecurityObject is null if the object has not been loaded. It is only legal to change the SecurityObject if InheritsSecurity=false since the SecurityObject instanse may be used on other DataObjects. Use BreakSecurityInheritance to remove the inheritance.
Public propertySecurityObjectId
Contains the ID for the DataObject which defines the security for the DataObject
Public propertySpecialType
Returns true if the DataObject is of a special (built-in) type like User, UserGroup etc.
Public propertyTemplate
Defined whether the object is a template object. It is applicable for process templates, activity templates and process target templates.
Public propertyTemplateObjectId
If an object is cloned from a template object, this field contains the ID of the template.
Public propertyTypeId
ID of the data object type.
Public propertyTypeName
System name of the data object type. Can be null (depending on which constructor is used) when creating a new data object (until it is saved).
Public propertyTypeUId
UID of the data object type. Can be zero (depending on which constructor is used) when creating a new data object (until it is saved).
Public propertyUId
The cross-deployments unique id of the data object.
Top
Methods
  NameDescription
Public methodAddVersion(Boolean, DataObjectType)
Adds a new DataObjevtVersion object the Versions collection. If copyValues is true, all property values on the current version are copied to the new version.
Public methodAddVersion(Boolean, Boolean, DataObjectType)
If a data object must be modified then a new version must be added first. This method adds a new version to the data object.
Public methodAssignPropertyValue
Tip: use the indexer property to access property values instead of using this method. Assigns a property value to the LastVersion of the object. The value can be of type: string, int, datetime, double, bool, timespan, AppStringContainer, SetPropertyValue, ReferencePropertyValue or null. The value type is dependant on the DataType of the property
Public methodAssignReferencePropertyValue
Assigns a reference property on LastVersion.
Public methodAssignReferencePropertyValues
Assigns a reference property on LastVersion. Tip: use the indexer property to access property values instead of using this method.
Public methodBreakSecurityInheritance
Breaks the enheritance of security. If InheritsSecurity=true no adjustments must be made to the security. This method is used to set InheritsSecurity=false.
Public methodCheckAndAddVersion(Boolean)
Adds a version only of the LastVersion object is already stored in the database.
Public methodCheckAndAddVersion(Boolean, DataObjectType)
Adds a version only if the LastVersion object is already stored in the database.
Public methodClone
Public methodStatic memberDataObjectHasExtendedProtection
Builtin data objects of certain types has "extended protection" meaning that they can neither be updated nor deleted (for all other builtin data objects we only prevent deletion)
Public methodFormatTemplateText
Formats the object to a string using a template string where attributes a replaced.
Public methodStatic memberGetDefaultParentId
Returns the default parentid for a new dataobject of the provided type.
Public methodGetMultiLanguagePropertyValue
Returns multi language property value in provided language.
Public methodGetObjectKey
Returns the key value of the data object. the key property comes from the typen, but it must be provided for performance reasons. If key property is 0 the display name is returned. Returns null if the object does not have a value for the provided key (value) property.
Public methodGetPropertyValue(Int32)
Returns the value of a particular property on the newest data object version. The value can be of the following type:: string, int, datetime, double, bool, SetPropertyValue object or ReferencePropertyValue object. It can also be null, if: * The object does not have a current versionhar ingen current version * The property was not found (its not on the type)'en blev ikke fundet (den er ikke på typen) * The value has not been loaded (ValueAvailable=false) * There are no value for theproperty (can be caused by yhe property being added to the type after the object was created.) * The identity user does not have access to the property
Public methodGetPropertyValue(Int32, IEnumerableInt32) Obsolete.
Returns the value(s) of a Set property or a Reference property. If the property is a Set property the Ids of the selected Set Property Values are returned. If the property is a Reference property the Ids of the selected Data Objects are returned.
Public methodGetPropertyValue(Int32, Int32) Obsolete.
Returns the value of a Value property with data type 'Integer' or a Set property or a Reference property. If the property is a Set property the Id of the selected Set Property Value is returned. If the Set property has more than one selected values then a random one of those is returned. If the property is a Reference property the Id of the selected Data Object is returned. If the Reference property has more than one selected values then a random one of those is returned.
Public methodGetPropertyValue(String, Boolean) Obsolete.
Returns the value of a Value property with data type 'Boolean'.
Public methodGetPropertyValue(String, IEnumerableInt32) Obsolete.
Returns the value(s) of a Set property or a Reference property. If the property is a Set property the Ids of the selected Set Property Values are returned. If the property is a Reference property the Ids of the selected Data Objects are returned.
Public methodGetPropertyValue(String, DateTime) Obsolete.
Returns the value of a Value property with data type 'DateTime'.
Public methodGetPropertyValue(String, Double) Obsolete.
Returns the value of a Value property with data type 'Decimal'.
Public methodGetPropertyValue(String, Guid) Obsolete.
Returns the value of Set property. The UId of the selected Set Property Value is returned. If the Set property has more than one selected values then a random one of those is returned. Throws an exception if: - The property doesn't exist - The property is not present in the data object type - The property is not of the right type and data type - The value of the property is not available (because it has not been loaded) - The value of the property is not accessible due to security
Public methodGetPropertyValue(String, Int32)
Returns the value of a Value property with data type 'Integer' or a Set property or a Reference property. If the property is a Set property the Id of the selected Set Property Value is returned. If the Set property has more than one selected values then a random one of those is returned. If the property is a Reference property the Id of the selected Data Object is returned. If the Reference property has more than one selected values then a random one of those is returned. Throws an exception if: - The property doesn't exist - The property is not present in the data object type - The property is not of the right type and data type - The value of the property is not available (because it has not been loaded) - The value of the property is not accessible due to security
Public methodGetPropertyValue(String, String)
Returns the string value of a property. If the property is a Value property it must be of data type 'Text' or 'MultiLangText'. If the property is a Set property the Name of the (first) selected value is returned. If the property is a Reference property the DisplayName of the (first) selected value is returned. Throws an exception if: - The property doesn't exist - The property is not present in the data object type - The property is not of the right type and data type - The value of the property is not available (because it has not been loaded) - The value of the property is not accessible due to security
Public methodGetPropertyValue(String, TimeSpan) Obsolete.
Returns the value of a Value property with data type 'TimeSpan'.
Public methodGetPropertyValueByOdwMapping(String, DateTime)
Returns the datetime value of a property by odw mapping. If the property is a Value property it must be of data type DateTime.
Public methodGetPropertyValueByOdwMapping(String, String)
Returns the string value of a property by odw mapping. If the property is a Value property it must be of data type 'Text' or 'MultiLangText'. If the property is a Set property the Name of the (first) selected value is returned. If the property is a Reference property the DisplayName of the (first) selected value is returned. Throws an exception if: - The property doesn't exist - The property is not present in the data object type - The property is not of the right type and data type - The value of the property is not available (because it has not been loaded) - The value of the property is not accessible due to security
Public methodGetPropertyValuesT(Int32)
Returns the value(s) for a property.
Public methodGetPropertyValuesT(String)
Returns the value(s) for a property or a fixed field. Not all fixed fields are supported - please refer to the PropertyValuesContainer class for details.
Public methodGetReferencePropertyValues(Int32)
Returns a collection of ReferencePropertyValue objects from the current DataObjectVersion.
Public methodGetReferencePropertyValues(String)
Returns a collection of ReferencePropertyValue objects from the current DataObjectVersion.
Public methodGetSinglePropertyValueT(Int32, T)
Returns a single value for a property (fixed fields are not supported by this method).
Public methodGetSinglePropertyValueT(String, T)
Returns a single value for a property or a fixed field. Not all fixed fields are supported - please refer to the PropertyValuesContainer class for details.
Public methodGetSinglePropertyValueByOdwMappingT
Returns a single value for a property or a fixed field based on ODW mapping. Not all fixed fields are supported - please refer to the PropertyValuesContainer class for details.
Public methodHasProperty
Returns true if the data object has the specified property.
Public methodIsInfoAvailable
Returns true if the fields provided in infoFlags is available on the DataObject.
Public methodPropertyChanged
Returns true if the provided property has changed between CurrentVersion and LastVersion. If no currentversion is available, true is returned.
Public methodSetId
Sets the internal ID of the object
Public methodSetPropertyValue
Tip: use the indexer property to access property values instead of using this method. Assigns a property value to the LastVersion of the object. The value can be of type: string, int, datetime, double, bool, timespan, AppStringContainer, SetPropertyValue, ReferencePropertyValue or null. The value type is dependant on the DataType of the property
Public methodStatic memberToObjectArray
Utility for helping assigning values to the property value dictionary.
Public methodToString
Formats the object to a displayable string.
(Overrides ObjectToString.)
Public methodToString(AppFormatInfo)
Returns the string representation of the object.
Public methodUpdateDisplayName
Updates data object display name.
Top
Fields
  NameDescription
Public fieldObjectRetrievedFromCache
Object was retrieved from a memory cache and not deserialized from the SQL cursor.
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIObjectWithDataVersion.GetDataVersion
Explicit interface implementationPrivate methodIObjectWithGuid.GetGuid
Explicit interface implementationPrivate methodIObjectWithId.GetId
Explicit interface implementationPrivate propertyIDataObjectDisplayName
States the display name of the data object.
Explicit interface implementationPrivate methodIDataObjectGetPropertyValue
Returns the string value of a property. If the property is a Value property it must be of data type 'Text' or 'MultiLangText'. If the property is a Set property the Name of the (first) selected value is returned. If the property is a Reference property the DisplayName of the (first) selected value is returned. Throws an exception if: - The property doesn't exist - The property is not present in the data object type - The property is not of the right type and data type - The value of the property is not available (because it has not been loaded) - The value of the property is not accessible due to security
Explicit interface implementationPrivate methodIDataObjectGetPropertyValues
Returns a dictionary with the property values of the data object. The keys in the dictionary are the system names of the properties. Not all properties are present in the dictionary. The following are excluded: - Text properties with log - Hyperlink properties - Properties w. denied access - Properties w. an inavailable value The data type of the property value depends on the type and data type of the property: - Set property: IEnumerable int of SetPropertyValue ids - Reference property: IEnumerable<IReferencePropertyValue> - Value property - Text: string - can be null - Value property - Integer: int - can be null - Value property - DateTime: DateTime - can be null - Value property - Decimal : double - can be null - Value property - Boolean : bool - can be null - Value property - TimeSpan : TimeSpan - can be null - Value property - Multilang. text : string with value in active user's language - can be null
Explicit interface implementationPrivate propertyIDataObjectId
States the Id of the data object.
Explicit interface implementationPrivate propertyIDataObjectNumber
States the Number of the data object.
Explicit interface implementationPrivate propertyIDataObjectParentId
States the Id of the data object which is the parent of the data object.
Explicit interface implementationPrivate propertyIDataObjectTemplate
States whether the data object is a template. Template data objects are either: process templates, activity templates or target object templates.
Explicit interface implementationPrivate propertyIDataObjectTypeId
States the data object type id of the data object.
Explicit interface implementationPrivate propertyIDataObjectUId
States the UId of the data object.
Explicit interface implementationPrivate methodIObjectContainingDataObjectGetDataObject
Returns the DataObject
Explicit interface implementationPrivate methodIObjectWithAttributesAddAttribute
Adds an attribute - if it exists already the value is overwritten.
Explicit interface implementationPrivate methodIObjectWithAttributesGetKeys
Returns all the keys in the collection
Explicit interface implementationPrivate methodIObjectWithAttributesGetValue
Returns the value of an attribute. If the attribute doesn't exist null is returned.
Explicit interface implementationPrivate methodIObjectWithAttributesHasAttribute
Returns whether an attribute exists.
Top
See Also