Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Persistence chosePersistence(String persistence) {
- try {
- String persistenceName = new String(Files.readAllBytes(Paths.get("persistence.properties")));
- if (persistence.equalsIgnoreCase("XMLPersistence".trim())) {
- return new XMLPersistence();
- }
- throw new IllegalArgumentException("No such persistence");
- } catch (IOException e) {
- System.out.println("Error reading type of persistence from persistence.properties ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement