Search in sources :

Example 1 with LabelTypeBhv

use of org.codelibs.fess.es.config.exbhv.LabelTypeBhv in project fess by codelibs.

the class WebConfig method getLabelTypeList.

public List<LabelType> getLabelTypeList() {
    if (labelTypeList == null) {
        synchronized (this) {
            if (labelTypeList == null) {
                final FessConfig fessConfig = ComponentUtil.getFessConfig();
                final WebConfigToLabelBhv webConfigToLabelBhv = ComponentUtil.getComponent(WebConfigToLabelBhv.class);
                final ListResultBean<WebConfigToLabel> mappingList = webConfigToLabelBhv.selectList(cb -> {
                    cb.query().setWebConfigId_Equal(getId());
                    cb.specify().columnLabelTypeId();
                    cb.paging(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger().intValue(), 1);
                });
                final List<String> labelIdList = new ArrayList<>();
                for (final WebConfigToLabel mapping : mappingList) {
                    labelIdList.add(mapping.getLabelTypeId());
                }
                final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class);
                labelTypeList = labelIdList.isEmpty() ? Collections.emptyList() : labelTypeBhv.selectList(cb -> {
                    cb.query().setId_InScope(labelIdList);
                    cb.query().addOrderBy_SortOrder_Asc();
                    cb.fetchFirst(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger());
                });
            }
        }
    }
    return labelTypeList;
}
Also used : WebConfigToLabelBhv(org.codelibs.fess.es.config.exbhv.WebConfigToLabelBhv) ArrayList(java.util.ArrayList) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) LabelTypeBhv(org.codelibs.fess.es.config.exbhv.LabelTypeBhv)

Example 2 with LabelTypeBhv

use of org.codelibs.fess.es.config.exbhv.LabelTypeBhv in project fess by codelibs.

the class ElevateWord method getLabelTypeList.

public List<LabelType> getLabelTypeList() {
    if (labelTypeList == null) {
        synchronized (this) {
            if (labelTypeList == null) {
                final FessConfig fessConfig = ComponentUtil.getFessConfig();
                final WebConfigToLabelBhv webConfigToLabelBhv = ComponentUtil.getComponent(WebConfigToLabelBhv.class);
                final ListResultBean<WebConfigToLabel> mappingList = webConfigToLabelBhv.selectList(cb -> {
                    cb.query().setWebConfigId_Equal(getId());
                    cb.specify().columnLabelTypeId();
                    cb.paging(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger().intValue(), 1);
                });
                final List<String> labelIdList = new ArrayList<>();
                for (final WebConfigToLabel mapping : mappingList) {
                    labelIdList.add(mapping.getLabelTypeId());
                }
                final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class);
                labelTypeList = labelIdList.isEmpty() ? Collections.emptyList() : labelTypeBhv.selectList(cb -> {
                    cb.query().setId_InScope(labelIdList);
                    cb.query().addOrderBy_SortOrder_Asc();
                    cb.fetchFirst(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger());
                });
            }
        }
    }
    return labelTypeList;
}
Also used : WebConfigToLabelBhv(org.codelibs.fess.es.config.exbhv.WebConfigToLabelBhv) ArrayList(java.util.ArrayList) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) LabelTypeBhv(org.codelibs.fess.es.config.exbhv.LabelTypeBhv)

Example 3 with LabelTypeBhv

use of org.codelibs.fess.es.config.exbhv.LabelTypeBhv in project fess by codelibs.

the class DataConfig method getLabelTypeList.

public List<LabelType> getLabelTypeList() {
    if (labelTypeList == null) {
        synchronized (this) {
            if (labelTypeList == null) {
                final FessConfig fessConfig = ComponentUtil.getFessConfig();
                final DataConfigToLabelBhv dataConfigToLabelBhv = ComponentUtil.getComponent(DataConfigToLabelBhv.class);
                final ListResultBean<DataConfigToLabel> mappingList = dataConfigToLabelBhv.selectList(cb -> {
                    cb.query().setDataConfigId_Equal(getId());
                    cb.specify().columnLabelTypeId();
                    cb.paging(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger().intValue(), 1);
                });
                final List<String> labelIdList = new ArrayList<>();
                for (final DataConfigToLabel mapping : mappingList) {
                    labelIdList.add(mapping.getLabelTypeId());
                }
                final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class);
                labelTypeList = labelIdList.isEmpty() ? Collections.emptyList() : labelTypeBhv.selectList(cb -> {
                    cb.query().setId_InScope(labelIdList);
                    cb.query().addOrderBy_SortOrder_Asc();
                    cb.fetchFirst(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger());
                });
            }
        }
    }
    return labelTypeList;
}
Also used : ArrayList(java.util.ArrayList) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) LabelTypeBhv(org.codelibs.fess.es.config.exbhv.LabelTypeBhv) DataConfigToLabelBhv(org.codelibs.fess.es.config.exbhv.DataConfigToLabelBhv)

Example 4 with LabelTypeBhv

use of org.codelibs.fess.es.config.exbhv.LabelTypeBhv in project fess by codelibs.

the class FileConfig method getLabelTypeList.

public List<LabelType> getLabelTypeList() {
    if (labelTypeList == null) {
        synchronized (this) {
            if (labelTypeList == null) {
                final FessConfig fessConfig = ComponentUtil.getFessConfig();
                final FileConfigToLabelBhv fileConfigToLabelBhv = ComponentUtil.getComponent(FileConfigToLabelBhv.class);
                final ListResultBean<FileConfigToLabel> mappingList = fileConfigToLabelBhv.selectList(cb -> {
                    cb.query().setFileConfigId_Equal(getId());
                    cb.specify().columnLabelTypeId();
                    cb.paging(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger().intValue(), 1);
                });
                final List<String> labelIdList = new ArrayList<>();
                for (final FileConfigToLabel mapping : mappingList) {
                    labelIdList.add(mapping.getLabelTypeId());
                }
                final LabelTypeBhv labelTypeBhv = ComponentUtil.getComponent(LabelTypeBhv.class);
                labelTypeList = labelIdList.isEmpty() ? Collections.emptyList() : labelTypeBhv.selectList(cb -> {
                    cb.query().setId_InScope(labelIdList);
                    cb.query().addOrderBy_SortOrder_Asc();
                    cb.fetchFirst(fessConfig.getPageLabeltypeMaxFetchSizeAsInteger());
                });
            }
        }
    }
    return labelTypeList;
}
Also used : ArrayList(java.util.ArrayList) FileConfigToLabelBhv(org.codelibs.fess.es.config.exbhv.FileConfigToLabelBhv) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) LabelTypeBhv(org.codelibs.fess.es.config.exbhv.LabelTypeBhv)

Aggregations

ArrayList (java.util.ArrayList)4 LabelTypeBhv (org.codelibs.fess.es.config.exbhv.LabelTypeBhv)4 FessConfig (org.codelibs.fess.mylasta.direction.FessConfig)4 WebConfigToLabelBhv (org.codelibs.fess.es.config.exbhv.WebConfigToLabelBhv)2 DataConfigToLabelBhv (org.codelibs.fess.es.config.exbhv.DataConfigToLabelBhv)1 FileConfigToLabelBhv (org.codelibs.fess.es.config.exbhv.FileConfigToLabelBhv)1