QueryByCriteria q = new QueryByCriteria( PhotoInfo.class, crit );
Collection result = broker.getCollectionByQuery( q );
if ( result.size() > 0 ) {
photos = (PhotoInfo[]) result.toArray( new PhotoInfo[result.size()] );
}
txw.commit();
} catch ( Exception e ) {
log.warn( "Error executing query: " + e.getMessage() );
e.printStackTrace( System.out );
txw.abort();
}