当前位置: 首页>>代码示例>>Java>>正文


Java ItemDAO类代码示例

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


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


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