Guest User

Untitled

a guest
Aug 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. package logic;
  2.  
  3. import java.nio.file.Files;
  4. import java.nio.file.Paths;
  5.  
  6. import javax.persistence.EntityManager;
  7.  
  8. import entity.JouhousyoriEntity;
  9.  
  10. public class Jouhousyori implements Logic{
  11.  
  12. private EntityManager em;
  13. private String path;
  14.  
  15. public static void main(String args[]) throws Exception{
  16. }
  17.  
  18. @Override
  19. public void execute() throws Exception{
  20. JouhousyoriEntity entity = new JouhousyoriEntity();
  21. String xml = new String(Files.readAllBytes(Paths.get(getPath())));
  22. entity .setText(xml);
  23. em.persist(entity);
  24. }
  25. //Setter,Getterは省略
  26. }
Add Comment
Please, Sign In to add comment