Public Methods (ttadv7112m000)

Use this session to define the public methods of a business object.

Public methods operate on the public attributes of a business object, and are available to external applications. The methods are either standard methods or specific methods. Specific methods must be programmed manually. Standard methods can be generated based on the protected attributes of the business object. On these attributes standard methods perform the standard actions create, read, change and delete, show, and list.

If you defined a reference table for the business object, the following standard methods are used to operate on the reference table: CreateRef and DeleteRef. Refer to the Help on the Tables (ttadv7111m000) session for more information.

Note: A public method actually calls the related protected method of each component, which is not accessible directly by external applications.
Method

The name of the public method.

If the method is a standard method, you cannot modify it. If the method is a specific method, you can modify its properties, such as name, return type or arguments.

The following rules apply to the protected method name:

  • The name must be unique within the business object.
  • The name must refer to business concepts and/or the functionality of the business object. Do not use a name that refers to a technical solution.
  • Use standardized business terminology, for example, OAGIS.
  • The name must be meaningful.
  • Only alphanumeric characters ([A-Z], [a-z], [0-9]) are allowed.
  • Spaces are not allowed.
  • If the name consists of several words, start each word, including the first word, with a capital.

Example: GetEmployeeDescription.

Standard methods can only be generated. The standard methods are: Create, Change, Delete, Show, and List. If you use a reference table, the extra methods CreateRef and DeleteRef are generated too. You cannot enter these names for a specific method, that is, for a method you create manually.

Related Protected Method

If a public method is related to a protected method, this field displays the name of that protected method.

For example, the public standard method Change is related to the protected standard method Change.

Return Type

The return type of the public method. Public methods can only have return type long.

Standard/Specific

This field indicates whether the method is a standard or a specific method.

Allowed values

Standard

Standard methods can be generated because their behavior is generic for all business objects. You cannot modify the properties of a standard method.

The following standard methods exist:

  • Create Create a business object or component.
  • Change Change a business object or component. The change actually is a change of the attribute values.
  • Delete Delete a business object or component.
  • Show Show a business object or component by returning the attribute values.
  • List Show multiple business objects.
  • CreateRef Create a record in the reference table, which indicates that an external application has a reference to the business object. As long as references exists, the business object cannot be deleted by LN.
  • DeleteRef Delete a record in the reference table.
  • PublishList Publish multiple business objects. For details, refer to "Event Publishing Overview" in the Web Help of the Data Director (da) package.
  • PublishChanges Publish all changes made to business objects. For details, refer to "Event Publishing Overview" in the Web Help of the Data Director (da) package.
  • UnpublishChanges Stop publishing of all changes made to business objects. For details, refer to "Event Publishing Overview" in the Web Help of the Data Director (da) package.
Specific

Specific methods cannot be generated automatically: the essence of a specific method is that its behavior is business object specific. Therefore specific methods must be programmed manually. You can define the name, return type, arguments and arguments properties of a specific method.

Standard methods can be generated through the appropriate menu. You cannot modify the properties of standard methods. You can only delete the methods you do not require.