diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-11-23 15:40:44 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-11-23 15:57:23 +0100 |
| commit | cd9d62986882b298948dff96f8bc4d18a086f90d (patch) | |
| tree | 11c95261c2ed6e2e5ea735ba9e76fd33f403626a /src/jpa/JPATest.java | |
| parent | ea3b3f9bf0d803bd98d997b3dd1a6ac845736069 (diff) | |
| download | JCatalog-cd9d62986882b298948dff96f8bc4d18a086f90d.tar.gz JCatalog-cd9d62986882b298948dff96f8bc4d18a086f90d.zip | |
Format files and organize imports
Diffstat (limited to 'src/jpa/JPATest.java')
| -rw-r--r-- | src/jpa/JPATest.java | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/jpa/JPATest.java b/src/jpa/JPATest.java index 5a4749e..1407c6c 100644 --- a/src/jpa/JPATest.java +++ b/src/jpa/JPATest.java @@ -19,25 +19,25 @@ public class JPATest tx.begin(); try { -// Product product = manager.find(Product.class, "7"); -// Category newCategory = manager.find(Category.class, 4); -// product.addCategory(newCategory); -// manager.persist(product); -// Collection<Category> categories = product.getCategoryCollection(); -// for (Category category : categories) -// { -// System.out.println(category.getName()); -// } + // Product product = manager.find(Product.class, "7"); + // Category newCategory = manager.find(Category.class, 4); + // product.addCategory(newCategory); + // manager.persist(product); + // Collection<Category> categories = product.getCategoryCollection(); + // for (Category category : categories) + // { + // System.out.println(category.getName()); + // } Product product = new Product(); product.setDescription("Noch ein Testprodukt"); product.setName("Produkt"); manager.persist(product); -// User user = new User(); -// user.setUsername("bestertester2"); -// System.out.println(DigestUtils.md5("masterkey")); -// user.setPassword(DigestUtils.md5("masterkey")); -// manager.persist(user); - + // User user = new User(); + // user.setUsername("bestertester2"); + // System.out.println(DigestUtils.md5("masterkey")); + // user.setPassword(DigestUtils.md5("masterkey")); + // manager.persist(user); + tx.commit(); } catch (Exception ex) @@ -45,18 +45,18 @@ public class JPATest ex.printStackTrace(System.err); tx.rollback(); } - -// CategoryManager cm = new CategoryManager(); -// Collection<Category> categories = cm.getCategories(); -// for (Category category : categories) -// { -// System.out.println(category.getName()); -// Set<Product> products = category.getProductCollection(); -// for (Product product : products) -// { -// System.out.println("\t" + product.getName()); -// } -// -// } + + // CategoryManager cm = new CategoryManager(); + // Collection<Category> categories = cm.getCategories(); + // for (Category category : categories) + // { + // System.out.println(category.getName()); + // Set<Product> products = category.getProductCollection(); + // for (Product product : products) + // { + // System.out.println("\t" + product.getName()); + // } + // + // } } } |
