if (info == null) { if (bitstreamInfoDAO.updateMissingBitstream(id)) { info = bitstreamInfoDAO.findByBitstreamId(id); } }
    private BitstreamInfo checkBitstream(final int id)    {        // get bitstream info from bitstream table        BitstreamInfo info = bitstreamInfoDAO.findByBitstreamId(id);        // make sure bitstream and most_recent_checksum in sync for the id        if (info == null)        {            if (bitstreamInfoDAO.updateMissingBitstream(id))            {                info = bitstreamInfoDAO.findByBitstreamId(id);            }        }        // requested id was not found in bitstream        // or most_recent_checksum table        if (info == null)        {            // Note: this case should only occur if id is requested at            // command line, since ref integrity checks should            // prevent id from appearing in most_recent_checksum            // but not bitstream table, or vice versa            info = new BitstreamInfo(id);            processNullInfoBitstream(info);        }        else if (!info.getToBeProcessed())        {            // most_recent_checksum.to_be_processed is marked            // 'false' for this bitstream id.            // Do not do any db updates            info                    .setChecksumCheckResult(ChecksumCheckResults.BITSTREAM_NOT_PROCESSED);        }        else if (info.getDeleted())        {            // bitstream id is marked 'deleted' in bitstream table.            processDeletedBitstream(info);        }        else        {            processBitstream(info);        }        return info;    }