IFolder Interface |
Namespace: PDTec.IceNet.Core.Model
public interface IFolder
The IFolder type exposes the following members.
Name | Description | |
---|---|---|
ChangedBy |
The ID of the user who changed the folder last.
| |
ChangedOn |
The point of time the folder was changed last.
| |
CreatedBy |
The ID of the user who created the folder.
| |
CreatedOn |
The point of time the folder was created.
| |
Description |
The folder description. The description can be empty.
| |
Id |
The folder ID. The ID is generated by the platform and
cannot be modified.
| |
IsRootFolder |
Gets the information whether this is the repository
root folder or not.
| |
IsValid |
Indicates if the folder instance is valid. The folder becomes
invalid if the Destroy method has been called.
| |
Name |
The folder name. The name cannot be an empty string. It is
modifiable and does not have to be unique.
| |
ParentFolder |
Gets the containing parent folder. Returns null
if this is the root folder.
|
Name | Description | |
---|---|---|
AddKey |
Adds a new key to the folder. The key must be unique
within the system context (e.g. unique per database).
| |
CreateChild |
Creates new child folder.
| |
DeleteKey |
Removes a key from the folder.
| |
Destroy |
Deletes the folder. Deletes all contained objects.
| |
GetT(String, Boolean, Int32) |
Retrieves all objects of a specific type contained in the folder up
to a maximum number and returns them with a specific business object
interface. This method fails if at least one of the objects specified
by pObjType does not implement the T business object
interface.
| |
GetT(IObjType, Boolean, Int32) |
Retrieves all objects of a specific type contained in the folder up
to a maximum number and returns them with a specific business object
interface. This method fails if at least one of the objects specified
by pObjType does not implement the T business object
interface.
| |
GetChildFolders |
Retrieves the child folders.
| |
GetKeys |
Retrieves the folder's (unique) keys.
| |
GetObjects |
Retrieves all objects contained in the folder.
| |
GetObjects(Int32) |
Retrieves all objects contained in the folder up to a maximum number.
| |
GetObjects(String, Boolean, Int32) |
Retrieves all objects of a specific type contained in the folder up to a maximum number.
| |
GetObjects(IObjType, Boolean, Int32) |
Retrieves all objects of a specific type contained in the folder up to a maximum number.
| |
GetObjectsCount |
Retrieves the number of objects contained in the folder.
| |
GetParentFolder |
Retrieves the parent folder (if this is not the root folder).
| |
MoveTo |
Moves the folder to another folder.
| |
Reload |
Refreshes the folder data from secondary storage (e.g. database)
if available. Use this method to retrieve up-to-date audit information
(ChangedBy, ChangedOn properties).
| |
SetChildFolderIndex |
Sets the sequence index of the child folder.
| |
SetChildFolderIndices |
Reorders the child folders sequence.
| |
Touch |
Updates the ChangedBy and ChangedOn information.
|
This example shows how to use the CreateChild(String, String) method to create folders.
Repository.ExecuteTransaction(delegate() { IFolder pDataFolder = Repository.RootFolder.CreateChild("Data", ""); IFolder pCarsFolder = pDataFolder.CreateChild("Cars", ""); });
This example shows how to retrieve child folders and objects. The GetObjects(IObjType, Boolean, Int32) method allows to filter by object type and to restrict the number of results.
foreach (IFolder pFolder in Repository.RootFolder.GetChildFolders()) { Console.WriteLine("Folder " + pFolder.Name); IObject[] aAllObjects = pFolder.GetObjects(); Console.WriteLine(" Objects: " + aAllObjects.Length); IObject[] aVehicles = pFolder.GetObjects(Repository.GetObjTypeByName("PDTec.ICR.Vehicle"), false, 0); Console.WriteLine(" Vehicles: " + aVehicles.Length); }