Search in sources :

Example 6 with UserProfileTable

use of com.palantir.example.profile.schema.generated.UserProfileTable 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)6 UserProfile (com.palantir.example.profile.protos.generated.ProfilePersistence.UserProfile)2 UserPhotosStreamStore (com.palantir.example.profile.schema.generated.UserPhotosStreamStore)2 UserProfileRow (com.palantir.example.profile.schema.generated.UserProfileTable.UserProfileRow)2 UserBirthdaysIdxTable (com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable)1 UserBirthdaysIdxColumnValue (com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable.UserBirthdaysIdxColumnValue)1 UUID (java.util.UUID)1