Skip to content
Snippets Groups Projects
Commit e1a36d21 authored by Adrian Damian's avatar Adrian Damian
Browse files

Added support for numeric ID

parent a39e4b22
No related branches found
No related tags found
No related merge requests found
...@@ -998,14 +998,13 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO ...@@ -998,14 +998,13 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
/** /**
* Method to return a randomly generated user numeric ID. The default * Method to return a randomly generated user numeric ID. The default
* implementation returns a value between 10000 and Integer.MAX_VALUE. * implementation returns a value between 10000 and Integer.MAX_VALUE.
* Services that support a different mechanism for generating numeric
* IDs overide this method.
* @return * @return
*/ */
protected int genNextNumericId() protected int genNextNumericId()
{ {
Random rand = new Random(); Random rand = new Random();
// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
return rand.nextInt(Integer.MAX_VALUE - 10000) + 10000; return rand.nextInt(Integer.MAX_VALUE - 10000) + 10000;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment