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 {
11 protected PlayerRecord expandInternal(PlayerRecord entity)
12 {
13 if (entity!=null && entity.getPlayer() != null)
14 return DataStore.getInstance().getPlayerRecord(entity.getPlayer());
15 else
16 return entity;
17 }
18 }