code: public static String generateEntityName(SQLiteDaoDefinition dao, SQLiteEntity entity) {
  		String entityName;
  		if (entity == null) {
  			M2MEntity m2mEntity = M2MEntity.extractEntityManagedByDAO(dao.getElement());
  			entityName = m2mEntity.getSimpleName();
  		} else {
  			entityName = entity.getSimpleName();
  		}
  		return entityName;
  	}
docs: dao or entity can be null.
  
  @param dao
  the dao
  @param entity
  the entity
  @return the string