Search in sources :

Example 1 with UserBirthdaysIdxTable

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

the class ProfileStore method getUsersWithBirthday.

public Set<UUID> getUsersWithBirthday(long birthEpochDays) {
    UserProfileTable table = tables.getUserProfileTable(tx);
    UserBirthdaysIdxTable idx = UserBirthdaysIdxTable.of(table);
    List<UserBirthdaysIdxColumnValue> columns = idx.getRowColumns(UserBirthdaysIdxRow.of(birthEpochDays));
    return IterableView.of(columns).transform(UserBirthdaysIdxColumnValue.getColumnNameFun()).transform(UserBirthdaysIdxColumn.getIdFun()).immutableSetCopy();
}
Also used : UserProfileTable(com.palantir.example.profile.schema.generated.UserProfileTable) UserBirthdaysIdxColumnValue(com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable.UserBirthdaysIdxColumnValue) UserBirthdaysIdxTable(com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable)

Aggregations

UserProfileTable (com.palantir.example.profile.schema.generated.UserProfileTable)1 UserBirthdaysIdxTable (com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable)1 UserBirthdaysIdxColumnValue (com.palantir.example.profile.schema.generated.UserProfileTable.UserBirthdaysIdxTable.UserBirthdaysIdxColumnValue)1