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