本文整理汇总了Java中android.arch.persistence.room.TypeConverters类的典型用法代码示例。如果您正苦于以下问题:Java TypeConverters类的具体用法?Java TypeConverters怎么用?Java TypeConverters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TypeConverters类属于android.arch.persistence.room包,在下文中一共展示了TypeConverters类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getArtworkCountForSourceBlocking
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters({ComponentNameTypeConverter.class})
@Query("SELECT COUNT(distinct imageUri) FROM artwork " +
"WHERE sourceComponentName = :sourceComponentName")
public abstract int getArtworkCountForSourceBlocking(ComponentName sourceComponentName);
示例2: getArtworkForSourceBlocking
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters({ComponentNameTypeConverter.class})
@Query("SELECT * FROM artwork WHERE sourceComponentName = :sourceComponentName " +
"ORDER BY date_added DESC")
public abstract List<Artwork> getArtworkForSourceBlocking(ComponentName sourceComponentName);
示例3: getArtworkByImageUri
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM artwork WHERE imageUri=:imageUri ORDER BY date_added DESC")
public abstract List<Artwork> getArtworkByImageUri(Uri imageUri);
示例4: getArtworkCursorForSourceBlocking
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM artwork WHERE sourceComponentName=:sourceComponentName")
abstract Cursor getArtworkCursorForSourceBlocking(ComponentName sourceComponentName);
示例5: IN
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("DELETE FROM artwork WHERE sourceComponentName = :sourceComponentName " +
"AND _id NOT IN (:ids)")
abstract void deleteNonMatchingInternal(ComponentName sourceComponentName, List<Long> ids);
示例6: deleteByImageUriInternal
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(UriTypeConverter.class)
@Query("DELETE FROM artwork WHERE imageUri=:imageUri")
public abstract void deleteByImageUriInternal(Uri imageUri);
示例7: getSourceComponentNamesBlocking
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT component_name FROM sources")
List<ComponentName> getSourceComponentNamesBlocking();
示例8:
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT component_name FROM sources WHERE component_name LIKE :packageName || '%'")
List<ComponentName> getSourcesComponentNamesByPackageNameBlocking(String packageName);
示例9: getSourceByComponentNameBlocking
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM sources WHERE component_name = :componentName")
Source getSourceByComponentNameBlocking(ComponentName componentName);
示例10: deleteAll
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters({ComponentNameTypeConverter.class})
@Query("DELETE FROM sources WHERE component_name IN (:componentNames)")
void deleteAll(ComponentName[] componentNames);
示例11: getMetadataForUri
import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM metadata_cache WHERE uri = :uri")
Metadata getMetadataForUri(Uri uri);