• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ItemDAO类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.easyrec.store.dao.core.ItemDAO的典型用法代码示例。如果您正苦于以下问题:Java ItemDAO类的具体用法?Java ItemDAO怎么用?Java ItemDAO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ItemDAO类属于org.easyrec.store.dao.core包,在下文中一共展示了ItemDAO类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: TenantServiceImpl

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public TenantServiceImpl(TenantDAO tenantDAO, TenantConfigVO tenantConfig, ActionTypeDAO actionTypeDAO,
                         AggregateTypeDAO aggregateTypeDAO, AssocTypeDAO assocTypeDAO, ItemTypeDAO itemTypeDAO,
                         SourceTypeDAO sourceTypeDAO, ViewTypeDAO viewTypeDAO,
                         AuthenticationDAO authenticationDAO, ItemAssocDAO itemAssocDAO,
                         ActionDAO actionDAO, ItemDAO itemDAO) {
    this.tenantDAO = tenantDAO;
    this.defaultTenantConfig = tenantConfig;
    this.actionTypeDAO = actionTypeDAO;
    this.aggregateTypeDAO = aggregateTypeDAO;
    this.assocTypeDAO = assocTypeDAO;
    this.itemTypeDAO = itemTypeDAO;
    this.sourceTypeDAO = sourceTypeDAO;
    this.viewTypeDAO = viewTypeDAO;
    this.authenticationDAO = authenticationDAO;
    this.itemAssocDAO  = itemAssocDAO;
    this.actionDAO = actionDAO;
    this.itemDAO = itemDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:19,代码来源:TenantServiceImpl.java


示例2: EasyRec

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public EasyRec(OperatorDAO operatorDAO, RemoteTenantDAO remoteTenantDAO,
               ShopRecommenderService shopRecommenderService, TenantService tenantService,
               TypeMappingService typeMappingService, ItemDAO itemDAO, RemoteAssocService remoteAssocService,
               IDMappingDAO idMappingDAO,
               //added by FK on 2012-12-18 for enabling profile data in recommendations
               ProfileService profileService,
               ClusterService clusterService,
               String dateFormatString) {
    this.operatorDAO = operatorDAO;
    this.remoteTenantDAO = remoteTenantDAO;
    this.shopRecommenderService = shopRecommenderService;
    this.tenantService = tenantService;
    this.typeMappingService = typeMappingService;
    this.itemDAO = itemDAO;
    this.remoteAssocService = remoteAssocService;
    this.dateFormat = dateFormatString;
    this.profileService = profileService;
    this.idMappingDAO = idMappingDAO;
    this.clusterService = clusterService;
}
 
开发者ID:customertimes,项目名称:easyrec-PoC,代码行数:21,代码来源:EasyRec.java


示例3: AggregatorServiceImpl

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public AggregatorServiceImpl(TypeMappingService typeMappingService, TenantService tenantService, AggregatorActionDAO aggregatorActionDAO, JSONProfileServiceImpl jsonProfileService, ItemDAO itemDAO, IDMappingDAO idMappingDAO, ItemTypeDAO itemTypeDAO, AggregatorLogEntryDAO logEntryDAO, ActionTypeDAO actionTypeDAO) {
    this.typeMappingService = typeMappingService;
    this.tenantService = tenantService;
    this.aggregatorActionDAO = aggregatorActionDAO;
    this.jsonProfileService = jsonProfileService;
    this.itemDAO = itemDAO;   
    this.idMappingDAO = idMappingDAO;
    this.itemTypeDAO = itemTypeDAO;
    this.logEntryDAO = logEntryDAO;
    this.actionTypeDAO = actionTypeDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:12,代码来源:AggregatorServiceImpl.java


示例4: getNonUserItems

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
@Override
public List<Item> getNonUserItems(SolrSimilarityConfigurationInt configuration) {
    
    Object[] args = {configuration.getTenantId(), SolrSimilarityGenerator.ITEMTYPE_USER, ClusterService.ITEMTYPE_CLUSTER};
    int[] argTypes = {Types.INTEGER, Types.VARCHAR, Types.VARCHAR};

    StringBuilder query  = new StringBuilder();
    query.append(" SELECT ID, TENANTID, ITEMID, ITEMTYPE, DESCRIPTION, PROFILEDATA, ACTIVE, CREATIONDATE ")
            .append(" FROM ").append(ItemDAO.DEFAULT_TABLE_NAME).append(" WHERE ").append(" TENANTID = ? ")
            .append(" AND ITEMTYPE NOT IN (?,?) AND ACTIVE=TRUE");

    return getJdbcTemplate().query(query.toString(), args, argTypes, itemRowMapper);

}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:15,代码来源:SolrItemDAOImpl.java


示例5: getUserItems

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
@Override
public List<Item> getUserItems(SolrSimilarityConfigurationInt configuration) {
    
    Object[] args = {configuration.getTenantId(), SolrSimilarityGenerator.ITEMTYPE_USER};
    int[] argTypes = {Types.INTEGER, Types.VARCHAR};

    StringBuilder query  = new StringBuilder();
    query.append(" SELECT ID, TENANTID, ITEMID, ITEMTYPE, DESCRIPTION, PROFILEDATA, ACTIVE, CREATIONDATE ")
            .append(" FROM ").append(ItemDAO.DEFAULT_TABLE_NAME).append(" WHERE ").append(" TENANTID = ? ")
            .append(" AND ITEMTYPE=? AND ACTIVE=TRUE");

    return getJdbcTemplate().query(query.toString(), args, argTypes, itemRowMapper);

}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:15,代码来源:SolrItemDAOImpl.java


示例6: ClusterImportController

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public ClusterImportController(ClusterService clusterService, IDMappingDAO idMappingDAO, ItemDAO itemDAO, ItemTypeDAO itemTypeDAO,ViewInitializationService viewInitializationService) {
    this.clusterService = clusterService;
    this.idMappingDAO = idMappingDAO;
    this.itemDAO = itemDAO;
    this.itemTypeDAO = itemTypeDAO;
    this.viewInitializationService = viewInitializationService;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:8,代码来源:ClusterImportController.java


示例7: ItemSearchController

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public ItemSearchController(ItemDAO itemDAO, String dateFormat, RemoteTenantDAO remoteTenantDAO,
                            ItemTypeDAO itemTypeDAO, AssocTypeDAO assocTypeDAO) {
    this.itemDAO = itemDAO;
    this.dateFormat = dateFormat;
    this.remoteTenantDAO = remoteTenantDAO;
    this.itemTypeDAO = itemTypeDAO;
    this.assocTypeDAO = assocTypeDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:9,代码来源:ItemSearchController.java


示例8: tableSortParameterToDatabaseColumnName

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
private ItemDAO.SortColumn tableSortParameterToDatabaseColumnName(int columnIndex) {
    switch (columnIndex) {
        case 0:
            return ItemDAO.SortColumn.ITEM_ID;
        case 1:
            return ItemDAO.SortColumn.DESCRIPTION;
        case 2:
            return ItemDAO.SortColumn.ITEM_TYPE;
        default:
            return ItemDAO.SortColumn.NONE;
    }
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:13,代码来源:ItemSearchController.java


示例9: ClusterManagerController

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public ClusterManagerController(ClusterService clusterService, RemoteTenantDAO remoteTenantDAO, ItemDAO itemDAO,
                                ItemTypeDAO itemTypeDAO, IDMappingDAO idMappingDAO,IDMappingService idMappingService, ViewInitializationService viewInitializationService) {
    this.clusterService = clusterService;
    this.remoteTenantDAO = remoteTenantDAO;
    this.itemDAO = itemDAO;
    this.itemTypeDAO = itemTypeDAO;
    this.idMappingDAO = idMappingDAO;
    this.idMappingService = idMappingService;
    this.viewInitializationService = viewInitializationService;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:11,代码来源:ClusterManagerController.java


示例10: IDMappingServiceImpl

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public IDMappingServiceImpl(IDMappingDAO idMappingDAO, ItemDAO itemDAO, TenantService tenantService,
                            AssocTypeDAO assocTypeDAO, ItemTypeDAO itemTypeDAO) {
    this.idMappingDAO = idMappingDAO;
    this.itemDAO = itemDAO;
    this.tenantService = tenantService;
    this.assocTypeDAO = assocTypeDAO;
    this.itemTypeDAO = itemTypeDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:9,代码来源:IDMappingServiceImpl.java


示例11: JSONProfileWebService

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public JSONProfileWebService(JSONProfileServiceImpl profileService, OperatorDAO operatorDAO, ObjectMapper objectMapper, TypeMappingService typeMappingService, ItemDAO itemDAO) {
    this.profileService = profileService;
    this.operatorDAO = operatorDAO;
    this.objectMapper = objectMapper;
    this.typeMappingService = typeMappingService;
    this.itemDAO = itemDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:8,代码来源:JSONProfileWebService.java


示例12: EasyRec

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public EasyRec(OperatorDAO operatorDAO, RemoteTenantDAO remoteTenantDAO,
               ShopRecommenderService shopRecommenderService, TenantService tenantService,
               TypeMappingService typeMappingService, ItemDAO itemDAO, RemoteAssocService remoteAssocService,
               IDMappingDAO idMappingDAO,
               //added by FK on 2012-12-18 for enabling profile data in recommendations
               ProfileService profileService,
               ClusterService clusterService,
               EasyRecSettings easyrecSettings,
               PluginRegistry pluginRegistry,
               GeneratorContainer generatorContainer,
               String dateFormatString,
               ObjectMapper objectMapper,
               LogEntryDAO logEntryDAO,
               BackTrackingDAO backTrackingDAO) {
    this.operatorDAO = operatorDAO;
    this.remoteTenantDAO = remoteTenantDAO;
    this.shopRecommenderService = shopRecommenderService;
    this.tenantService = tenantService;
    this.typeMappingService = typeMappingService;
    this.itemDAO = itemDAO;
    this.remoteAssocService = remoteAssocService;
    this.dateFormat = dateFormatString;
    this.profileService = profileService;
    this.idMappingDAO = idMappingDAO;
    this.clusterService = clusterService;
    this.easyrecSettings = easyrecSettings;
    this.pluginRegistry = pluginRegistry;
    this.generatorContainer = generatorContainer;
    this.objectMapper = objectMapper;
    this.logEntryDAO = logEntryDAO;
    this.backTrackingDAO = backTrackingDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:33,代码来源:EasyRec.java


示例13: setItemDAO

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public void setItemDAO(ItemDAO itemDAO) {
    this.itemDAO = itemDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:4,代码来源:MahoutBooleanGenerator.java


示例14: getItemDAO

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
public ItemDAO getItemDAO() {
    return itemDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:4,代码来源:AggregatorServiceImpl.java


示例15: testSearchItems

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
@Test
@DataSet("/dbunit/core/dao/itemDaoTest.xml")
public void testSearchItems() {
    itemDAO.emptyCache();
    currentItemId = 2;
    Item item1;
    Item item2;
    item1 = createDummyItem(0);
    increaseItemId();
    item2 = createDummyItem(1);
    addItem(item1);
    addItem(item2);


    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());
    calendar.add(Calendar.DAY_OF_MONTH, -1);
    Date startDate = calendar.getTime();
    calendar.add(Calendar.DAY_OF_MONTH, 2);
    Date endDate = calendar.getTime();

    TimeConstraintVO timeConstraint = new TimeConstraintVO(startDate, endDate);
    ArrayList<String> itemTypeList = new ArrayList<String>();
    itemTypeList.add(item1.getItemType());
    List<Item> itemList = itemDAO.searchItems(TENANT_ID, item1.getItemId(),
            itemTypeList, item1.getDescription(), item1.getUrl(), item1.getImageUrl(), true,
            timeConstraint, false, "", ItemDAO.SortColumn.NONE, false, 0, 100);

    Assert.assertEquals(1, itemList.size());
    Assert.assertTrue(isItemInList(item1, itemList));
    Assert.assertFalse(isItemInList(item2, itemList));

    int resultCount = itemDAO.searchItemsTotalCount(TENANT_ID, item1.getItemId(),
            itemTypeList, item1.getDescription(), item1.getUrl(), item1.getImageUrl(), true,
            timeConstraint, false, "");
    Assert.assertEquals(1, resultCount);

    itemList = itemDAO.searchItems(TENANT_ID, item2.getItemId(),
            itemTypeList, item2.getDescription(), item2.getUrl(), item2.getImageUrl(), true,
            timeConstraint, false, "", ItemDAO.SortColumn.NONE, false, 0, 100);

    Assert.assertEquals(1, itemList.size());
    Assert.assertTrue(isItemInList(item2, itemList));
    Assert.assertFalse(isItemInList(item1, itemList));


    resultCount = itemDAO.searchItemsTotalCount(TENANT_ID, item2.getItemId(),
            itemTypeList, item2.getDescription(), item2.getUrl(), item2.getImageUrl(), true,
            timeConstraint, false, "");
    Assert.assertEquals(1, resultCount);

    // with hasRules = true only item1 should be returned

    itemList = itemDAO.searchItems(TENANT_ID, item1.getItemId(),
            itemTypeList, item1.getDescription(), item1.getUrl(), item1.getImageUrl(), true,
            timeConstraint, true, "", ItemDAO.SortColumn.NONE, false, 0, 100);

    Assert.assertEquals(1, itemList.size());
    Assert.assertTrue(isItemInList(item1, itemList));
    Assert.assertFalse(isItemInList(item2, itemList));

    resultCount = itemDAO.searchItemsTotalCount(TENANT_ID, item1.getItemId(),
            itemTypeList, item1.getDescription(), item1.getUrl(), item1.getImageUrl(), true,
            timeConstraint, true, "");
    Assert.assertEquals(1, resultCount);

    itemList = itemDAO.searchItems(TENANT_ID, item2.getItemId(),
            itemTypeList, item2.getDescription(), item2.getUrl(), item2.getImageUrl(), true,
            timeConstraint, true, "", ItemDAO.SortColumn.NONE, false, 0, 100);
    Assert.assertEquals(0, itemList.size());
    resultCount = itemDAO.searchItemsTotalCount(TENANT_ID, item2.getItemId(),
            itemTypeList, item2.getDescription(), item2.getUrl(), item2.getImageUrl(), true,
            timeConstraint, true, "");
    Assert.assertEquals(0, resultCount);
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:76,代码来源:ItemDAOTest.java


示例16: generateSearchResult

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
private ModelAndView generateSearchResult(HttpServletRequest request, ModelAndView mav) throws ParseException {
    RemoteTenant tenant = initializeView(request, mav);

    // set to empty values so in case an error is returned the displayTag:table does not throw an exception
    mav.addObject("itemSearchResult", null);
    mav.addObject("totalCount", 0);
    mav.addObject("pageSize", PAGE_SIZE);

    if (tenant == null) {
        logger.warn("no tenantId supplied");
        return mav;
    }

    String itemId = ServletUtils.getSafeParameter(request, "itemId", "");
    String description = ServletUtils.getSafeParameter(request, "description", "");
    String creationDateFrom = ServletUtils.getSafeParameter(request, "fromCreationDate", "");
    String creationDateTo = ServletUtils.getSafeParameter(request, "toCreationDate", "");
    String[] itemTypes = request.getParameterValues("itemTypes");
    boolean hasRules = ServletUtils.getSafeParameter(request, "hasRules", null) != null;
    String activatedString = ServletUtils.getSafeParameter(request, "isActivated", "null");
    String rulesOfType = ServletUtils.getSafeParameter(request, "rulesOfType", "");

    Boolean isActivated;
    if (activatedString.equalsIgnoreCase("null"))
        isActivated = null;
    else isActivated = activatedString.equalsIgnoreCase("true");

    mav.addObject("itemId", itemId);
    mav.addObject("description", description);
    mav.addObject("fromCreationDate", creationDateFrom);
    mav.addObject("toCreationDate", creationDateTo);
    mav.addObject("itemTypes", itemTypes);
    mav.addObject("hasRules", hasRules);
    mav.addObject("rulesOfType", rulesOfType);
    mav.addObject("isActivated", isActivated);

    ItemDAO.SortColumn sortColumn =
            tableSortParameterToDatabaseColumnName(ServletUtils.getSafeParameter(request, "d-16544-s", 0));
    Integer page = ServletUtils.getSafeParameter(request, "d-16544-p", 1);
    boolean sortDescending = ServletUtils.getSafeParameter(request, "d-16544-o", "0").equalsIgnoreCase("1");

    Date from = null;
    Date to = null;
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(this.dateFormat);

    if (!Strings.isNullOrEmpty(creationDateFrom))
        from = simpleDateFormat.parse(creationDateFrom);

    if (!Strings.isNullOrEmpty(creationDateTo))
        to = simpleDateFormat.parse(creationDateTo);

    if (Strings.isNullOrEmpty(itemId))
        itemId = null;

    if (Strings.isNullOrEmpty(description))
        description = null;

    TimeConstraintVO creationDateConstraint = from != null || to != null ? new TimeConstraintVO(from, to) : null;
    Iterable<String> itemTypesIterable = itemTypes != null ? Arrays.asList(itemTypes) : null;

    List<Item> items =
            itemDAO.searchItems(tenant.getId(), itemId, itemTypesIterable, description, null, null, isActivated,
                    creationDateConstraint, hasRules, rulesOfType, sortColumn, sortDescending,
                    PAGE_SIZE * (page - 1), PAGE_SIZE);

    int totalCount =
            itemDAO.searchItemsTotalCount(tenant.getId(), itemId, itemTypesIterable, description, null, null,
                    isActivated, creationDateConstraint, hasRules, rulesOfType);

    mav.addObject("itemSearchResult", items);
    mav.addObject("totalCount", totalCount);

    return mav;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:75,代码来源:ItemSearchController.java


示例17: getItemDAO

import org.easyrec.store.dao.core.ItemDAO; //导入依赖的package包/类
@SuppressWarnings({"UnusedDeclaration"})
public ItemDAO getItemDAO() {
    return itemDAO;
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:5,代码来源:ShopRecommenderServiceImpl.java



注:本文中的org.easyrec.store.dao.core.ItemDAO类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UserChannelSubscriptionBo类代码示例发布时间:2022-05-16
下一篇:
Java DoubleFlag类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap