Entities in JCodeBox represent logical business entities such as Customer or Account. Other components are
then built on top of these logical representations i.e. EJBs.
There is no Java code generated from entities unless they have a pattern applied to them that generates code
i.e. Data Access Object (DAO) applied to BMP EJBs. However, manual entities do generate scripts that will
allow you to create the entity in your selected database.
If an entity has dependant objects defined from it i.e. an EJB - significantly modifying the entity (i.e. changing
the structure, removing it) will result in the dependant objects being invalidated (or in some cases removed). Invalidated
objects are displayed in red in the JCodeBox GUI. Before committing changes of this nature, JCodeBox will display a list
of affected objects and ask you to confirm making the change.
JCodeBox allows you to define 2 types of entities:
- Manual entities
Manual entities are defined in manual applications using the JCodeBox GUI. You enter all the details (data columns, primary
key columns, etc) for manual entities via the Define manual entity dialog. This is useful for defining applications when
the target database is not currently available.
- Database entities
Database entities are defined in database applications directly from a database schema object. After selecting your database
you select the table/object that represents your entity. JCodeBox will interrogate the table and automatically build your
entity based on the table definition.
In database applications only, you can define numerous entities simultaneously
by selecting a number of database tables. JCodeBox can create database entities
from tables as long as they have a primary key assigned.