The following methods return an Entity object which holds information about the entity as defined in entities metadata file. getEntityByClass(String className, String context, String mpID) getEntity(String entityID, String context, String mpID) Code Block |
---|
title | Hibernate Query Example |
---|
| ...
Entity rentalEntity = MetadataUtil.getEntityByClass(CUSTOMCRMDORental.getClass().getName(), getCRMSession().getRealPath(), getOrganisationID());
String entityId = rentalEntity.getId();
String moduleId = rentalEntity.getModuleid();
String typeEntityId = rentalEntity.getTypeentityid();
Entity typeEntity = MetadataUtil.getEntity(typeEntityId, getCRMSession().getRealPath(), getOrganisationID());
... |
getEntityByTable(String tableName, String context, String mpID) getEntityByTypeEntity(String typeEntityID, String context, String mpID) Code Block |
---|
title | Hibernate Query Example |
---|
| ...
Entity rentalTypeEntity = MetadataUtil.getEntityByTable("TRN_RENTALTYPES", getCRMSession().getRealPath(), getOrganisationID());
Entity rentalEntity = MetadataUtil.getEntityByTypeEntity(rentalTypeEntity.getId() , getCRMSession().getRealPath(), getOrganisationID());
... |
|