/** * Add an EntityMetaInfo into the factory. This does not add it to the database. If there is * existing EntityMetaInfo cached with the same ObjectName/EntityName, it will be replaced by this * metaInfo. * * @param metaInfo The EntityMetaInfo to add to the factory. */ public void addEntityMetaInfo(EntityMetaInfo metaInfo) { _entityMap.put(metaInfo.getObjectName(), metaInfo); Log.debug( Log.DB, "[MetaInfoFactory.addEntityMetaInfo] " + "Add mapping for EntityName " + metaInfo.getEntityName() + " to ObjectName " + metaInfo.getObjectName()); _entityNameMap.put(metaInfo.getEntityName(), metaInfo.getObjectName()); }
/** * Find the meta info for a field in an entity. * * @param entityName Name of the entity class * @param fieldObjName Declared name of the field in the entity. * @return The field meta info found, or <B>null</B> if not found. */ public FieldMetaInfo getMetaInfoFor(String entityName, String fieldObjName) { FieldMetaInfo fmi = null; EntityMetaInfo emi = getMetaInfoFor(entityName); if (emi != null) fmi = emi.findFieldMetaInfo(fieldObjName); return fmi; }