@Override
	public int viewCommentOnResource(int requesterID, int profileOwnerID,
			int resourceID, Vector<HashMap<String, ByteIterator>> result) {
		if(profileOwnerID < 0 || requesterID < 0 || resourceID < 0)
			return -1;

//		session = sessionFactory.openSession();
		try {
			tx = session.beginTransaction();
			
//			System.out.print("VIEW ");
			List<MANIPULATIONS> obj = session.createCriteria(MANIPULATIONS.class)
					.add(Restrictions.eq("rid", "'"+resourceID+"'"))
					.list();
			int i=0;
			Map<String, Method> methods = FactoryInsert.getGetterMethods(MANIPULATIONS.class);
			Set<String> keys = methods.keySet();
			HashMap<String, ByteIterator> values;
			while(i<=obj.size()){
				values = new HashMap<String, ByteIterator>();
				Iterator<String> it = keys.iterator();
				MANIPULATIONS m = obj.get(i);
				while(it.hasNext()){
					String key = it.next();
					Method methd = methods.get(key);
					Object r = methd.invoke(m, null);
					values.put(key, new ObjectByteIterator(r.toString().getBytes()));						
				}
				result.add(values);
				i++;
			}
//			System.out.println("res of "+profileOwnerID+"   ccc"+result.size());
			tx.commit();
			return 0;
		}catch (Exception e) {
			System.out.println("error in viewCommentOnResource:  "+resourceID);
			e.printStackTrace(System.out);
			return -1;
		}finally{
//			session.close();
		}

	}