/** * @deprecated (since 5.3) No replacement - added just to continue some backwards compatibility * in supporting the newly deprecated methods expecting a qualified (prefix +) region name */ @Deprecated default String unqualifyRegionName(String name) { if ( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() == null ) { return name; } if ( !name.startsWith( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() ) ) { throw new IllegalArgumentException( String.format( Locale.ROOT, "Legacy methods for accessing cache information expect a qualified (prefix) region name - " + "but passed name [%s] was not qualified by the configured prefix [%s]", name, getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() ) ); } return name.substring( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix().length() + 1 ); }
/** * @deprecated (since 5.3) No replacement - added just to continue some backwards compatibility * in supporting the newly deprecated methods expecting a qualified (prefix +) region name */ @Deprecated default String unqualifyRegionName(String name) { if ( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() == null ) { return name; } if ( !name.startsWith( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() ) ) { throw new IllegalArgumentException( String.format( Locale.ROOT, "Legacy methods for accessing cache information expect a qualified (prefix) region name - " + "but passed name [%s] was not qualified by the configured prefix [%s]", name, getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix() ) ); } return name.substring( getSessionFactory().getSessionFactoryOptions().getCacheRegionPrefix().length() + 1 ); }