Subversion Repositories SmartDukaan

Rev

Rev 35947 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35947 Rev 36376
Line 1... Line 1...
1
package com.spice.profitmandi.dao.repository.user;
1
package com.spice.profitmandi.dao.repository.user;
2
 
2
 
-
 
3
import java.util.List;
-
 
4
 
3
import org.springframework.stereotype.Repository;
5
import org.springframework.stereotype.Repository;
4
 
6
 
5
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
7
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
-
 
8
import com.spice.profitmandi.dao.cart.v2.CartLifecycleStatus;
-
 
9
import com.spice.profitmandi.dao.cart.v2.SaleType;
6
import com.spice.profitmandi.dao.entity.user.Cart;
10
import com.spice.profitmandi.dao.entity.user.Cart;
7
 
11
 
8
@Repository
12
@Repository
9
public interface CartRepository {
13
public interface CartRepository {
10
	public void persist(Cart cart);
14
	public void persist(Cart cart);
11
	public Cart selectById(int id) throws ProfitMandiBusinessException;
15
	public Cart selectById(int id) throws ProfitMandiBusinessException;
-
 
16
 
-
 
17
	/**
-
 
18
	 * Authorization-aware lookup: returns the cart only if it belongs to the
-
 
19
	 * given retailer AND matches the expected sale type. Used by
-
 
20
	 * V2BillingController so one partner cannot touch another partner's draft.
-
 
21
	 */
-
 
22
	public Cart findByIdAndRetailerAndSaleType(int id, int retailerId, SaleType saleType);
-
 
23
 
-
 
24
	/**
-
 
25
	 * All open tertiary drafts for a partner (most recent first). Procurement
-
 
26
	 * carts and closed tertiary carts are excluded.
-
 
27
	 */
-
 
28
	public List<Cart> findActiveDraftsByRetailer(int retailerId, SaleType saleType, CartLifecycleStatus status);
12
}
29
}