1 package com.atlassian.plugins.rest.sample.expansion.entity;
2
3 import com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander;
4 import com.atlassian.plugins.rest.sample.expansion.resource.DataStore;
5
6
7
8
9 public class PlayerRecordExpander extends AbstractRecursiveEntityExpander<PlayerRecord> {
10 protected PlayerRecord expandInternal(PlayerRecord entity) {
11 if (entity != null && entity.getPlayer() != null)
12 return DataStore.getInstance().getPlayerRecord(entity.getPlayer());
13 else
14 return entity;
15 }
16 }