Using StringSets Amazon DynamoDB Android

0 votes

I have an android application which uses Amazon DynamoDB. My table of users look like this:

@DynamoDBTable(tableName = Const.TEST_TABLE_NAME)
public static class User {
    private int userID;
    private String username;
    private String password;
    private String email;

    @DynamoDBHashKey(attributeName = "userID")
    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    @DynamoDBAttribute(attributeName = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @DynamoDBAttribute(attributeName = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @DynamoDBAttribute(attributeName = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

}

And everything works fine. My question is, if I have a string set in my table how can I insert it to my code? Using String[] doesn't work( I've tried adding:

    private String[] favourites;

    @DynamoDBAttribute(attributeName = "favourites")
    public String[] getFavourites() {
        return favourites;
    }

    public void setFavourites(String[] favourites) {
        this.favourites = favourites;
    }

) but it keeps throwing errors. Can somebody help me?

Feb 28 in Others by Edureka
• 9,700 points
19 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

No Network Security Config specified, using platform default - Android Log

 I had the same problem as which ...READ MORE

answered Feb 18 in Others by Aditya
• 7,280 points
307 views
0 votes
1 answer
0 votes
0 answers

"unable to locate adb" using Android Studio

While testing my app in a real ...READ MORE

May 1 in Others by Kichu
• 17,220 points
16 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP