當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。