<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>j5ik2o</author_name>
  <author_url>https://blog.hatena.ne.jp/j5ik2o/</author_url>
  <blog_title>かとじゅんの技術日誌</blog_title>
  <blog_url>https://blog.j5ik2o.me/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>DDD</anon>
  </categories>
  <description>DDDで設計を始めると不変条件を維持するために、エンティティなどの可変オブジェクトの複製を行うことがよくあります。 Javaの場合は、Cloneableインターフェイスを実装して、実装型に応じた複製インスタンスを返すcloneメソッドを作る。以下のような感じ。 public class Employee implements Cloneable { private String name; // setter, getter 省略 @Override public Employee clone() { try{ return (Employee)super.clone(); } catch (…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.j5ik2o.me%2Fentry%2F20110302%2F1299064820&quot; title=&quot; 生成だけではなく複製もファクトリに任せたほうがよい - かとじゅんの技術日誌&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://ecx.images-amazon.com/images/I/51E1m-weAXL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-03-02 20:20:20</published>
  <title> 生成だけではなく複製もファクトリに任せたほうがよい</title>
  <type>rich</type>
  <url>https://blog.j5ik2o.me/entry/20110302/1299064820</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
