Package org.hibernate

Examples of org.hibernate.Criteria.createAlias()


    public List<ProductMarketing> findProductMarketingsNotInThisMasterCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryMasterProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.ne("catalogCategoryProductSkuRel.pk.catalogCategoryMaster.id", categoryId));

        criteria.addOrder(Order.asc("id"));
View Full Code Here


    public List<ProductMarketing> findProductMarketingsNotInThisMasterCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryMasterProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.ne("catalogCategoryProductSkuRel.pk.catalogCategoryMaster.id", categoryId));

        criteria.addOrder(Order.asc("id"));

        @SuppressWarnings("unchecked")
View Full Code Here

     
  public List<ProductMarketing> findProductMarketingsByVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.eq("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
       
        criteria.addOrder(Order.asc("id"));
View Full Code Here

  public List<ProductMarketing> findProductMarketingsByVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.eq("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
       
        criteria.addOrder(Order.asc("id"));

        @SuppressWarnings("unchecked")
View Full Code Here

 
    public List<ProductMarketing> findProductMarketingsNotInThisVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.ne("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
       
        criteria.addOrder(Order.asc("id"));
View Full Code Here

    public List<ProductMarketing> findProductMarketingsNotInThisVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductMarketing.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("productSkus", "productSku", JoinType.LEFT_OUTER_JOIN);
        criteria.createAlias("productSku.catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.ne("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
       
        criteria.addOrder(Order.asc("id"));

        @SuppressWarnings("unchecked")
View Full Code Here

    public List<ProductSku> findProductSkusByMasterCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductSku.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("catalogCategoryMasterProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.eq("catalogCategoryProductSkuRel.pk.catalogCategoryMaster.id", categoryId));

        criteria.addOrder(Order.asc("id"));

        @SuppressWarnings("unchecked")
View Full Code Here

   
    public List<ProductSku> findProductSkusByVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteria = createDefaultCriteria(ProductSku.class);
        handleSpecificProductMarketingFetchMode(criteria, params);

        criteria.createAlias("catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteria.add(Restrictions.eq("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
       
        criteria.addOrder(Order.asc("id"));

        @SuppressWarnings("unchecked")
View Full Code Here

        return productSkus;
    }
   
    public List<ProductSku> findProductSkusNotInThisVirtualCatalogCategoryId(final Long categoryId, Object... params) {
        Criteria criteriaSubListId = createDefaultCriteria(ProductSku.class);
        criteriaSubListId.createAlias("catalogCategoryVirtualProductSkuRels", "catalogCategoryProductSkuRel", JoinType.LEFT_OUTER_JOIN);
        criteriaSubListId.add(Restrictions.eq("catalogCategoryProductSkuRel.pk.catalogCategoryVirtual.id", categoryId));
//        criteriaSubListId.setProjection(Projections.property("id"));

        @SuppressWarnings("unchecked")
        List<ProductSku> subProductSkus = criteriaSubListId.list();
View Full Code Here

    public List<Market> getMarketsByMarketPlaceCode(final String marketPlaceCode, Object... params) {
        Criteria criteria = createDefaultCriteria(Market.class);

        handleSpecificFetchModeMarket(criteria, params);
       
        criteria.createAlias("marketPlace", "mp", JoinType.LEFT_OUTER_JOIN);
        criteria.add( Restrictions.eq("mp.code", handleCodeValue(marketPlaceCode)));
       
        criteria.addOrder(Order.asc("code"));

        @SuppressWarnings("unchecked")
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.