Click or drag to resize

cDbClasses Class

Represents a cache of Vtrin class objects.
Inheritance Hierarchy
SystemObject
  ABB.VtrincDbClassInstanceCache
    cDbClassInstanceCachecDbClass
      cDbClassNamelessInstanceCacheString, cDbClass
        ABB.VtrincDbClasses

Namespace: ABB.Vtrin
Assembly: VtrinLib (in VtrinLib.dll) Version: 530.2607.2220.0 (RTDB_main)
Syntax
public sealed class cDbClasses : cDbClassNamelessInstanceCache<string, cDbClass>

The cDbClasses type exposes the following members.

Constructors
 NameDescription
Public methodcDbClassesInitializes a new instance of the cDbClasses class
Top
Properties
 NameDescription
Public propertyACLEntries
(Inherited from cDbClassInstanceCache)
Public propertyAllFetched Gets value telling if all instances have been fetched into cache.
(Inherited from cDbClassInstanceCache)
Public propertyCanInherit
(Inherited from cDbClassInstanceCache)
Public propertyDriver Database driver associated for this class collection.
(Inherited from cDbClassInstanceCache)
Public propertyEffectiveGroup
(Inherited from cDbClassInstanceCache)
Public propertyEffectiveGroupPermissions
(Inherited from cDbClassInstanceCache)
Public propertyEffectiveOtherPermissions
(Inherited from cDbClassInstanceCache)
Public propertyEffectiveOwner
(Inherited from cDbClassInstanceCache)
Public propertyEffectiveOwnerPermissions
(Inherited from cDbClassInstanceCache)
Public propertyElementType
(Inherited from cDbClassInstanceCache)
Public propertyExpression
(Inherited from cDbClassInstanceCache)
Public propertyGroup
(Inherited from cDbClassInstanceCache)
Public propertyGroupPermissions
(Inherited from cDbClassInstanceCache)
Public propertyItemObject Gets class instance by id, returns null if instance is not found. Remember to call Request before accessing multiple objects so that fetching can be optimized.
(Inherited from cDbClassInstanceCache)
Public propertyItemString Gets class instance by name, returns null if instance is not found. Remember to call Request before accessing multiple objects so that fetching can be optimized. Supported only for named types.
(Inherited from cDbClassInstanceCache)
Public propertyOtherPermissions
(Inherited from cDbClassInstanceCache)
Public propertyOwner
(Inherited from cDbClassInstanceCache)
Public propertyOwnerPermissions
(Inherited from cDbClassInstanceCache)
Public propertyPermissions
(Inherited from cDbClassInstanceCache)
Public propertyProvider
(Inherited from cDbClassInstanceCache)
Public propertyRequiredSecurityFlags
(Inherited from cDbClassInstanceCache)
Public propertyRWLock Gets lock to use for synchronizing access to cache.
(Inherited from cDbClassInstanceCache)
Public propertySecurityChildren
(Inherited from cDbClassInstanceCache)
Public propertySecurityParent
(Inherited from cDbClassInstanceCache)
Public propertyTypeName Gets typename of class instances in this cache (same as pOwner.pName).
(Inherited from cDbClassInstanceCache)
Top
Methods
 NameDescription
Public methodAdd Create a new instance of this class. Note that this new class instance will not be inserted to list of available classes before commiting.
(Inherited from cDbClassInstanceCache)
Public methodClearCache Clears the cache, forcing reloading of the instances.
(Inherited from cDbClassInstanceCache)
Public methodCommitChanges(cDbClassInstance) Commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChanges(cDbClassInstance, Boolean) Commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChanges(cDbClassInstance, Boolean, Boolean) Commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChanges(cDbClassInstance, cDbClassInstance, Boolean, ActionObject)
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesAsync(cDbClassInstance) Asynchronously commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesAsync(cDbClassInstance, Boolean) Asynchronously commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesAsync(cDbClassInstance, cDbClassInstance, Boolean)
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesAsync(cDbClassInstance, Boolean, Boolean) Asynchronously commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesWithSecurityChecking(cDbClassInstance) Commits multiple created or changed instances to database.
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesWithSecurityChecking(cDbClassInstance, cDbClassInstance) Commits multiple created or changed instances to database with security checks. Fails if any of the instances are missing required permissions
(Inherited from cDbClassInstanceCache)
Public methodCommitChangesWithSecurityChecking(cDbClassInstance, Boolean) Commits multiple created or changed instances to database with security checking.
(Inherited from cDbClassInstanceCache)
Public methodContainsId Checks if instance with given id is contained in cache.
(Inherited from cDbClassInstanceCache)
Public methodDisposeReleases all resources used by the cDbClasses
(Overrides cDbClassNamelessInstanceCache.Dispose)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFillControl Fills a control with items of type contained in this cache. This is a legacy support function for Windows Forms based Vtrin UI, do not use for anything else.
(Inherited from cDbClassInstanceCache)
Public methodGetCachedInstances Gets instances that are currently being cached as an array.
(Inherited from cDbClassInstanceCache)
Public methodGetFromCache(Object) Gets instance by id from cache if available, return null if not in cache. Will not try to fetch from database.
(Inherited from cDbClassInstanceCache)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetInstanceById(Object) Gets instance by Id, same as this[object instanceid].
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceById(Object, Boolean) Gets instance by Id, same as this[object instanceid]. Throws exception on error if throwonerr is true.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByIdAsync(Object) Asynchronously gets instance by Id.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByIdWithSecurityChecking(Object) Gets an instance by Id with security checking. Returns null if instance is not found, there is no read access or an error occured. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByIdWithSecurityChecking(Object, Boolean) Gets an instance by Id with security checking. Throws exception on error if throwonerr is true. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByIdWithSecurityCheckingAsync(Object) Asynchronously gets instance by Id, same as this[object instanceid]. Returns null if instance is not found, there is no read access or an error occured. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByIdWithSecurityCheckingAsync(Object, Boolean) Asynchronously gets instance by Id. Throws exception on error if throwonerr is true. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByName(String) Gets instance by Name, same as this[string instancename]. If the class does not have a name property, the call will be redirected to GetInstanceById.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByName(String, Boolean) Gets instance by Name. Throws exception on error if throwonerr is true. If the class does not have a name property, the call will be redirected to GetInstanceById.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameAsync(String) Asynchronously gets instance by Name. If the class does not have a name property, the call will be redirected to GetInstanceByIdAsync.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameAsync(String, Boolean) Gets instance by Name with security checking. Throws exception on error if throwonerr is true. If the class does not have a name property, the call will be redirected to GetInstanceByIdAsync.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameWithSecurityChecking(String) Asynchronously gets instance by Name with security checking. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead. If the class does not have a name property, the call will be redirected to GetInstanceByIdWithSecurityChecking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameWithSecurityChecking(String, Boolean) Asynchronously gets instance by Name with security checking. Throws exception on error if throwonerr is true. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead. If the class does not have a name property, the call will be redirected to GetInstanceByIdWithSecurityChecking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameWithSecurityCheckingAsync(String) Asynchronously gets instance by Name. This API is meant for implementing servers only and requires implementing / setting the driver.ActiveUser (UserProvider) to work properly. For normal clients using this call will just add extra overhead.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceByNameWithSecurityCheckingAsync(String, Boolean) Gets instance by Name with security checking. Throws exception on error if throwonerr is true.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceData(cDbPropertyMask) Gets extracted instance property values, with masking/sorting/grouping.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceData(IEnumerablecDbClassInstance, cDbPropertyMask, Boolean)
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceData(String, Array, cDbPropertyMask, cDbClassInstanceCachecGetFlags) Gets extracted instance property values, with masking/sorting/grouping.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceData(String, Array, cDbPropertyMask, cDbClassInstanceCachecGetFlags, Int32) Gets extracted instance property values, with masking/sorting/grouping.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceDataWithSecurityChecking Gets extracted instance property values, with masking/sorting/grouping with security checking. This call should be used only when an application is serving multiple different users and has set the cDriverSkeleton.ActiveUser to an IUserProvider object that provides the information on the user making the call.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet Gets an instance set that includes all the instances.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(cDbPropertyMask) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(cDbPropertyMask, cDbClassInstanceCachecGetFlags) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(cDbPropertyMask, Boolean) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(cDbPropertyMask, Int32) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String, Object) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(Boolean, String, Object)
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(cDbClassInstanceCachecGetFlags, String, Object)
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String, Array, cDbPropertyMask) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String, Array, cDbPropertyMask, cDbClassInstanceCachecGetFlags) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String, Array, cDbPropertyMask, Int32, cDbClassInstanceCachecGetFlags) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstanceSet(String, Array, cDbPropertyMask, Int32, cDbClassInstance, cDbPropertyMask, cDbClassInstanceCachecGetFlags) Gets an instance set according the given masking.
(Inherited from cDbClassInstanceCache)
Public methodGetInstancesWithSecurityChecking Get instance set based on give masking and do security checking on the results. This call should be used only when an application is serving multiple different users and has set the cDriverSkeleton.ActiveUser to an IUserProvider object that provides the information on the user making the call.
(Inherited from cDbClassInstanceCache)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitializeClassWithinDriverCode 
Public methodInvalidate Invalidates cache contents forcing reloading of everything from database.
(Inherited from cDbClassInstanceCache)
Public methodReferrersTo(String, cDbClassInstance) Gets list of instances having given property name the given value.
(Inherited from cDbClassInstanceCache)
Public methodReferrersTo(String, cDbClassInstance, cDbPropertyMask)
(Inherited from cDbClassInstanceCache)
Public methodRemoveFromCache Removes the instance from the cache, NOT from the database.
(Inherited from cDbClassInstanceCache)
Public methodReplacePermissionsOnChildObjects
(Inherited from cDbClassInstanceCache)
Public methodRequest(String) Used for speeding things up - requesting multiple classes before accessing them allows the driver to merge the queries.
(Inherited from cDbClassInstanceCache)
Public methodRequestNames Used for speeding things up - requesting multiple classes before accessing them allows the driver to merge the queries.
(Inherited from cDbClassInstanceCache)
Public methodToString
(Inherited from cDbClassInstanceCache)
Top
Events
 NameDescription
Public eventChanged Adds an event handler to listen the Changed event on the cDbClassInstanceCache. This event will be fired when ever an instance in cache has changed or deleted or an instance is inserted into cache. Use of GetInstanceSet to other classes within the Changed event's handler should be double checked against deadlocks.
(Inherited from cDbClassInstanceCache)
Public eventChangedUnlocked
(Inherited from cDbClassInstanceCache)
Top
Fields
 NameDescription
Public fieldClass Gets cDbClass owning this cache.
(Inherited from cDbClassInstanceCache)
Public fieldDisableMissingOptimization
(Inherited from cDbClassInstanceCache)
Public fieldForceCacheUpdateOnCommit Sets, whether the cache should be updated by local commits even if server does not confirm the update (not on error return though). This can be useful with classes on which commits result to an asynchronous operation being queued, like with cpmPlus history CurrentValues. WARNING: Understand, that setting this true causes cache being not in sync with the actual data, which could result in incorrect information being displayed and there is no way to verify anymore whether the commit has actually taken effect or not.
(Inherited from cDbClassInstanceCache)
Top
See Also