The SDO DataFactory is used to create the different types of QueryObject.
GraphQuery aGraphQuery =
(GraphQuery) DataFactory.INSTANCE.create
(TypeConstants.SR_URI, TypeConstants.TYPE_GRAPHQUERY);
PropertyQuery aPropertyQuery =
(PropertyQuery)DataFactory.INSTANCE.create
(TypeConstants.SR_URI,TypeConstants.TYPE_PROPERTYQUERY);