Java 类android.arch.persistence.room.TypeConverters 实例源码

项目:muzei    文件:ArtworkDao.java   
@TypeConverters({ComponentNameTypeConverter.class})
@Query("SELECT COUNT(distinct imageUri) FROM artwork " +
        "WHERE sourceComponentName = :sourceComponentName")
public abstract int getArtworkCountForSourceBlocking(ComponentName sourceComponentName);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters({ComponentNameTypeConverter.class})
@Query("SELECT * FROM artwork WHERE sourceComponentName = :sourceComponentName " +
        "ORDER BY date_added DESC")
public abstract List<Artwork> getArtworkForSourceBlocking(ComponentName sourceComponentName);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM artwork WHERE imageUri=:imageUri ORDER BY date_added DESC")
public abstract List<Artwork> getArtworkByImageUri(Uri imageUri);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM artwork WHERE sourceComponentName=:sourceComponentName")
abstract Cursor getArtworkCursorForSourceBlocking(ComponentName sourceComponentName);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters(ComponentNameTypeConverter.class)
@Query("DELETE FROM artwork WHERE sourceComponentName = :sourceComponentName " +
        "AND _id NOT IN (:ids)")
abstract void deleteNonMatchingInternal(ComponentName sourceComponentName, List<Long> ids);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters(UriTypeConverter.class)
@Query("DELETE FROM artwork WHERE imageUri=:imageUri")
public abstract void deleteByImageUriInternal(Uri imageUri);
项目:muzei    文件:ArtworkDao.java   
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM artwork WHERE imageUri=:imageUri AND _id IN (:ids)")
abstract List<Artwork> findMatchingByImageUri(Uri imageUri, List<Long> ids);
项目:muzei    文件:SourceDao.java   
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT component_name FROM sources")
List<ComponentName> getSourceComponentNamesBlocking();
项目:muzei    文件:SourceDao.java   
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT component_name FROM sources WHERE component_name LIKE :packageName || '%'")
List<ComponentName> getSourcesComponentNamesByPackageNameBlocking(String packageName);
项目:muzei    文件:SourceDao.java   
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM sources WHERE component_name = :componentName")
Source getSourceByComponentNameBlocking(ComponentName componentName);
项目:muzei    文件:SourceDao.java   
@TypeConverters({ComponentNameTypeConverter.class})
@Query("DELETE FROM sources WHERE component_name IN (:componentNames)")
void deleteAll(ComponentName[] componentNames);
项目:muzei    文件:MetadataDao.java   
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM metadata_cache WHERE uri = :uri")
Metadata getMetadataForUri(Uri uri);