Package io.jmix.core
Class FetchPlan
java.lang.Object
io.jmix.core.FetchPlan
- All Implemented Interfaces:
Serializable
Class to declare a graph of objects that must be retrieved from the database.
A fetchPlan can be constructed in Java code or defined in XML and deployed
to the FetchPlanRepository for recurring usage.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIncludes all local properties and properties defined byInstanceName(effectivelyINSTANCE_NAME+LOCAL).protected Class<?>static final StringIncludes only properties contained inInstanceName.protected booleanstatic final StringIncludes all local properties.protected Stringprotected Map<String,FetchPlanProperty> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProperty(String name) Check if a directly owned property with the given name exists in the fetchPlan.booleanClass<?>getName()getProperty(String name) Get directly owned fetchPlan property by name.inthashCode()booleanisSupersetOf(FetchPlan fetchPlan) booleanIf true, the fetchPlan affects loading of local attributes.toString()
-
Field Details
-
LOCAL
Includes all local properties.- See Also:
-
INSTANCE_NAME
Includes only properties contained inInstanceName.- See Also:
-
BASE
Includes all local properties and properties defined byInstanceName(effectivelyINSTANCE_NAME+LOCAL).- See Also:
-
entityClass
-
name
-
properties
-
loadPartialEntities
protected boolean loadPartialEntities
-
-
Constructor Details
-
FetchPlan
-
-
Method Details
-
getEntityClass
- Returns:
- entity class this fetchPlan belongs to
-
getName
- Returns:
- fetchPlan name, unique within an entity
-
getProperties
- Returns:
- collection of properties
-
equals
-
isSupersetOf
- Returns:
- whether this fetch plan contains all attributes of
fetchPlanincluding nested plans attributes
-
hashCode
public int hashCode() -
toString
-
getProperty
Get directly owned fetchPlan property by name.- Parameters:
name- property name- Returns:
- fetchPlan property instance or null if it is not found
-
containsProperty
Check if a directly owned property with the given name exists in the fetchPlan.- Parameters:
name- property name- Returns:
- true if such property found
-
loadPartialEntities
public boolean loadPartialEntities()If true, the fetchPlan affects loading of local attributes. If false, only reference attributes are affected and local are always loaded.
-