Stereotype (attribute of entity)
A stereotype may constrain an entity to define specific properties that are suitable for a particular problem domain or otherwise specialized usage, granting, in turn, certain extra functionality to it.
Entity classes with no stereotype generate code with all the getters and setters for the declared properties and the necessary methods for the CRUD operations.
When a stereotype is used, the entity class extends a special class present in the JRapid libraries that provides extra methods with specialized behavior to the entity.
When an entity specifies a value for the stereotype attribute it must include all the properties required by that stereotype, respecting property name and type. If the entity definition fails to comply with the expected set of properties, the developer will be warned. The entity may add extra properties in addition to the required ones.
JRapid provides several stereotypes for common functionality. On top of this, through the JRapid Community, you may import templates to your application that will save you from the need of defining all the required properties to use a certain stereotype.
In the following list, the available stereotypes are grouped with other stereotypes they are or should be used together with:
- User, Role, Login: What is commonly known as user management (Users, privileges, roles and authentication) are very common features to take into account during an application development process. JRapid simplifies the basics of this task by providing a built-in solution, partly eased by the definition of the required entities through a template and the use of stereotypes to take advantage of built in behavior for these classes.
- Email: Emails are present in almost every web application. This stereotype forces the user to create an entity with subject, body, recipients, source address, etc. The generated class extends a super class with methods such as send() that are already integrated with JavaMail libraries.
- Language, LangValue
<entity label = LABEL name = NAME stereotype = "User" | "Email" | "Language" | "LangValue" | "SavedFilter" | "Role" | "Login" | "Async" ... >