Skip to content

Method Protection Types

To every entity, enumeration and utility, there are specified services or functions. These services are known as methods. The application programming interfaces (API) for entities are very important and the encapsulation of them implies that the internal implementation of them may be changed, as long as its API will remain unchanged.

To be able to define all methods for an entity, enumeration and utility, the methods will be divided into a number of method protection types.

Method Protection Types

Method Protection Type Description Example of method name
Public These methods may be used everywhere in the system and public services are often the communication between different entities. Public interfaces must still be supported if changes inside the entity are made (implementation API). New
Protected These methods are like public ones, but may only be called from the component where the actual entity is used. Protected methods may be used from utilities. New_
Private These methods are only available inside an entity, independent of the different levels of the entity. Private methods are often service calls from the presentation environment to the business logic. Private methods may also be used from utilities. New__
Implementation These methods are only available inside an entity and inside one single architecture level. Implementation methods are often help-functions and the result of traditional structured programming techniques. These kinds of services may be found in the client environment as well as in the server. New___

Example

An example from the entity Customer of private and public interfaces is listed below. The entity Customer is typical and has the private methods connected to the entity as well as some public methods. Other entities can reach data belonging to Customer only through the public API specified for this entity. All of the implementation and data storage in the LU are hidden from other entities.

Private methods Public methods
Customer_API.New__ Customer_API.Exist
Customer_API.Modify__ Customer_API.Get_Description
Customer_API.Remove__ Customer_API.Get_Balance