MidPoint repository is in fact a sophisticated object-oriented database. The primary identifier for all objects is OID. However much more sophisticated query mechanism is required for midPoint to be useful. MidPoint provides such mechanism as part of all its primary interfaces. All the interfaces are using query language that essentially represents the same data structure (Java classes). However the form of the language may be different depending on which specific flavor of interface is being used.
See Query API (legacy)
See XML Object Query