public void commit() {
	
		Connection conn = getConnection();
		try{
			conn.setAutoCommit(false);
			
			for(EntityBase ent : added.keySet() )
			{
				switch(ent.getOperation())
				{
					case insert:
					{
						added.get(ent).persistAdd(ent);
					}
					case delete:
					{
						added.get(ent).persistDelete(ent);
					}
					case update:
					{
						added.get(ent).persistUpdate(ent);
					}
				}
			}
			conn.commit();
			conn.setAutoCommit(true);
			
		}catch(SQLException ex)
		{
			ex.printStackTrace();
		}
		
	}