Package step.core.access
Class UserAccessorImpl
java.lang.Object
step.core.accessors.AbstractAccessor<User>
step.core.access.UserAccessorImpl
- All Implemented Interfaces:
UserAccessor
,step.core.accessors.Accessor<User>
- Direct Known Subclasses:
InMemoryUserAccessor
public class UserAccessorImpl
extends step.core.accessors.AbstractAccessor<User>
implements UserAccessor
-
Field Summary
Fields inherited from class step.core.accessors.AbstractAccessor
collectionDriver, newVersionThresholdMs, versionedCollectionDriver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
encryptPwd
(String pwd) getByUsername
(String username) void
Register hooks to be executed after removing a User, thrown exception don't stop the execution of next hooksvoid
Register hooks to be executed before saving a User, any thrown exception will abort saving the uservoid
void
remove
(org.bson.types.ObjectId id) void
Methods inherited from class step.core.accessors.AbstractAccessor
createOrUpdateCompoundIndex, createOrUpdateIndex, enableVersioning, findByAttributes, findByAttributes, findByCriteria, findManyByAttributes, findManyByAttributes, findManyByCriteria, get, get, getAll, getCollectionDriver, getHistory, getRange, isVersioningEnabled, restoreVersion, stream, streamLazy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface step.core.accessors.Accessor
enableVersioning, findByAttributes, findByAttributes, findByCriteria, findManyByAttributes, findManyByAttributes, findManyByCriteria, get, get, getAll, getCollectionDriver, getHistory, getRange, isVersioningEnabled, restoreVersion, stream, streamLazy
-
Constructor Details
-
UserAccessorImpl
-
-
Method Details
-
remove
- Specified by:
remove
in interfaceUserAccessor
-
remove
public void remove(org.bson.types.ObjectId id) -
save
-
save
-
getAllUsers
- Specified by:
getAllUsers
in interfaceUserAccessor
-
getByUsername
- Specified by:
getByUsername
in interfaceUserAccessor
-
registerOnSaveHook
Description copied from interface:UserAccessor
Register hooks to be executed before saving a User, any thrown exception will abort saving the user- Specified by:
registerOnSaveHook
in interfaceUserAccessor
- Parameters:
f
- the function to execute
-
registerOnRemoveHook
Description copied from interface:UserAccessor
Register hooks to be executed after removing a User, thrown exception don't stop the execution of next hooks- Specified by:
registerOnRemoveHook
in interfaceUserAccessor
- Parameters:
f
- the function to execute
-
encryptPwd
-