jerqi commented on code in PR #7330: URL: https://github.com/apache/gravitino/pull/7330#discussion_r2126509863
########## core/src/main/java/org/apache/gravitino/cache/BaseEntityCache.java: ########## @@ -153,6 +154,48 @@ protected static <E extends Entity & HasIdentifier> E convertEntity(Entity entit return (E) entity; } + /** + * Loads an entity from the database. + * + * @param ident The name identifier of the entity to load. + * @param type The type of the entity to load. + * @return The loaded entity. + * @param <E> The type of the loaded entity. + * @throws IOException if an error occurs while loading the entity. + */ + protected <E extends Entity & HasIdentifier> E loadEntity( + NameIdentifier ident, Entity.EntityType type) throws IOException { + Preconditions.checkArgument( + entityStore != null, + "EntityStore must not be null if you want to get entities from " + "db"); Review Comment: `must not` -> `cannot` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org