belongs to Maven artifact android.arch.persistence.room:runtime:1.1.0-beta2
Room
  public
  
  
  
  class
  Room
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.arch.persistence.room.Room | 
Utility class for Room.
Summary
| Constants | |
|---|---|
| String | MASTER_TABLE_NAMEThe master table where room keeps its metadata information. | 
| Public constructors | |
|---|---|
| 
      Room()
       | |
| Public methods | |
|---|---|
| 
        
        
        static
        
        <T extends RoomDatabase>
        Builder<T> | 
      databaseBuilder(Context context, Class<T> klass, String name)
      Creates a RoomDatabase.Builder for a persistent database. | 
| 
        
        
        static
        
        <T extends RoomDatabase>
        Builder<T> | 
      inMemoryDatabaseBuilder(Context context, Class<T> klass)
      Creates a RoomDatabase.Builder for an in memory database. | 
| Inherited methods | |
|---|---|
Constants
MASTER_TABLE_NAME
String MASTER_TABLE_NAME
The master table where room keeps its metadata information.
Constant Value: "room_master_table"
Public constructors
Public methods
databaseBuilder
Builder<T> databaseBuilder (Context context, Class<T> klass, String name)
Creates a RoomDatabase.Builder for a persistent database. Once a database is built, you should keep a reference to it and re-use it.
| Parameters | |
|---|---|
| context | Context: The context for the database. This is usually the Application context. | 
| klass | Class: The abstract class which is annotated withDatabaseand extendsRoomDatabase. | 
| name | String: The name of the database file. | 
| Returns | |
|---|---|
| Builder<T> | A RoomDatabaseBuilder<T>which you can use to create the database. | 
inMemoryDatabaseBuilder
Builder<T> inMemoryDatabaseBuilder (Context context, Class<T> klass)
Creates a RoomDatabase.Builder for an in memory database. Information stored in an in memory database disappears when the process is killed. Once a database is built, you should keep a reference to it and re-use it.
| Parameters | |
|---|---|
| context | Context: The context for the database. This is usually the Application context. | 
| klass | Class: The abstract class which is annotated withDatabaseand extendsRoomDatabase. | 
| Returns | |
|---|---|
| Builder<T> | A RoomDatabaseBuilder<T>which you can use to create the database. | 
- Annotations
- Classes
- Enums
- Exceptions
