From the course: Building Android Apps with AWS
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create DynamoDB classes
- [Lecturer] So now that we've imported those model objects that we downloaded from the mobile hub, the next thing that we're going to do is create a couple of new classes that will help us communicate with the database. So I'm here in my AWSProvider class and I'm going to add a couple of new properties. First one I'm gonna call dbClient, and that's gonna be an instance of AmazonDynamoDBClient. And what that object will do is handle the network communication between our project and DynamoDB. Then I'm going to add another property, I'm gonna call that dbMapper, which is an instance of DynamoDBMapper, and that object will handle the mapping between our database and our ListNamesDO and ListItemsDO objects. So now I'll write an accessor method that'll return our AmazonDynamoDBClient, and initialize it if necessary, and I'll just call that function getAmazonDynamoDBClient. So if our client is null, I'll create one, and to create the client we need what's called a credentialsProvider…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Introduction to DynamoDB2m 29s
-
(Locked)
Create tables in DynamoDB5m 6s
-
(Locked)
Import tables into list maker app5m 53s
-
(Locked)
Create DynamoDB classes5m 8s
-
Perform database queries5m 16s
-
(Locked)
Perform database updates6m 15s
-
(Locked)
Testing DynamoDB2m 32s
-
(Locked)
View data on DynamoDB console4m 20s
-
(Locked)
-
-