Package org.eclipse.rdf4j.spring.demo.dao

## Class ArtistDao

- java.lang.Object
- - org.eclipse.rdf4j.spring.dao.RDF4JDao
  - - org.eclipse.rdf4j.spring.dao.RDF4JCRUDDao<ENTITY,​ENTITY,​ID>
    - - org.eclipse.rdf4j.spring.dao.SimpleRDF4JCRUDDao<Artist,​IRI>
      - - org.eclipse.rdf4j.spring.demo.dao.ArtistDao

-     @Component
      public class ArtistDao
      extends SimpleRDF4JCRUDDao<Artist,​IRI>

  Class responsible for repository access for managing `Artist` entities. The class extends the `SimpleRDF4JCRUDDao`, providing capabilities for inserting and reading entities.
  Since:
    4.0.0
  Author:
    Florian Kleedorfer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.rdf4j.spring.dao.RDF4JDao

      `RDF4JDao.NamedSparqlSupplierFinishBuilder, RDF4JDao.NamedSparqlSupplierPreparer`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.spring.dao.RDF4JCRUDDao

      `KEY_PREFIX_INSERT, KEY_PREFIX_UPDATE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ArtistDao​(RDF4JTemplate rdf4JTemplate)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Set<Artist>` | `getArtistsWithoutPaintings()` |
    `protected IRI` | `getInputId​(Artist artist)` | Obtains the id of the input instance or null if it is new (or a partially populated composite key).
    `protected NamedSparqlSupplier` | `getInsertSparql​(Artist artist)` | Returns the SPARQL string used to write an instance of T to the database.
    `protected String` | `getReadQuery()` | Returns the SPARQL string used to read an instance of T from the database.
    `protected Artist` | `mapSolution​(BindingSet querySolution)` | Map one solution of the readQuery to the type of this DAO.
    `protected void` | `populateBindingsForUpdate​(MutableBindings bindingsBuilder, Artist artist)` | Sets the non-id bindings on for the write query such that the instance of type I is written to the database.
    `protected void` | `populateIdBindings​(MutableBindings bindingsBuilder, IRI iri)` | Binds the instance id to query variable(s).
    `protected RDF4JDao.NamedSparqlSupplierPreparer` | `prepareNamedSparqlSuppliers​(RDF4JDao.NamedSparqlSupplierPreparer preparer)` |

    - ### Methods inherited from class org.eclipse.rdf4j.spring.dao.RDF4JCRUDDao

      `convertIdToIri, delete, deleteForUpdate, generateNewId, getById, getByIdOptional, getUpdateSparql, list, newBindingsBuilder, postProcessMappedSolution, postProcessUpdate, save, saveAndReturnId, saveAndReturnId`

    - ### Methods inherited from class org.eclipse.rdf4j.spring.dao.RDF4JDao

      `getNamedGraphQuery, getNamedSparqlString, getNamedSparqlSupplier, getNamedTupleQuery, getNamedUpdate, getRdf4JTemplate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArtistDao

          public ArtistDao​(RDF4JTemplate rdf4JTemplate)

  - ### Method Detail

    - #### populateIdBindings

          protected void populateIdBindings​(MutableBindings bindingsBuilder,
                                            IRI iri)

      Description copied from class: `RDF4JCRUDDao`
      Binds the instance id to query variable(s).
      Specified by:
        `populateIdBindings` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### populateBindingsForUpdate

          protected void populateBindingsForUpdate​(MutableBindings bindingsBuilder,
                                                   Artist artist)

      Description copied from class: `RDF4JCRUDDao`
      Sets the non-id bindings on for the write query such that the instance of type I is written to the database. ID bindings are set through populateIdBindings()
      Overrides:
        `populateBindingsForUpdate` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### mapSolution

          protected Artist mapSolution​(BindingSet querySolution)

      Description copied from class: `RDF4JCRUDDao`
      Map one solution of the readQuery to the type of this DAO.
      Overrides:
        `mapSolution` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### getReadQuery

          protected String getReadQuery()

      Description copied from class: `RDF4JCRUDDao`
      Returns the SPARQL string used to read an instance of T from the database. The base implementation will cache the query string, so implementations should not try to cache the query.
      Overrides:
        `getReadQuery` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### getInsertSparql

          protected NamedSparqlSupplier getInsertSparql​(Artist artist)

      Description copied from class: `RDF4JCRUDDao`
      Returns the SPARQL string used to write an instance of T to the database. The instance to be inserted is passed to the function so implementations can decide which query to use based on the instance.
      Overrides:
        `getInsertSparql` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### getInputId

          protected IRI getInputId​(Artist artist)

      Description copied from class: `RDF4JCRUDDao`
      Obtains the id of the input instance or null if it is new (or a partially populated composite key).
      Overrides:
        `getInputId` in class `RDF4JCRUDDao<Artist,​Artist,​IRI>`

    - #### prepareNamedSparqlSuppliers

          protected RDF4JDao.NamedSparqlSupplierPreparer prepareNamedSparqlSuppliers​(RDF4JDao.NamedSparqlSupplierPreparer preparer)

      Specified by:
        `prepareNamedSparqlSuppliers` in class `RDF4JDao`

    - #### getArtistsWithoutPaintings

          public Set<Artist> getArtistsWithoutPaintings()