src/main/java/com/billybyte/mongo/MongoXml.java
public void upsert(String key, T value){
		DBObject query = new BasicDBObject();
		query.put(KEY_FIELD, key);
		if(dbColl.count(query)==0){;
			insertSingleEntry(key, value);
		} else {
			updateSingleEntry(key, value);
		}
	}
/**
	 * Checks to see if the key is already present in the collection, if it is, updates the document, if not, inserts
	 * @param key
	 * @param value
	 */
Checks to see if the key is already present in the collection, if it is, updates the document, if not, inserts
@param key
@param value
Checks to see if the key is already present in the collection if it is updates the document if not inserts @param key @param value
public void upsert(String key, T value){
		DBObject query = new BasicDBObject();
		query.put(KEY_FIELD, key);
		if(dbColl.count(query)==0){;
			insertSingleEntry(key, value);
		} else {
			updateSingleEntry(key, value);
		}
	}
public void upsert ( String key , T value ) { DBObject query = new BasicDBObject ( ) ; query . put ( KEY_FIELD , key ) ; if ( dbColl . count ( query ) == 0 ) { ; insertSingleEntry ( key , value ) ; } else { updateSingleEntry ( key , value ) ; } }
Checks to see if the key is already present in the collection, if it is, updates the document, if not, inserts
 @param key
 @param value
Checks to see if the key is already present in the collection if it is updates the document if not inserts @param key @param value