Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package logic;
- import java.nio.file.Files;
- import java.nio.file.Paths;
- import javax.persistence.EntityManager;
- import entity.JouhousyoriEntity;
- public class Jouhousyori implements Logic{
- private EntityManager em;
- private String path;
- public static void main(String args[]) throws Exception{
- }
- @Override
- public void execute() throws Exception{
- JouhousyoriEntity entity = new JouhousyoriEntity();
- String xml = new String(Files.readAllBytes(Paths.get(getPath())));
- entity .setText(xml);
- em.persist(entity);
- }
- //Setter,Getterは省略
- }
Add Comment
Please, Sign In to add comment