日期:2014-05-17 浏览次数:20896 次
    public List<DelStorageInventory> findByUPC(String upc) {
		if (upc == null) {
			return null;
		}
		String hql = "select delStorageInventory from DelStorageInventory delStorageInventory where lower(delStorageInventory.upc) like lower(:upc)";
		try {
			return this.entityManager.createQuery(hql, DelStorageInventory.class).setFlushMode(FlushModeType.COMMIT).setParameter("upc", "%"+upc).getResultList();
		} catch(NoResultException e) {
			// TODO: handle exception
		}
		return null;
	}
	
	public DelStorageInventory findByUPC(String upc) {
		//求单个对象的查询方法、、、
		
	}