Entities
A document based model
Probably the most important concept of the REQUEA platform is the concept of Entity.
All data manipulated by applications (Users and Business Rules) is stored in entities. Entities provide:
- the definition of the data manipulated (the entity 'definition')
- information on data types (such as dates, string, ...) used by the entire platform. For example, the User interface layer will render a calendar widget for a 'Date' type.
- relationship definitions for complex entity structures
- database or XML mapping information.
Properties
Entity properties describe the information you want to store for an entity. Properties have a type and based on this type, there may be some additional attributes.
Possible simple types are:
- String
- Integer (32 bits)
- Number (double)
- Boolean (true / false)
- Date
- Date and Time (Timestamp)
- Time (in milliseconds)
- Logical duration (duration + unit like business days). Note that logical durations may be related a calendar. See Manage Calendars and time
- XML
- Binary data (BLOB)
- Image
- Multimedia Audio (such as MP3)
- Script (Server side javascript)
- Monetary Amount
- HTML (rich text)
- Chart
- Color (RGB)
- Security Key (for security settings): see Security
- Geometry (if the database is spatially enabled): see Spatial Extensions
In addition to those simple types, there are Relational types such as:
- Reference
- Component
- Extension
- Hierarchy
- File attachments
Those relational properties are used to describe relationships between entities.
Inheritance and the Object Model
Entity definitions describe what your objects should look like. Instances are actual objects in the database.
Entities definitions can inherit from a parent entity:
- a derived entity will have all the properties of the parent plus its own properties
- a derived entity may add or redefine some specific behavior (like rules, security, ...)
Creating a simple Entity
To create an entity definition
- Go to the Tab Design
- Select Entities / New Entity
- Follow the wizard (default options)
- Warning: SQL short name is a 3-5 letters used in DB (For example Ticket would be TCK). It does not have to be unique.
- Click on submit
- Look at the log in tomcat output see table creation
- Go to: http://localhost:8080/dysoweb/do/prefixEntity