// Path: src/main/java/eu/cloudscale/showcase/db/dao/IShoppingCartLineDao.java
// public interface IShoppingCartLineDao extends IDao<IShoppingCartLine> 
// {
// 
// 	public IShoppingCartLine getBySCandItem(Integer shoppingId, int itemId);
// 
// 	public void delete(IShoppingCartLine bySCandItem);
// 
// 	public boolean isCartEmpty(int scId);
// 
// 	public List<Object[]> findBySCId(Integer shoppingId);
// 
// }
// 
// Path: src/main/java/eu/cloudscale/showcase/db/model/IShoppingCartLine.java
// public interface IShoppingCartLine
// {
// 
// 	public IShoppingCart getShoppingCart();
// 
// 	public void setShoppingCart(IShoppingCart shoppingCart);
// 
// 	public Integer getSclId();
// 
// 	public void setSclId(Integer sclScId);
// 
// 	public IItem getItem();
// 
// 	public void setItem(IItem item);
// 
// 	public Integer getSclQty();
// 
// 	public void setSclQty(Integer sclQty);
// 
// }
// 
// Path: src/main/java/eu/cloudscale/showcase/db/model/hibernate/ShoppingCartLine.java
// @Entity
// @Table( name = "shopping_cart_line", catalog = "tpcw" )
// @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
// public class ShoppingCartLine implements IShoppingCartLine
// {
// 	private Integer sclId;
// 
// 	private IItem    item;
// 
// 	private Integer sclQty;
// 	
// 	private IShoppingCart shoppingCart;	
// 
// 	public ShoppingCartLine()
// 	{
// 	}
// 	
// 	@ManyToOne( targetEntity=ShoppingCart.class, fetch = FetchType.LAZY )
// 	@JoinColumn( name = "SCL_SC_ID", nullable = false )
// 	@Override
//     public IShoppingCart getShoppingCart()
//     {
//     	return shoppingCart;
//     }
// 
// 	@Override
//     public void setShoppingCart(IShoppingCart shoppingCart)
//     {
//     	this.shoppingCart = shoppingCart;
//     }
// 
// 
// 	@Id
// 	@GeneratedValue( strategy = IDENTITY )
// 	@Column( name = "SCL_ID", unique = true, nullable = false )
// 	@Override
// 	public Integer getSclId()
// 	{
// 		return this.sclId;
// 	}
// 
// 	@Override
// 	public void setSclId( Integer sclScId )
// 	{
// 		this.sclId = sclScId;
// 	}
// 
// 	@ManyToOne( targetEntity=Item.class, fetch = FetchType.EAGER )
// 	@JoinColumn( name = "SCL_I_ID", nullable = false )
// 	@Override
// 	public IItem getItem()
// 	{
// 		return this.item;
// 	}
// 
// 	@Override
// 	public void setItem(IItem item)
// 	{
// 		this.item = item;
// 	}
// 
// 	@Column( name = "SCL_QTY" )
// 	@Override
// 	public Integer getSclQty()
// 	{
// 		return this.sclQty;
// 	}
// 
// 	@Override
// 	public void setSclQty(Integer sclQty)
// 	{
// 		this.sclQty = sclQty;
// 	}
// }


import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import eu.cloudscale.showcase.db.dao.IShoppingCartLineDao;
import eu.cloudscale.showcase.db.model.IShoppingCartLine;
import eu.cloudscale.showcase.db.model.hibernate.ShoppingCartLine;
/*******************************************************************************
*  Copyright (c) 2015 XLAB d.o.o.
*  All rights reserved. This program and the accompanying materials
*  are made available under the terms of the Eclipse Public License v1.0
*  which accompanies this distribution, and is available at
*  http://www.eclipse.org/legal/epl-v10.html
*  
*  @author XLAB d.o.o.
*******************************************************************************/
package eu.cloudscale.showcase.db.dao.hibernate.impl;




@Repository
//@Transactional(readOnly=true)
public class ShoppingCartLineDaoImpl extends DaoImpl<IShoppingCartLine> implements IShoppingCartLineDao
{

	
	public ShoppingCartLineDaoImpl()
	{
//		super( (SessionFactory) ContextHelper.getApplicationContext().getBean( "sessionFactory" ) );
	}
	
	@Autowired
	public ShoppingCartLineDaoImpl(SessionFactory sessionFactory)
	{
		super( sessionFactory );
	}

    @SuppressWarnings( "unchecked" )
// Path: src/main/java/eu/cloudscale/showcase/db/dao/IShoppingCartLineDao.java
// public interface IShoppingCartLineDao extends IDao<IShoppingCartLine> 
// {
// 
// 	public IShoppingCartLine getBySCandItem(Integer shoppingId, int itemId);
// 
// 	public void delete(IShoppingCartLine bySCandItem);
// 
// 	public boolean isCartEmpty(int scId);
// 
// 	public List<Object[]> findBySCId(Integer shoppingId);
// 
// }
// 
// Path: src/main/java/eu/cloudscale/showcase/db/model/IShoppingCartLine.java
// public interface IShoppingCartLine
// {
// 
// 	public IShoppingCart getShoppingCart();
// 
// 	public void setShoppingCart(IShoppingCart shoppingCart);
// 
// 	public Integer getSclId();
// 
// 	public void setSclId(Integer sclScId);
// 
// 	public IItem getItem();
// 
// 	public void setItem(IItem item);
// 
// 	public Integer getSclQty();
// 
// 	public void setSclQty(Integer sclQty);
// 
// }
// 
// Path: src/main/java/eu/cloudscale/showcase/db/model/hibernate/ShoppingCartLine.java
// @Entity
// @Table( name = "shopping_cart_line", catalog = "tpcw" )
// @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
// public class ShoppingCartLine implements IShoppingCartLine
// {
// 	private Integer sclId;
// 
// 	private IItem    item;
// 
// 	private Integer sclQty;
// 	
// 	private IShoppingCart shoppingCart;	
// 
// 	public ShoppingCartLine()
// 	{
// 	}
// 	
// 	@ManyToOne( targetEntity=ShoppingCart.class, fetch = FetchType.LAZY )
// 	@JoinColumn( name = "SCL_SC_ID", nullable = false )
// 	@Override
//     public IShoppingCart getShoppingCart()
//     {
//     	return shoppingCart;
//     }
// 
// 	@Override
//     public void setShoppingCart(IShoppingCart shoppingCart)
//     {
//     	this.shoppingCart = shoppingCart;
//     }
// 
// 
// 	@Id
// 	@GeneratedValue( strategy = IDENTITY )
// 	@Column( name = "SCL_ID", unique = true, nullable = false )
// 	@Override
// 	public Integer getSclId()
// 	{
// 		return this.sclId;
// 	}
// 
// 	@Override
// 	public void setSclId( Integer sclScId )
// 	{
// 		this.sclId = sclScId;
// 	}
// 
// 	@ManyToOne( targetEntity=Item.class, fetch = FetchType.EAGER )
// 	@JoinColumn( name = "SCL_I_ID", nullable = false )
// 	@Override
// 	public IItem getItem()
// 	{
// 		return this.item;
// 	}
// 
// 	@Override
// 	public void setItem(IItem item)
// 	{
// 		this.item = item;
// 	}
// 
// 	@Column( name = "SCL_QTY" )
// 	@Override
// 	public Integer getSclQty()
// 	{
// 		return this.sclQty;
// 	}
// 
// 	@Override
// 	public void setSclQty(Integer sclQty)
// 	{
// 		this.sclQty = sclQty;
// 	}
// }


// Path: src/main/java/eu/cloudscale/showcase/db/dao/hibernate/impl/ShoppingCartLineDaoImpl.java
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import eu.cloudscale.showcase.db.dao.IShoppingCartLineDao;
import eu.cloudscale.showcase.db.model.IShoppingCartLine;
import eu.cloudscale.showcase.db.model.hibernate.ShoppingCartLine;

/*******************************************************************************
*  Copyright (c) 2015 XLAB d.o.o.
*  All rights reserved. This program and the accompanying materials
*  are made available under the terms of the Eclipse Public License v1.0
*  which accompanies this distribution, and is available at
*  http://www.eclipse.org/legal/epl-v10.html
*  
*  @author XLAB d.o.o.
*******************************************************************************/
package eu.cloudscale.showcase.db.dao.hibernate.impl;




@Repository
//@Transactional(readOnly=true)
public class ShoppingCartLineDaoImpl extends DaoImpl<IShoppingCartLine> implements IShoppingCartLineDao
{

	
	public ShoppingCartLineDaoImpl()
	{
//		super( (SessionFactory) ContextHelper.getApplicationContext().getBean( "sessionFactory" ) );
	}
	
	@Autowired
	public ShoppingCartLineDaoImpl(SessionFactory sessionFactory)
	{
		super( sessionFactory );
	}

    @SuppressWarnings( "unchecked" )
    @Override