This should be the right one
IMendixIdentifier Core.createMendixIdentifier(longĀ guid)
I've used the CommunityCommons XPath functions for this, see the Java code below:
import communitycommons.XPath;
private IMendixObject retrieveObject(String objectType, String objectGUID) throws CoreException {
final String attributeID = "id";
final String operator = "=";
IContext systemContext = Core.createSystemContext();
//Create XPath
XPath<IMendixObject> xpath = XPath.create(systemContext, objectType);
xpath.compare(attributeID, operator, objectGUID);
xpath.first();
//Execute XPath
List<IMendixObject> results = Core.retrieveXPathQuery(getContext(), xpath.getXPath());
if (results.size() == 0) {
logger.error("Object with GUID " + objectGUID + " was not found.");
return null;
}
return results.get(0);
}