Class PrincipalTasks.PrincipalConverter
java.lang.Object
ch.tocco.nice2.userbase.impl.auth.PrincipalTasks.PrincipalConverter
- All Implemented Interfaces:
OptionalTask<Entity,
,Principal> PersistTask<Entity,
Principal>
- Enclosing class:
PrincipalTasks
public static class PrincipalTasks.PrincipalConverter
extends Object
implements OptionalTask<Entity,Principal>
Converts a principal entity into a
Principal
object. The roles are *not*
loaded. But the relations to the type, status and interface language are resolved, as well as to the
user entity.
The unique_ids of the status, type and interface language are set as attributes into the
principal. Additionally, the primary key of the principal and the related user entity are set into the
principal. The primary key of the principal is set as an object array as retrieved from PrimaryKey#getValues()
whereas the primary key of the related user is stored as the long value. If the principal has no related user,
the value -1L
is used.
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.OptionalTask
run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
PrincipalConverter
public PrincipalConverter(org.slf4j.Logger log)
-
-
Method Details
-
doRun
- Specified by:
doRun
in interfaceOptionalTask<Entity,
Principal> - Throws:
Exception
-