Tabnine Logo
RecordFinder
Code IndexAdd Tabnine to your IDE (free)

How to use
RecordFinder
in
it.tidalwave.bluemarine2.model.finder

Best Java code snippets using it.tidalwave.bluemarine2.model.finder.RecordFinder (Showing top 7 results out of 315)

origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

@Override @Nonnull
public Optional<Record> getRecord()
 {
  return record.get(() -> _findRecords().containingTrack(this).optionalFirstResult());
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-model

/*******************************************************************************************************************
 *
 * Constrains the search to records made by the given artist.
 *
 * @param       artist      the artist
 * @return                  the {@code Finder}, in fluent fashion
 *
 ******************************************************************************************************************/
@Nonnull
public default RecordFinder madeBy (final @Nonnull MusicArtist artist)
 {
  return madeBy(artist.getId());
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-model

 /*******************************************************************************************************************
  *
  * Constrains the search to records containing the given track.
  *
  * @param       track       the track
  * @return                  the {@code Finder}, in fluent fashion
  *
  ******************************************************************************************************************/
 @Nonnull
 public default RecordFinder containingTrack (final @Nonnull Track track)
  {
   return RecordFinder.this.containingTrack(track.getId());
  }
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

pw.printf("  ALL TRACKS RETRIEVED BY %d QUERIES%n", getLatestQueryCount());
pw.printf("%n%n%nALL RECORDS (%d):%n%n", allRecordsFinder.count());
final int recordCountQueryCount = getLatestQueryCount();
log.info("QUERYING ALL RECORDS...");
final List<Record> records = allRecordsFinder.stream().sorted(BY_DISPLAY_NAME).collect(toList());
records.forEach(record -> pw.printf("  %s - %d tracks - %s%n",
    displayNameOf(record),
  pw.printf("%nRECORDS OF %s (%d):%n", displayNameOf(artist), recordFinder.count());
  recordFinder.stream().forEach(record -> pw.printf("  %s%n", displayNameOf(record)));
  recordFinder.stream().forEach(record -> assertEquals(record.getSource(), artist.getSource()));
  pw.printf("  RETRIEVED BY %d QUERIES%n", getLatestQueryCount());
 });
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

@Override @Nonnull
public Optional<Record> getRecord()
 {
  return trackId.flatMap(tid -> new RepositoryRecordFinder(repository).containingTrack(tid).optionalFirstResult());
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-rest

/*******************************************************************************************************************
 *
 * Exports a single record resource.
 *
 * @param   id          the record id
 * @param   source      the data source
 * @param   fallback    the fallback data source
 * @return              the JSON representation of the record
 *
 ******************************************************************************************************************/
@ResponseBody
@RequestMapping(value = "/record/{id}", produces = { APPLICATION_JSON_VALUE, APPLICATION_XML_VALUE })
public DetailedRecordResource getRecord (final @PathVariable String id,
                     final @RequestParam(required = false, defaultValue = "embedded") String source,
                     final @RequestParam(required = false, defaultValue = "embedded") String fallback)
 {
  log.info("getRecord({}, {}, {})", id, source, fallback);
  checkStatus();
  final List<TrackResource> tracks = finalized(catalog.findTracks().inRecord(new Id(id)), source, fallback, TrackResource::new);
  return single(finalized(catalog.findRecords().withId(new Id(id)), source, fallback,
              record -> new DetailedRecordResource(record, tracks)));
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog

@Override @Nonnull
public RecordFinder findRecords()
 {
  return _findRecords().madeBy(this);
 }
it.tidalwave.bluemarine2.model.finderRecordFinder

Javadoc

A Finder for Records.

Most used methods

  • containingTrack
  • madeBy
  • count
  • optionalFirstResult
  • stream
  • withId

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now