marked class as final.
print stack trace on id generation if debug is true.
This commit is contained in:
parent
0652286e82
commit
43cba33077
1 changed files with 7 additions and 5 deletions
|
@ -14,7 +14,7 @@ import java.util.Vector;
|
|||
* in JavaScript which doesn't know about them (except for the exception message).
|
||||
*/
|
||||
|
||||
public class WrappedNodeManager {
|
||||
public final class WrappedNodeManager {
|
||||
|
||||
NodeManager nmgr;
|
||||
|
||||
|
@ -125,12 +125,14 @@ import java.util.Vector;
|
|||
if (map == null || !map.isRelational () || "[hop]".equalsIgnoreCase (map.getIDgen()))
|
||||
return nmgr.idgen.newID ();
|
||||
// or if we query max key value
|
||||
else if (map.getIDgen() == null || "[max]".equalsIgnoreCase (map.getIDgen()))
|
||||
return nmgr.generateMaxID (map);
|
||||
else if (map.getIDgen() == null || "[max]".equalsIgnoreCase (map.getIDgen()))
|
||||
return nmgr.generateMaxID (map);
|
||||
else
|
||||
return nmgr.generateID (map);
|
||||
// otherwise, we use an oracle sequence
|
||||
return nmgr.generateID (map);
|
||||
// otherwise, we use an oracle sequence
|
||||
} catch (Exception x) {
|
||||
if (nmgr.app.debug ())
|
||||
x.printStackTrace();
|
||||
throw new RuntimeException (x.toString ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue