Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.matel.pg.dao.impl; import com.matel.pg.dao.SalesItemDAO; import com.matel.pg.mock.domain.Customer; import com.matel.pg.mock.domain.SalesItem; import java.util.Set; import org.springframework.stereotype.Component; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @Transactional @Repository @Component("salesItemDAO") public class SalesItemDAOImpl implements SalesItemDAO { @Override public void save(Set<SalesItem> salesItemsToSave) { if (salesItemsToSave.toArray().length > 0) { System.out.println(".................................." + salesItemsToSave.size()); System.out.println(((SalesItem) (salesItemsToSave.toArray()[0])).getQboId()); // System.out.println(((SalesItem) (salesItemsToSave.toArray()[1])).getQboId()); } // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }