5.5. Data Object Domain Screens

The following domain screen tabs can be selected from the right side of the Data Object editor screen.

Drools & jBPM

The Drools & jBPM screen allows configuration of Drools-specific attributes.

The Data Modeler in Business Central supports the editing of pre-defined annotations of fact model classes and attributes. The following Drools annotations are supported, and can be customized using the Drools & jBPM interface:

  • TypeSafe
  • Role
  • Timestamp
  • Duration
  • Expires
DataModelerDroolsAndJBPM

For the fields within the fact model, the position annotation is supported. The Drools & jBPM screen when a specific field is selected looks as follows:

72230

Persistence

The Persistence screen can be used to configure attributes on basic JPA annotations for persistence. Fine tuning of annotations, or to add specific annotations, use the Advanced screen.

DataModelerPersistence

The Persistence screen when a specific field is selected looks as follows:

72231

The following annotations can be managed via the Persistence screen.

Table 5.1. Type Annotations

AnnotationAutomatically Generated when Data Object is Persistable

javax.persistence.Entity

Yes

javax.persistence.Table

No

Table 5.2. Field Annotations

AnnotationAutomatically Generated when Data Object is Persistable

javax.persistence.Id

Yes

javax.persistence.GeneratedValue

Yes

javax.persistence.SequenceGenerator

Yes

javax.persistence.Column

No

javax.persistence.OneToOne

No

javax.persistence.OneToMany

Yes - when a field has one or multiple values

javax.persistence.ManyToOne

Yes - when a field has multiple values

javax.persistence.ManyToMany

No

javax.persistence.ElementCollection

Yes - generated by the UI when a new field has one or multiple of a base java type, such as Integer, Boolean, String. This annotation cannot be edited with the ⁠Persistence screen tool (use the Advanced screen tool instead).

All other JPA annotations can be added using the Advanced screen.

Advanced

The Advanced screen is used for fine-tuning of annotations. Annotations can be configured, added and removed using the Advanced Domain screen. These can be any annotation that is on the classpath.

DataModelerAdvanced

After you click on the add annotation option, the Add new Annotation window is displayed. It is required to enter a fully qualified class name of an annotation and by pressing the search icon, the annotation definition is loaded into the wizard. Then it is possible to set different annotation parameters (required parameters are marked with *).

72232

If possible, the wizard will provide a suitable editor for the given parameters.

72233

If it is not possible to provide a customized editor, the wizard will provide a generic parameter editor.

72234

After you enter all the required parameters, the Finish button is enabled and the annotation can be added to the given field or data object.