Skip to content

Commit

Permalink
#2313 Document IRetrievalModel
Browse files Browse the repository at this point in the history
  • Loading branch information
homedirectory committed Sep 11, 2024
1 parent 394a5e9 commit aaaab07
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* Represents a retrieval model.
* At a high level, this abstraction is very similar to that of fetch models, the difference being that the API of fetch
* models is designed to be used by application developers, while this abstraction is used by the EQL-SQL transpiler and
* the query execution engine.
*
* @param <T> the entity type that can be retrieved with a retrieval model instance
* @see ua.com.fielden.platform.entity.query.fluent.fetch
*/
public interface IRetrievalModel<T extends AbstractEntity<?>> {

Class<T> getEntityType();

/**
* Indicates whether entity instances retrieved with this fetch model are expected to be instrumented.
*/
boolean isInstrumented();

Map<String, EntityRetrievalModel<? extends AbstractEntity<?>>> getRetrievalModels();
Expand All @@ -20,7 +33,16 @@ public interface IRetrievalModel<T extends AbstractEntity<?>> {

boolean containsProxy(final String propName);

/**
* Indicates whether this fetch model is at the root of the entity graph. In other words, if this method returns
* {@code true}, this fetch model is not a part of some other fetch model (i.e., there is no such fetch model whose
* {@link #getRetrievalModels()} includes this fetch model.)
*/
boolean topLevel();

/**
* Indicates whether this fetch model includes only such properties that are calculated and "for totals".
*/
boolean containsOnlyTotals();
}

}

0 comments on commit aaaab07

Please sign in to comment.