- final Optional<DataContainerChild<? extends PathArgument, ?>> maybePathIdLeaf =
- routeTarget.getChild(routePathIdNid());
- return PathIdUtil.createNidKey(routeQName(), routeKeyQName(),
- pathIdQName(), ByteArray.encodeBase64(buffer), maybePathIdLeaf);
- }
-
- @Override
- public RouteTargetConstrainRoute createRoute(
- final RouteTargetConstrainRoute route,
- final String routeKey,
- final long pathId,
- final Attributes attributes) {
- final RouteTargetConstrainRouteBuilder builder;
- if (route != null) {
- builder = new RouteTargetConstrainRouteBuilder(route);
- } else {
- builder = new RouteTargetConstrainRouteBuilder();
- }
- return builder.withKey(createRouteListKey(pathId, routeKey)).setAttributes(attributes).build();
- }
-
-
- @Override
- public RouteTargetConstrainRoutesCase emptyRoutesCase() {
- return EMPTY_CASE;
- }
-
-
- @Override
- public RouteTargetConstrainRoutes emptyRoutesContainer() {
- return EMPTY_CONTAINER;
- }
-
-
- @Override
- public RouteTargetConstrainRouteKey createRouteListKey(final long pathId, final String routeKey) {
- return new RouteTargetConstrainRouteKey(new PathId(pathId), routeKey);
+ return PathIdUtil.createNidKey(routeQName(), routeKeyTemplate(),
+ ByteArray.encodeBase64(buffer), routeTarget.findChildByArg(routePathIdNid()));