public Long incrementValue(String key) {
synchronized(SystemCodes.class) {
SystemCodes code = loadBySystemCodesByKey(key);
if (code==null) code = new SystemCodes(key);
code.setSkipAudit(true); // no need to audit auto-generated keys
code.incrementNumberValue();
code.setCategory("KEYGEN");
this.saveEntityModel(code);
return code.getNumberValue();
}
}