All pastes #83227 Raw Edit

Something

public java v1 · immutable
·published 2006-07-09 14:39 UTC
rendered paste body
@Embeddablepublic class URIEntity {    private URI fURI;    /**   * Provided for deserialization.   */  protected URIEntity() {    // As per javadoc  }    public URIEntity(URI uri) {    fURI = uri;  }    @Basic  public String getUriAsString() {    return fURI.toString();  }    public void setUriAsString(String uriAsString) {    try {      fURI = new URI(uriAsString);    } catch (URISyntaxException e) {      // Should never happen      throw new IllegalArgumentException("uriAsString is not a uri");    }  }    @Transient  public URI getURI() {    return fURI;  }    public void setURI(URI uri) {    fURI = uri;  }