Let’s create a CountryGrowth
entity class.
-
In the Data Model section of the CUBA project tree click New → Entity. The New CUBA Entity dialog window will appear.
-
Enter the name of the entity class –
CountryGrowth
– in the Entity name field, chooseNot persistent
for Entity type and click OK button. The entity designer page will be displayed in the workspace. -
Using Entity Designer add attributes:
-
country
of the typeString
-
year2014
of the typeDouble
-
year2015
of the typeDouble
-
-
Switch to the Text tab. It contains the source code of the
CountryGrowth
class.link:../../../../../source/chart/CountryGrowth.java[role=include]
This class describes a non-persistent entity. An instance of this class contains the number of the country GDP growth rate for 2014 and 2015 years.
CountryGrowth
entity creation is now complete.