public static ODatabaseDocument castToODatabaseDocument(ODatabase<?> db)
	{
		while(db!=null && !(db instanceof ODatabaseDocument))
		{
			if(db instanceof ODatabaseInternal<?>)
			{
				db = ((ODatabaseInternal<?>)db).getUnderlying();
			}
		}
		return (ODatabaseDocument)db;
	}
public static ODatabaseDocument castToODatabaseDocument ( ODatabase < ? > db ) { while ( db != null && ! ( db instanceof ODatabaseDocument ) ) { if ( db instanceof ODatabaseInternal < ? > ) { db = ( ( ODatabaseInternal < ? > ) db ) . getUnderlying ( ) ; } } return ( ODatabaseDocument ) db ; }
Utility method to obtain {@link ODatabaseDocument} from {@link ODatabase}
@param db {@link ODatabase} to cast from
@return {@link ODatabaseDocument} for a specified {@link ODatabase}