Class InstanceDataManager<T>
InstanceDataManager must be inherited by all other InstanceManager, e.g. WorkitemManager, DocumentManager, FileManager, ... It provides functions to work with instance datas and their connections
Inheritance
Inherited Members
Namespace: Simplic.Framework.Extension
Assembly: Simplic.Framework.Extension.dll
Syntax
public abstract class InstanceDataManager<T>
where T : InstanceData
Type Parameters
Name | Description |
---|---|
T | Type of InstanceData |
Properties
| Improve this Doc View SourceStackGuid
Unique id of the stack configuration (shoud be "static")
Declaration
public abstract Guid StackGuid { get; }
Property Value
Type | Description |
---|---|
System.Guid |
StackName
Unique name of the stack configuration (should be "static")
Declaration
public abstract string StackName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceConnectWith(T, Guid, IList<Guid>, Boolean)
Connect one to multiple instance datas
Declaration
public virtual void ConnectWith(T item, Guid destinationStackGuid, IList<Guid> destinationInstanceDatas, bool isTwoWay)
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
System.Guid | destinationStackGuid | Guid of the stack to connect with |
System.Collections.Generic.IList<System.Guid> | destinationInstanceDatas | List of instance data guids to connect with |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
ConnectWith(T, Guid, Guid, Boolean)
Connect two instance datas
Declaration
public virtual void ConnectWith(T item, Guid destinationStackId, Guid destinationInstanceData, bool isTwoWay)
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
System.Guid | destinationStackId | Guid of the stack to connect with |
System.Guid | destinationInstanceData | Id of the instance data to connect with |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
ConnectWith(T, String, IList<Guid>, Boolean)
Connect one to multiple instance datas
Declaration
public virtual void ConnectWith(T item, string destinationStackName, IList<Guid> destinationInstanceDatas, bool isTwoWay)
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
System.String | destinationStackName | Name of the stack to connect with |
System.Collections.Generic.IList<System.Guid> | destinationInstanceDatas | List of instance data guids to connect with |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
ConnectWith(T, String, Guid, Boolean)
Connect two instance datas
Declaration
public virtual void ConnectWith(T item, string destinationStackName, Guid destinationInstanceData, bool isTwoWay)
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
System.String | destinationStackName | Name of the stack to connect with |
System.Guid | destinationInstanceData | Id of the instance data to connect with |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
ConnectWith<A>(T, A, Boolean)
Connect two instance datas
Declaration
public virtual void ConnectWith<A>(T item, A destinationItem, bool isTwoWay)
where A : InstanceData
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
A | destinationItem | Instance of the instance data to connect with. |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
Type Parameters
Name | Description |
---|---|
A | Type of the other instance data |
ConnectWith<A>(T, IList<A>, Boolean)
Connect one to multiple instance datas
Declaration
public virtual void ConnectWith<A>(T item, IList<A> destinationItems, bool isTwoWay)
where A : InstanceData
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of an instance data with the current type |
System.Collections.Generic.IList<A> | destinationItems | List of the instance data to connect with. |
System.Boolean | isTwoWay | Defines whether to create the connection in both ways |
Type Parameters
Name | Description |
---|---|
A | Type of the other instance data |
Create(T)
Create new instance data item. If the item has no guid, it will be added automatically
Declaration
public abstract T Create(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item to store in the database |
Returns
Type | Description |
---|---|
T | Instance of the prepared item |
Delete(T)
Delete a single instance data
Declaration
public virtual void Delete(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Instance of InstanceData |
Delete(Guid)
Delete instancedata by it's guid
Declaration
public abstract void Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique ID |
Get(Guid)
Get an instancedata instance by it's guid
Declaration
public abstract T Get(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Guid of instance data |
Returns
Type | Description |
---|---|
T | Instance of an instance-data guid |
GetConnectedWith(Guid, IList<Guid>)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith(Guid stackGuid, IList<Guid> sourceGuids)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | stackGuid | Guid of the other stack |
System.Collections.Generic.IList<System.Guid> | sourceGuids | Guid sof the other instance datas as a list |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections for the current type |
GetConnectedWith(Guid, Guid)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith(Guid stackGuid, Guid sourceGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | stackGuid | Guid of the other stack |
System.Guid | sourceGuid | Guid of the other instance data |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections for the current type |
GetConnectedWith(String, IList<Guid>)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith(string stackName, IList<Guid> sourceGuids)
Parameters
Type | Name | Description |
---|---|---|
System.String | stackName | Name of the other stack |
System.Collections.Generic.IList<System.Guid> | sourceGuids | List of guids of the other instance datas |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections for the current type |
GetConnectedWith(String, Guid)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith(string stackName, Guid sourceGuid)
Parameters
Type | Name | Description |
---|---|---|
System.String | stackName | Name of the other stack |
System.Guid | sourceGuid | Guid of the other instance data |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections for the current type |
GetConnectedWith<A>(A)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith<A>(A item)
where A : InstanceData
Parameters
Type | Name | Description |
---|---|---|
A | item | Instance of the connected item |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections of the current type |
Type Parameters
Name | Description |
---|---|
A | Type of the connected item |
GetConnectedWith<A>(IList<A>)
Get all connections of current type by an external type, e.g. Get document by contact or document by file
Declaration
public virtual IList<T> GetConnectedWith<A>(IList<A> items)
where A : InstanceData
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<A> | items | List of instances of the connected item |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List of connections for the current type |
Type Parameters
Name | Description |
---|---|
A | Type of the connected item |
GetConnections(Guid, T)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<Guid> GetConnections(Guid stackGuid, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | stackGuid | Guid of the other stack, to which the connections should be resolved |
T | item | Instance type T, to which the connections whould be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Guid> | List of connected items of the other type |
GetConnections(Guid, IList<T>)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<Guid> GetConnections(Guid stackGuid, IList<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | stackGuid | Guid of the other stack, to which the connections should be resolved |
System.Collections.Generic.IList<T> | items | List of instances of type T, to which the connections whould be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Guid> | List of connected items of the other type |
GetConnections(String, T)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<Guid> GetConnections(string stackName, T item)
Parameters
Type | Name | Description |
---|---|---|
System.String | stackName | Name of the other stack, to which the connections should be resolved |
T | item | Instance type T, to which the connections whould be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Guid> | List of connected items of the other type |
GetConnections(String, IList<T>)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<Guid> GetConnections(string stackName, IList<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.String | stackName | Name of the other stack, to which the connections should be resolved |
System.Collections.Generic.IList<T> | items | List of instances of type T, to which the connections whould be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.Guid> | List of connected items of the other type |
GetConnections<A, M>(M, T)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<A> GetConnections<A, M>(M instanceDataManager, T item)
where A : InstanceData where M : InstanceDataManager<A>
Parameters
Type | Name | Description |
---|---|---|
M | instanceDataManager | Instance of an InstanceDataManager of a specific type (M) |
T | item | Instance type T, to which the connections whould be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<A> | List of connected items of the other type |
Type Parameters
Name | Description |
---|---|
A | Type of the other instance data |
M | InstanceDataManager for the other type of instance data |
GetConnections<A, M>(M, IList<T>)
Get a list of items which are connected with an instance of the current instance data type
Declaration
public virtual IList<A> GetConnections<A, M>(M instanceDataManager, IList<T> items)
where A : InstanceData where M : InstanceDataManager<A>
Parameters
Type | Name | Description |
---|---|---|
M | instanceDataManager | Instance of an InstanceDataManager of a specific type (M) |
System.Collections.Generic.IList<T> | items | List of instances by type T, to which the connections should be resolved |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<A> | List of connected items of the other type |
Type Parameters
Name | Description |
---|---|
A | Type of the other instance data |
M | InstanceDataManager for the other type of instance data |
Update(T)
Update instance data item
Declaration
public abstract void Update(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item instance |