@@ -0,0 +1,445 @@
+package net.ihypo.work;%0A%0Apublic class WorkFactory %7B%0A%09static private int id = -1;%0A%09%0A%09static private int  getNextId()%7B%0A%09%09if(id == -1)%7B%0A%09%09%09//%E8%B0%83%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93%E9%87%8C%E7%9A%84%E6%9C%80%E6%96%B0ID%0A%09%09%09id = 1;%0A%09%09%7D%0A%09%09%0A%09%09return id;%0A%09%7D%0A%09%0A%09static public Work createWork(String title,int userId,String data)%7B%0A%09%09Work work =  new Work(getNextId(), title, userId, data);%0A%09%09id++;%0A%09%09%0A%09%09//%E5%86%99%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93%0A%09%09insertWorkList(work);%0A%09%09%0A%09%09return work;%0A%09%7D%0A%09%0A%09static private void insertWorkList(Work work)%7B%0A%09%09//%E5%86%99%E5%85%A5%E6%95%B0%E6%8D%AE%E5%BA%93%0A%09%7D%0A%7D%0A

create WorkFactory to create Work