@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
@Override public BeanIdentifier deprefix(String id) { String deprefixed = id.substring(getPrefix().length() + getDelimiter().length()); if (index == null) { return new StringBeanIdentifier(deprefixed); } if (deprefixed.startsWith(FALLBACK_FLAG)) { return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length())); } try { return index.getIdentifier(Integer.parseInt(deprefixed)); } catch (NumberFormatException e) { throw new IllegalStateException("Unable to deprefix id:" + id, e); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }
private void loadContextual() { if (serializable != null) { cached = serializable; } else if (identifierIndex != null) { cached = getContextualStore().<C, I> getContextual(getBeanIdentifierIndex().getIdentifier(identifierIndex)); } else if (identifier != null) { cached = getContextualStore().<C, I> getContextual(identifier); } if (cached == null) { throw new IllegalStateException("Error restoring serialized contextual with id " + identifier); } }