@Override public void handle(StateContext state, RootCollectionSubCollectionContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordState(record)); }
@Override public void handle(StateContext state, RootCollectionSubCollectionContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordState(record)); }
@Override public void handle(StateContext state, SubCollectionSubCollectionContext ctx) { String id = ctx.entity().id().getText(); String subCollection = ctx.entity().term().getText(); try { state.setState(new RecordState(resource.getRelation(subCollection, id))); } catch (InvalidAttributeException e) { throw new InvalidCollectionException(subCollection); } }
@Override public void handle(StateContext state, SubCollectionSubCollectionContext ctx) { String id = ctx.entity().id().getText(); String subCollection = ctx.entity().term().getText(); try { state.setState(new RecordState(resource.getRelation(subCollection, id))); } catch (InvalidAttributeException e) { throw new InvalidCollectionException(subCollection); } }