Implementation of object query