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
Modifier and TypeFieldDescriptionstatic final String
Includes all local properties and properties defined byInstanceName
(effectivelyINSTANCE_NAME
+LOCAL
).protected Class<?>
static final String
Includes only properties contained inInstanceName
.protected boolean
static final String
Includes all local properties.protected String
protected Map<String,
FetchPlanProperty> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsProperty
(String name) Check if a directly owned property with the given name exists in the fetchPlan.boolean
Class<?>
getName()
getProperty
(String name) Get directly owned fetchPlan property by name.int
hashCode()
boolean
isSupersetOf
(FetchPlan fetchPlan) boolean
If 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
fetchPlan
including 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.
-