Skip to content

Most visited

Recently visited

navigation

Dao

public abstract @interface Dao
implements Annotation

android.arch.persistence.room.Dao


Marks the class as a Data Access Object.

Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.

The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database.

It is recommended to have multiple Dao classes in your codebase depending on the tables they touch.

See also:

Summary

Inherited methods

From interface java.lang.annotation.Annotation
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.