io.vertx.tp.optic.dict.CompanyDict Maven / Gradle / Ivy
package io.vertx.tp.optic.dict;
import cn.vertxup.erp.domain.tables.daos.ECompanyDao;
import io.vertx.core.Future;
import io.vertx.core.MultiMap;
import io.vertx.core.json.JsonArray;
import io.vertx.tp.optic.component.DictionaryPlugin;
import io.vertx.up.commune.exchange.DiSource;
import io.vertx.up.eon.KName;
import io.vertx.up.unity.Ux;
import io.vertx.up.util.Ut;
/*
* Dict for `resource.companys` here
*/
public class CompanyDict implements DictionaryPlugin {
@Override
public Future fetchAsync(final DiSource source,
final MultiMap paramMap) {
final String sigma = paramMap.get(KName.SIGMA);
if (Ut.notNil(sigma)) {
return Ux.Jooq.on(ECompanyDao.class)
.fetchAsync(KName.SIGMA, sigma)
.compose(Ux::futureA);
} else {
return Ux.future(new JsonArray());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy