ObjectGears Help

           
Forum   ObjectGears (Version: 1.6.0.0)

OGData

This object is used for data input and output for web service calls.

When calling methods GetDataByFilter, GetDatas, InsertData, InsertDatas, UpdateData, UpdateDatas, DeleteData and DeleteDatas object OGData (or a list of these objects) is passed as input parameter. This object also serves as a filter for look up of actual data records for Get... methods. For other methods actual data records are passed directly in the object.

For Get... methods this object is returned with found data records.

Properties

Data type Name Description
int? ParentId Id of a class or query.
string ModelCode Model code.
string ParentCode Class or query code.
int? ParentType Type - class or query.
int Id Record Id
string Creator Account of the user that created the record.
DateTime? Created Date of record creation.
DateTime? Modified Date of the last change of the record.
string Modifier Account of the user that changed the record the last time.
DateTime? Deleted Date of record creation.
string Deleter Account of the user that deleted the record.
string ShortDescription Short description of the record.
OOItemList ColumnData Column data of one data record.
bool OnlyActive Indication for filtering only active }not deleted] records.
bool ReturnMetaData Indication for return of class and column metadata.
string LanguageCode Localization code to define language in which metadata description shall be returned.
string FilterCommand Command for filter. It will be used when searching in data by method GetDatas.

Property ParentType can gain two values:

  • 0 = for class
  • 1 = for query

Property LanguageCode defines localization of the returned metadata. In case that no localization is entered, text for all the languages returned. In case a non-existing localization is entered, text is returned in the default language.

In order to set the filter in the property FilterCommand use the same format like for filter in URL.

Set up for data filtering

It is necessary to enter two types of information for filtering. The first one is in which object (class or query) the look up shall be performed. The second one is input of filtering conditions for a particular object.

In order to select an object enter the property ParentId or ModelCode, ParentCode and ParentType. Regarding the other set of properties enter whatever property including ColumnData.

When reading (filtering) data also metadata (class/query description, column description) can be returned together with actual data. This can be done by setting up property ReturnMetaData = true. Together with that it is recommended to set also property LanguageCode to the required language. Prerequisite for that is set up localization for the given object and language.

Set up for data creation or update

In order to create or update data it is necessary to enter the property ParentId or ModelCode, ParentCode and ParentType.

In order to update the data also property Id for a particular record. When creating records the property Id is ignored.

Properties ShortDescription, OnlyActive, ReturnMetaData, LanguageCode and audit audit trail columns are ignored.

When creating or updating data in ObjectGears system records only columns that are enabled for that will be affected. In order that methods InsertData and InsertDatas can be used, the column in the target class has to have property Enable editing by record creation checked. Property Enable editing by record change have to be checked for methods UpdateData and UpdateDatas. Other possible column values are disregarded. Also all eventual provided system column values are disregarded.

However, if the target class has a rule with a script that sets up another column (except for system columns), such value is stored in this column. 

The objective of this restriction is to control what is provided from outside to the system when web service call is used. A script is considered a secure part of the system and can modify data without restrictions.

Set up for data deletion

In order to delete the data it is necessary to enter the property ParentId or ModelCode, ParentCode and ParentType. Furtermore, property Id has to entered for a particular deleted record.

Set up for returning data (after filtering)

Methods Get...  return ParentId and Id. Properties ModelCode, ParentCode and ParentTyp are not returned. Also system attributes (Create..., Modifi.. a Delete..) from audit trail and ShortDescription are returned. Actual values for columns are stored in the list ColumnData.

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information