public List executeSelectQuery ( Class clazz , List < String > relationalField , CassandraDataHandler dataHandler , boolean isNative , String cqlQuery ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Executing cql query {}." , cqlQuery ) ; } List entities = new ArrayList < Object > ( ) ; EntityMetadata entityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , clazz ) ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( entityMetadata . getPersistenceUnit ( ) ) ; EntityType entityType = metaModel . entity ( entityMetadata . getEntityClazz ( ) ) ; List < AbstractManagedType > subManagedType = ( ( AbstractManagedType ) entityType ) . getSubManagedType ( ) ; if ( subManagedType . isEmpty ( ) ) { entities . addAll ( cqlClient . executeQuery ( clazz , relationalField , dataHandler , true , isNative , cqlQuery ) ) ; } else { for ( AbstractManagedType subEntity : subManagedType ) { EntityMetadata subEntityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , subEntity . getJavaType ( ) ) ; entities . addAll ( cqlClient . executeQuery ( subEntityMetadata . getEntityClazz ( ) , relationalField , dataHandler , true , isNative , cqlQuery ) ) ; } } return entities ; }
Executes Select CQL Query .