public Set<java.util.Map.Entry<Long, V>> entrySet() {
		return new AbstractSet<java.util.Map.Entry<Long,V>>(){
			
			protected java.util.Map.Entry<Long,V> newEntry(Long k,V v){
				return new SimpleEntry<Long,V>(k,v){

					public V setValue(V arg0) {
						throw new UnsupportedOperationException();
					};					
				};
			}

			public boolean add(java.util.Map.Entry<Long, V> e) {
				throw new UnsupportedOperationException();
			
			}
			
			@SuppressWarnings("unchecked")
			public boolean contains(Object o) {
				
				if(o instanceof Entry){
					Entry<Long,V> e = (java.util.Map.Entry<Long, V>) o;
					if(e.getKey()!=null && get(e.getKey())!=null)
						return true;
				}
				return false;
			}


			public Iterator<java.util.Map.Entry<Long, V>> iterator() {
					
				return new Iterator<Entry<Long,V>>(){
					final Iterator<Long> keyIter = keySet().iterator();

					public boolean hasNext() {
						return keyIter.hasNext();
					}

					public Entry<Long, V> next() {
						Long k = keyIter.next();
						return newEntry(k, get(k));
					}

					public void remove() {
						keyIter.remove();						
					}
					
				};
					
					
			}

			@SuppressWarnings("unchecked")
			public boolean remove(Object o) {
				
				if(o instanceof Entry){
					Entry<Long,V> e = (java.util.Map.Entry<Long, V>) o;
					
					//check for nulls
					if(e.getKey() == null || e.getValue() == null)
						return false;
					//find old value, must be same as item in entry
					V v = get(e.getKey());
					if(v == null || !e.getValue().equals(v))
						return false;
					return  PrimaryStoreMapImpl.this.remove(e.getKey())!=null;
				}
				return false;

			}



			public int size() {
				return PrimaryStoreMapImpl.this.size();
			}

		};
	}