This site in:
 English
 Spanish
 Portuguese
 German
 French
 Italian
 

Item

  

 

Item is the main class in the DB3NF object model. It implements creation, property access, validation (through Schema object) and update, addition and removal of relationships, deletion of any user defined class in the application. It also has a built-in web form engine.

Item
 Attach(Class, ID)
 Cache([CacheID])
 Class
 CreatedOn
 Delete()
 Detach(Class, [ID])
 DisplayName
 Form
 ID
 Prop(Name)
 Properties
 Relatives(Class)
 Restore()
 SchemaObj
 SetInfo()
 UpdatedOn
 Validate()

Properties

  Name     Data Type      Parameters    Comments
Class String
NA
Class property has to be assigned before Item can be active.
Sample.
CreatedOn / UpdatedOn Date
(Read-only)
NA
Created and updated date/time stamps. Not empty only if their creation is set in Deployment options
DisplayName String
(Read-only)
NA
Returns Name of class as defined in CLASS_TYPES table of the Schema database as display_name.
Form IIS or Softartisans' File-Up Form object (Write-Only)
NA
Extracts and assigns property values from a submitted form.
Sample.
ID Long
NA
Equals id in corresponding table. Assignment of an ID binds Item with an existing Item.
Class property must be set before ID can be assigned.
If Item is new (has not been added to the database) its ID is 0.
Prop (default) Variant Name (of property) Sample
Properties PropertyCollection
NA
Collection of Item properties. Sample.
Relatives Item for single parents, ItemCollection otherwise Class (name of relative class) Sample.
SchemaObj Schema
NA
Sample

Methods

  Name    Return Value      Parameters    Comments
Attach Item Class (name), ID Adds relationship between the Item object and existing object of different class (for example, adds user to a group)
. For existing Items executes immediately, for new Items executes on SetInfo method when object is created.
Sample
Detach None Class (name), ID Removes relationship between the Item object and existing object (for example, removes user from a group).
Makes no sense for Items not yet created.
Validate Boolean
NA
Validates all property values according to Schema rules. The result is false when any value is invalid.
Sample.
SetInfo None
NA
Writes to the database properties of an existing Item and creates new Item.
For SetInfo to be successful, validation must be positive. If Item has not been validated before SetInfo, SetInfo itself calls Validate method.
Sample 1 (new Item), Sample 2 (existing item).
Delete None
NA
Deletes Item from the database.
Cache None [CacheID] Caches Item in the Session scope. IIS Sessions or Session Server must be enabled.
CacheID is used to name cache area where the Item information has to be stored.
Sample.
Restore None [CacheID] Restores the Item from the cache saved by Cache method.
CacheID has the same value as used in the Cache method.
Sample.

© 2001 - 2012 Interapple, Inc., All rights reserved.