当前位置: 首页>>代码示例>>Java>>正文


Java TypeConverters类代码示例

本文整理汇总了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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:5,代码来源:ArtworkDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:5,代码来源:ArtworkDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:ArtworkDao.java

示例4: getArtworkCursorForSourceBlocking

import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM artwork WHERE sourceComponentName=:sourceComponentName")
abstract Cursor getArtworkCursorForSourceBlocking(ComponentName sourceComponentName);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:ArtworkDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:5,代码来源:ArtworkDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:ArtworkDao.java

示例7: getSourceComponentNamesBlocking

import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT component_name FROM sources")
List<ComponentName> getSourceComponentNamesBlocking();
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:SourceDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:SourceDao.java

示例9: getSourceByComponentNameBlocking

import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(ComponentNameTypeConverter.class)
@Query("SELECT * FROM sources WHERE component_name = :componentName")
Source getSourceByComponentNameBlocking(ComponentName componentName);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:SourceDao.java

示例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);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:SourceDao.java

示例11: getMetadataForUri

import android.arch.persistence.room.TypeConverters; //导入依赖的package包/类
@TypeConverters(UriTypeConverter.class)
@Query("SELECT * FROM metadata_cache WHERE uri = :uri")
Metadata getMetadataForUri(Uri uri);
 
开发者ID:romannurik,项目名称:muzei,代码行数:4,代码来源:MetadataDao.java


注:本文中的android.arch.persistence.room.TypeConverters类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。