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 User |
delete(EntityManager em,
org.eclipse.kapua.model.id.KapuaId scopeId,
org.eclipse.kapua.model.id.KapuaId userId)
Deletes the user by user identifier
|
static User |
find(EntityManager em,
org.eclipse.kapua.model.id.KapuaId scopeId,
org.eclipse.kapua.model.id.KapuaId userId)
|
static User |
findByExternalId(EntityManager em,
java.lang.String externalId)
Finds the
User by the UserAttributes external id |
static User |
findByName(EntityManager em,
java.lang.String name)
Finds the
User by the KapuaNamedEntityAttributes.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, find, findByField, findByField, handleKapuaQueryGroupPredicate, query, updatepublic static User create(EntityManager em, UserCreator userCreator)
Userem - userCreator - public static User update(EntityManager em, User user) throws org.eclipse.kapua.KapuaException
Userem - user - org.eclipse.kapua.KapuaExceptionpublic static User find(EntityManager em, org.eclipse.kapua.model.id.KapuaId scopeId, org.eclipse.kapua.model.id.KapuaId userId)
em - scopeId - userId - public static User findByName(EntityManager em, java.lang.String name)
User by the KapuaNamedEntityAttributes.NAMEem - name - public static User findByExternalId(EntityManager em, java.lang.String externalId)
User by the UserAttributes external idem - 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.KapuaExceptionpublic static User delete(EntityManager em, org.eclipse.kapua.model.id.KapuaId scopeId, org.eclipse.kapua.model.id.KapuaId userId) throws org.eclipse.kapua.KapuaEntityNotFoundException
Copyright © 2020 Eclipse.org. All rights reserved.