@Test(expected = ODataRuntimeException.class) public void doubleSystemQueryOptions() { new UriInfoImpl() .setSystemQueryOption(new FormatOptionImpl()) .setSystemQueryOption(new FormatOptionImpl()); }
public UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption) { final SystemQueryOptionKind systemQueryOptionKind = systemOption.getKind(); if (systemQueryOptions.containsKey(systemQueryOptionKind)) { throw new ODataRuntimeException("Double System Query Option: " + systemOption.getName()); } switch (systemQueryOptionKind) { case EXPAND: case FILTER: case FORMAT: case ID: case COUNT: case ORDERBY: case SEARCH: case SELECT: case SKIP: case SKIPTOKEN: case DELTATOKEN: case TOP: case LEVELS: case APPLY: systemQueryOptions.put(systemQueryOptionKind, systemOption); break; default: throw new ODataRuntimeException("Unsupported System Query Option: " + systemOption.getName()); } return this; }
UriInfoImpl implements UriInfo { public UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption) { final SystemQueryOptionKind systemQueryOptionKind = systemOption.getKind(); if (systemQueryOptions.containsKey(systemQueryOptionKind)) { throw new ODataRuntimeException("Double System Query Option: " + systemOption.getName()); } switch (systemQueryOptionKind) { case EXPAND: case FILTER: case FORMAT: case ID: case COUNT: case ORDERBY: case SEARCH: case SELECT: case SKIP: case SKIPTOKEN: case DELTATOKEN: case TOP: case LEVELS: case APPLY: systemQueryOptions.put(systemQueryOptionKind, systemOption); break; default: throw new ODataRuntimeException("Unsupported System Query Option: " + systemOption.getName()); } return this; } }
UriInfoImpl implements UriInfo { public UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption) { final SystemQueryOptionKind systemQueryOptionKind = systemOption.getKind(); if (systemQueryOptions.containsKey(systemQueryOptionKind)) { throw new ODataRuntimeException("Double System Query Option: " + systemOption.getName()); } switch (systemQueryOptionKind) { case EXPAND: case FILTER: case FORMAT: case ID: case COUNT: case ORDERBY: case SEARCH: case SELECT: case SKIP: case SKIPTOKEN: case DELTATOKEN: case TOP: case LEVELS: case APPLY: systemQueryOptions.put(systemQueryOptionKind, systemOption); break; default: throw new ODataRuntimeException("Unsupported System Query Option: " + systemOption.getName()); } return this; }  }
UriInfoImpl implements UriInfo { public UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption) { final SystemQueryOptionKind systemQueryOptionKind = systemOption.getKind(); if (systemQueryOptions.containsKey(systemQueryOptionKind)) { throw new ODataRuntimeException("Double System Query Option: " + systemOption.getName()); } switch (systemQueryOptionKind) { case EXPAND: case FILTER: case FORMAT: case ID: case COUNT: case ORDERBY: case SEARCH: case SELECT: case SKIP: case SKIPTOKEN: case DELTATOKEN: case TOP: case LEVELS: case APPLY: systemQueryOptions.put(systemQueryOptionKind, systemOption); break; default: throw new ODataRuntimeException("Unsupported System Query Option: " + systemOption.getName()); } return this; }  UriInfoImpl setKind(final UriInfoKind kind); @Override UriInfoKind getKind(); @Override UriInfoAll asUriInfoAll(); @Override UriInfoBatch asUriInfoBatch(); @Override UriInfoCrossjoin asUriInfoCrossjoin(); @Override UriInfoEntityId asUriInfoEntityId(); @Override UriInfoService asUriInfoService(); @Override UriInfoMetadata asUriInfoMetadata(); @Override UriInfoResource asUriInfoResource(); UriInfoImpl addEntitySetName(final String entitySet); @Override List<String> getEntitySetNames(); UriInfoImpl setEntityTypeCast(final EdmEntityType type); @Override EdmEntityType getEntityTypeCast(); UriInfoImpl addResourcePart(final UriResource uriPathInfo); UriResource getLastResourcePart(); @Override List<UriResource> getUriResourceParts(); UriInfoImpl setQueryOption(final QueryOption option); UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption); @Override ExpandOption getExpandOption(); @Override FilterOption getFilterOption(); @Override FormatOption getFormatOption(); @Override IdOption getIdOption(); @Override CountOption getCountOption(); @Override OrderByOption getOrderByOption(); @Override SearchOption getSearchOption(); @Override SelectOption getSelectOption(); @Override SkipOption getSkipOption(); @Override SkipTokenOption getSkipTokenOption(); @Override TopOption getTopOption(); @Override ApplyOption getApplyOption(); @Override List<SystemQueryOption> getSystemQueryOptions(); UriInfoImpl addAlias(final AliasQueryOption alias); @Override String getValueForAlias(final String alias); Map<String, AliasQueryOption> getAliasMap(); @Override List<AliasQueryOption> getAliases(); UriInfoImpl addCustomQueryOption(final CustomQueryOption option); @Override List<CustomQueryOption> getCustomQueryOptions(); UriInfoImpl setFragment(final String fragment); @Override String getFragment(); @Override DeltaTokenOption getDeltaTokenOption(); }
UriInfoImpl implements UriInfo { public UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption) { final SystemQueryOptionKind systemQueryOptionKind = systemOption.getKind(); if (systemQueryOptions.containsKey(systemQueryOptionKind)) { throw new ODataRuntimeException("Double System Query Option: " + systemOption.getName()); } switch (systemQueryOptionKind) { case EXPAND: case FILTER: case FORMAT: case ID: case COUNT: case ORDERBY: case SEARCH: case SELECT: case SKIP: case SKIPTOKEN: case DELTATOKEN: case TOP: case LEVELS: case APPLY: systemQueryOptions.put(systemQueryOptionKind, systemOption); break; default: throw new ODataRuntimeException("Unsupported System Query Option: " + systemOption.getName()); } return this; }  UriInfoImpl setKind(final UriInfoKind kind); @Override UriInfoKind getKind(); @Override UriInfoAll asUriInfoAll(); @Override UriInfoBatch asUriInfoBatch(); @Override UriInfoCrossjoin asUriInfoCrossjoin(); @Override UriInfoEntityId asUriInfoEntityId(); @Override UriInfoService asUriInfoService(); @Override UriInfoMetadata asUriInfoMetadata(); @Override UriInfoResource asUriInfoResource(); UriInfoImpl addEntitySetName(final String entitySet); @Override List<String> getEntitySetNames(); UriInfoImpl setEntityTypeCast(final EdmEntityType type); @Override EdmEntityType getEntityTypeCast(); UriInfoImpl addResourcePart(final UriResource uriPathInfo); UriResource getLastResourcePart(); @Override List<UriResource> getUriResourceParts(); UriInfoImpl setQueryOption(final QueryOption option); UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption); @Override ExpandOption getExpandOption(); @Override FilterOption getFilterOption(); @Override FormatOption getFormatOption(); @Override IdOption getIdOption(); @Override CountOption getCountOption(); @Override OrderByOption getOrderByOption(); @Override SearchOption getSearchOption(); @Override SelectOption getSelectOption(); @Override SkipOption getSkipOption(); @Override SkipTokenOption getSkipTokenOption(); @Override TopOption getTopOption(); @Override ApplyOption getApplyOption(); @Override List<SystemQueryOption> getSystemQueryOptions(); UriInfoImpl addAlias(final AliasQueryOption alias); @Override String getValueForAlias(final String alias); Map<String, AliasQueryOption> getAliasMap(); @Override List<AliasQueryOption> getAliases(); UriInfoImpl addCustomQueryOption(final CustomQueryOption option); @Override List<CustomQueryOption> getCustomQueryOptions(); UriInfoImpl setFragment(final String fragment); @Override String getFragment(); @Override DeltaTokenOption getDeltaTokenOption();  }