Search in sources :

Example 1 with UserProfileRow

use of com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow in project atlasdb by palantir.

the class ProfileStore method getPhotoStreamId.

private Long getPhotoStreamId(UUID userId) {
    UserProfileTable table = tables.getUserProfileTable(tx);
    Map<UserProfileRow, Long> result = table.getPhotoStreamIds(ImmutableSet.of(UserProfileRow.of(userId)));
    if (result.isEmpty()) {
        return null;
    } else {
        return Iterables.getOnlyElement(result.values());
    }
}
Also used : UserProfileTable(com.palantir.example.profile.schema.generated.UserProfileTable) UserProfileRow(com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow)

Example 2 with UserProfileRow

use of com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow in project atlasdb by palantir.

the class ProfileStore method getUserData.

public UserProfile getUserData(UUID userId) {
    UserProfileTable table = tables.getUserProfileTable(tx);
    Map<UserProfileRow, UserProfile> result = table.getMetadatas(ImmutableSet.of(UserProfileRow.of(userId)));
    if (result.isEmpty()) {
        return null;
    } else {
        return Iterables.getOnlyElement(result.values());
    }
}
Also used : UserProfileTable(com.palantir.example.profile.schema.generated.UserProfileTable) UserProfile(com.palantir.example.profile.protos.generated.ProfilePersistence.UserProfile) UserProfileRow(com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow)

Aggregations

UserProfileTable (com.palantir.example.profile.schema.generated.UserProfileTable)2 UserProfileRow (com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow)2 UserProfile (com.palantir.example.profile.protos.generated.ProfilePersistence.UserProfile)1