study abstract class query and all the subclass