1 package de.dlr.shepard.neo4Core.dao; 2 3 import de.dlr.shepard.neo4Core.entities.User; 4 5 public class UserDAO extends GenericDAO<User> { 6 7 public User find(String username) { 8 User entity = session.load(getEntityType(), username, DEPTH_ENTITY); 9 return entity; 10 } 11 12 public boolean delete(String username) { 13 User entity = session.load(getEntityType(), username); 14 if (entity != null) { 15 session.delete(entity); 16 return true; 17 } 18 return false; 19 } 20 21 @Override 22 public Class<User> getEntityType() { 23 return User.class; 24 } 25 }