Skip to content

Code Generator

In IFS Cloud a code generator is responsible for generating deployable database files from application models and source code files.

Generating Base Code

The code generator builds the base layer of the code from models and the code generation template. The base layer is affected by the different characteristics which are set on the entity and the attributes. Also, there are a lot of code generation properties to use in order to achieve the desired results.

The generated base code can be changed dependent on the following:

  • The code generator version
    Each release of IFS Cloud are assigned a specific version of the code generator.
  • The target version
    A target version contains the set of templates used to generate database files. Each release of IFS Cloud are assigned a specific target version. The same target version is also set on the Developer Studio project.
  • The Model type
    Code is generated differently depending on the model type, i.e. Entity, Utility, Enumeration or Search domain.
  • The model files
    The characteristics and code generator properties are set in the model file.

Generating Core Code

Core code is written in source code files, i.e. plsql, views and storage files. These files will also contribute with input to the generation of deployable files.

If you carry out any changes to the source code you will need to carry out a new code generation and deploy the generated code. It is not possible to deploy the source code files themselves.

Generating Code with Layers

Code extensions in different layers are included automatically in the code generation process (as long as they follow the file naming and code standards); it does not matter if the layered code is in the model or the source code.

Generated Files

*.api

The.api file holds the deployable code of the package specification and any public views.

*.apv

The.apv file holds the base view and any extra views.

*.apy

The.apy file holds the deployable code of the package body.

*.cre

The.cre file holds the deployable database objects. These database objects can be tables, indexes, sequences, object types and so on. These files are only used during a new installation.

*.ins

The.ins file inserts data for the build process. The filename is either suffixed with SD (for Search Domains) or LANG (for all other model types)