public class UserDAO extends ServiceDAO
| Constructor and Description |
|---|
UserDAO() |
| Modifier and Type | Method and Description |
|---|---|
static long |
count(EntityManager em,
org.eclipse.kapua.model.query.KapuaQuery<User> userPermissionQuery)
Returns the user count matching the provided query
|
static User |
create(EntityManager em,
UserCreator userCreator)
Creates and return new User
|
static void |
delete(EntityManager em,
org.eclipse.kapua.model.id.KapuaId userId)
Deletes the user by user identifier
|
static User |
find(EntityManager em,
org.eclipse.kapua.model.id.KapuaId userId)
Finds the user by user identifier
|
static User |
findByExternalId(EntityManager em,
String externalId)
Finds the user by external id
|
static User |
findByName(EntityManager em,
String name)
Finds the user by name
|
static UserListResult |
query(EntityManager em,
org.eclipse.kapua.model.query.KapuaQuery<User> userPermissionQuery)
Returns the user list matching the provided query
|
static User |
update(EntityManager em,
User user)
Updates the provided user
|
count, delete, extractAttribute, findByField, handleKapuaQueryGroupPredicate, handleKapuaQueryPredicates, query, updatepublic static User create(EntityManager em, UserCreator userCreator) throws org.eclipse.kapua.KapuaException
em - userCreator - org.eclipse.kapua.KapuaExceptionpublic static User update(EntityManager em, User user) throws org.eclipse.kapua.KapuaException
em - user - org.eclipse.kapua.KapuaExceptionpublic static void delete(EntityManager em, org.eclipse.kapua.model.id.KapuaId userId) throws org.eclipse.kapua.KapuaEntityNotFoundException
em - userId - org.eclipse.kapua.KapuaEntityNotFoundException - If User is not found.public static User find(EntityManager em, org.eclipse.kapua.model.id.KapuaId userId)
em - userId - public static User findByName(EntityManager em, String name)
em - name - public static User findByExternalId(EntityManager em, String externalId)
em - the entity manager to useexternalId - id the external ID so search fornullpublic static UserListResult query(EntityManager em, org.eclipse.kapua.model.query.KapuaQuery<User> userPermissionQuery) throws org.eclipse.kapua.KapuaException
em - userPermissionQuery - org.eclipse.kapua.KapuaExceptionpublic static long count(EntityManager em, org.eclipse.kapua.model.query.KapuaQuery<User> userPermissionQuery) throws org.eclipse.kapua.KapuaException
em - userPermissionQuery - org.eclipse.kapua.KapuaExceptionCopyright © 2017 Eclipse.org. All rights reserved.