Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 房间查询已成功查找数据,但未返回结果集_Java_Android_Room - Fatal编程技术网

Java 房间查询已成功查找数据,但未返回结果集

Java 房间查询已成功查找数据,但未返回结果集,java,android,room,Java,Android,Room,我使用Android Room查询数据库并返回结果集。查询是成功的,因为我可以看到记录来自DAO_impl处理,但该记录没有实际返回。这是结果的调试屏幕截图 ``` 以下是执行的主视图模型代码 public ContactTable identifyContactByDeviceMobileNumber(String deviceMobileNumber) { executor.execute(() ->{contactTableRepository.findConta

我使用Android Room查询数据库并返回结果集。查询是成功的,因为我可以看到记录来自DAO_impl处理,但该记录没有实际返回。这是结果的调试屏幕截图 ```

以下是执行的主视图模型代码

  public ContactTable identifyContactByDeviceMobileNumber(String deviceMobileNumber) {
        executor.execute(() ->{contactTableRepository.findContactByDeviceMobileNumber(deviceMobileNumber);});
        return foundContactByDeviceMobileNumber;
    };
这是查询的联系人表存储库

 public ContactTable findContactByDeviceMobileNumber(String mobileDeviceNumber) {
        contactTableDao.findContactByDeviceMobileNumber(mobileDeviceNumber);
        return foundContactByDeviceMobileNumber;
 }
   
 @Query("SELECT * FROM contact_table WHERE contactMobileNumber = :contactMobileNumber")
    public abstract ContactTable findContactByDeviceMobileNumber(String contactMobileNumber); 
这是查询的DAO条目

 public ContactTable findContactByDeviceMobileNumber(String mobileDeviceNumber) {
        contactTableDao.findContactByDeviceMobileNumber(mobileDeviceNumber);
        return foundContactByDeviceMobileNumber;
 }
   
 @Query("SELECT * FROM contact_table WHERE contactMobileNumber = :contactMobileNumber")
    public abstract ContactTable findContactByDeviceMobileNumber(String contactMobileNumber);