Wiki source code of Entities
Hide last authors
2.1 | 1 | = A document based model = | |
1.1 | 2 | ||
3 | Probably the most important concept of the REQUEA platform is the concept of Entity. | ||
4 | |||
5 | All data manipulated by applications (Users and Business Rules) is stored in entities. Entities provide: | ||
6 | |||
7 | * the definition of the data manipulated (the entity 'definition') | ||
8 | * 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. | ||
9 | * relationship definitions for complex entity structures | ||
10 | * database or XML mapping information. | ||
11 | |||
2.1 | 12 | = Properties = | |
13 | |||
14 | 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. | ||
15 | |||
16 | Possible simple types are: | ||
17 | |||
18 | - String | ||
19 | - Integer (32 bits) | ||
20 | - Number (double) | ||
21 | - Boolean (true / false) | ||
22 | - Date | ||
23 | - Date and Time (Timestamp) | ||
24 | - Time (in milliseconds) | ||
25 | - Logical duration (duration + unit like business days). Note that logical durations may be related a calendar. See [[Manage Calendars and time>>Calendar]] | ||
26 | - XML | ||
27 | - Binary data (BLOB) | ||
28 | - Image | ||
29 | - Multimedia Audio (such as MP3) | ||
30 | - Script (Server side javascript) | ||
31 | - Monetary Amount | ||
32 | - HTML (rich text) | ||
33 | - Chart | ||
34 | - Color (RGB) | ||
35 | - Security Key (for security settings): see [[Security>>Security]] | ||
36 | - Geometry (if the database is spatially enabled): see [[Spatial Extensions>>SpatialExtensions]] | ||
37 | |||
38 | In addition to those simple types, there are Relational types such as: | ||
3.1 | 39 | (% style="font-family: sans-serif; font-size: 14px; font-style: normal; line-height: 19.6000003814697px; text-align: start;" %)- [[(%%)Reference>>Reference||style="font-family: sans-serif; font-size: 14px; font-style: normal; text-align: start; line-height: 19.6000003814697px;"]] | |
2.1 | 40 | - [[Component>>Component]] | |
41 | - [[Extension>>Extension]] | ||
42 | - [[Hierarchy>>Hierarchy]] | ||
43 | - [[File attachments>>FileAttachment]] | ||
44 | |||
45 | Those relational properties are used to describe relationships between entities. | ||
46 | |||
47 | |||
48 | |||
49 | |||
50 | = Inheritance and the Object Model = | ||
51 | |||
52 | Entity definitions describe what your objects should look like. Instances are actual objects in the database. | ||
53 | |||
54 | Entities definitions can inherit from a parent entity: | ||
55 | |||
56 | - a derived entity will have all the properties of the parent plus its own properties | ||
57 | - a derived entity may add or redefine some specific behavior (like rules, security, ...) | ||
58 | |||
59 | |||
60 | = Creating a simple Entity = | ||
61 | |||
62 | To create an entity definition | ||
63 | - Go to the Tab Design | ||
64 | - Select Entities / New Entity | ||
65 | - Follow the wizard (default options) | ||
66 | - 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. | ||
67 | - Click on submit | ||
68 | - Look at the log in tomcat output see table creation | ||
69 | - Go to: http://localhost:8080/dysoweb/do/prefixEntity |