private void complementDataModelWithEntitiesEnrichment (String type) {
Database database = model.getDataModel().getDatabase();
if (database!=null) {
// for all the view
// set virtual pk, realpk
Enrichment enrichment = model.getBusinessModel().getEnrichment();
if (enrichment != null) {
if (enrichment.getEntities()!=null) {
for (Entity entity : enrichment.getEntities()) {
String typeEntity = TableUtils.getTargetType(database, entity);
if ((Table.VIEW.equals(type) && Table.VIEW.equals(typeEntity)))
complementView(entity, database);
else if (type.equals(Table.TABLE) && Table.TABLE.equals(typeEntity))
complementTable(entity,database);