*/
protected void resolveMappings() {
if (!resolved) {
resolved = true;
IManagedTypeProvider provider = getManagedTypeProvider();
IManagedType managedType = null;
for (int index = 0, count = itemsSize(); index < count; index++) {
// Identification variable
if (index == 0) {
StateObject stateObject = getIdentificationVariable();
// The identification variable is not set, which means the traversal can happen
if (stateObject != null) {
managedType = getDeclaration().findManagedType(stateObject);
}
mappings.add(null);
}
// Resolve the path expression after the identification variable
else if (managedType != null) {
String path = getItem(index);
// Cache the mapping
IMapping mapping = managedType.getMappingNamed(path);
mappings.add(mapping);
// Continue by retrieving the managed type
if (mapping != null) {
managedType = provider.getManagedType(mapping.getType());
}
else {
managedType = null;
}
}