public Object[] getObjects(String pType, Object[] pIds)
        throws SQLException {
    	
    	// Create Vector to hold the result
    	Vector result = new Vector(pIds.length);

    	// Loop through Id's and fetch one at a time (no good performance...)
    	for (int i = 0; i < pIds.length; i++) {
    	    // Create DBObject, set id and read it
    	    DatabaseObject dbObject = 
    	    	(DatabaseObject) getDatabaseReadable(pType);

    	    dbObject.setId(pIds[i]);
    	    dbObject = (DatabaseObject) mObjectReader.readObject(dbObject);

    	    // Add to result if not null
    	    if (dbObject != null) {
    	    	result.add(dbObject.getObject());
    	    }
    	}

    	// Create array of correct type, length equal to Vector
    	Class cl = getType(pType);
    	Object[] arr = (Object[]) Array.newInstance(cl, result.size());

    	// Return the vector as an array
    	return result.toArray(arr);
    }
public Object [ ] getObjects ( String pType , Object [ ] pIds ) throws SQLException { Vector result = new Vector ( pIds . length ) ; for ( int i = 0 ; i < pIds . length ; i ++ ) { DatabaseObject dbObject = ( DatabaseObject ) getDatabaseReadable ( pType ) ; dbObject . setId ( pIds [ i ] ) ; dbObject = ( DatabaseObject ) mObjectReader . readObject ( dbObject ) ; if ( dbObject != null ) { result . add ( dbObject . getObject ( ) ) ; } } Class cl = getType ( pType ) ; Object [ ] arr = ( Object [ ] ) Array . newInstance ( cl , result . size ( ) ) ; return result . toArray ( arr ) ; }
interface