class ItemMapper {

    public PrimaryKey primaryKey(Item item) {
        long campaignItemId = item.getLong(CAMPAIGN_TABLE_HASH_KEY);
        long period = item.getLong(PERIOD_TABLE_RANGE_KEY);
        return new PrimaryKey(CAMPAIGN_TABLE_HASH_KEY, campaignItemId, PERIOD_TABLE_RANGE_KEY, period);
    }

}