use of org.jaffa.components.voucher.IVoucherGenerator in project jaffa-framework by jaffa-projects.
the class SavedQuery method generateKey.
/**
* Generate the technical-key, if required.
*/
public void generateKey() throws ApplicationExceptions, FrameworkException {
if (getQueryId() == null) {
try {
IVoucherGenerator vg = VoucherGeneratorFactory.instance();
vg.setUow(getUOW());
vg.setDomainClassName(getClass().getName());
vg.setFieldName(SavedQueryMeta.QUERY_ID);
vg.setLabelToken(SavedQueryMeta.META_QUERY_ID.getLabelToken());
setQueryId(vg.generate());
} catch (ValidationException e) {
throw new ApplicationExceptions(e);
}
}
}
Aggregations