-
Type: Improvement
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 0.16 swallows
-
Fix Version/s: 0.20 Swallows, 1.5 Swallows, 1.4 Swallows
The current structure of the component:
+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
| CMP_ID | bigint(20) | NO | PRI | NULL | auto_increment |
| COMPONENT_TYPE | varchar(255) | NO | | NULL | |
| UUID | varchar(255) | NO | UNI | NULL | |
| NAME | varchar(255) | NO | UNI | NULL | |
| DESCRIPTION | varchar(255) | YES | | NULL | |
| C_TYPE | int(11) | YES | UNI | NULL | |
+----------------+--------------+------+-----+---------+----------------+
We need to get rid of _C_TYPE_ column and rely only on COMPONENT_TYPE. They are used by different mechanisms: COMPONENT_TYPE is used by the inheritance mapping of the Component and its children, and the _C_TYPE_ is set by componentType field. We don't need this type, we need only inheritance, thus:
- ComponentType enum should be removed
- Compnent#componentType field should be removed
- COMPONENTS#C_TYPE column should be removed
- DAO & Service methods that rely on ComponentType.JCOMMUNE should be replaced with getJcommune() method and its usages should be updated accordingly.
Additionally column CMP_ID should be renamed to ID.