Class SimpleRDF4JCRUDDao<ENTITY,ID>
java.lang.Object
org.eclipse.rdf4j.spring.dao.RDF4JDao
org.eclipse.rdf4j.spring.dao.RDF4JCRUDDao<ENTITY,ENTITY,ID>
org.eclipse.rdf4j.spring.dao.SimpleRDF4JCRUDDao<ENTITY,ID>
- Direct Known Subclasses:
ArtistDao, PaintingDao
@Experimental
public abstract class SimpleRDF4JCRUDDao<ENTITY,ID>
extends RDF4JCRUDDao<ENTITY,ENTITY,ID>
-
Nested Class Summary
Nested classes/interfaces inherited from class RDF4JDao
RDF4JDao.NamedSparqlSupplierFinishBuilder, RDF4JDao.NamedSparqlSupplierPreparerModifier and TypeClassDescriptionclassclass -
Field Summary
Fields inherited from class RDF4JCRUDDao
KEY_PREFIX_INSERT, KEY_PREFIX_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRDF4JCRUDDao(RDF4JTemplate rdf4JTemplate) SimpleRDF4JCRUDDao(RDF4JTemplate rdf4JTemplate, Class<ID> idClass) -
Method Summary
Methods inherited from class RDF4JCRUDDao
convertIdToIri, delete, deleteForUpdate, generateNewId, getById, getByIdOptional, getInputId, getInsertSparql, getReadQuery, getUpdateSparql, list, mapSolution, newBindingsBuilder, populateBindingsForUpdate, populateIdBindings, postProcessMappedSolution, postProcessUpdate, save, saveAndReturnId, saveAndReturnIdModifier and TypeMethodDescriptionprotected IRIconvertIdToIri(ID id) Converts the provided id to an IRI.voidNaive implementation usingRDF4JTemplate.delete(IRI).protected voiddeleteForUpdate(ID id) When updating an entity viaRDF4JCRUDDao.save(Object), its triples are removed first using this method.protected IDgenerateNewId(ID providedId) Generates a new id for an entity.final ENTITYObtains the entity with the specified id, throwing an exception if none is found.getByIdOptional(ID id) Obtains an optional entity with the specified id.protected IDgetInputId(ENTITY input) Obtains the id of the input instance or null if it is new (or a partially populated composite key).protected NamedSparqlSuppliergetInsertSparql(ENTITY input) Returns the SPARQL string used to write an instance of T to the database.protected StringReturns the SPARQL string used to read an instance of T from the database.protected NamedSparqlSuppliergetUpdateSparql(ENTITY input) Returns the SPARQL string used to update an instance of T in the database.list()protected ENTITYmapSolution(BindingSet querySolution) Map one solution of the readQuery to the type of this DAO.protected static BindingsBuilderReturns a new BindingsBuilder for your convenience.protected voidpopulateBindingsForUpdate(MutableBindings bindingsBuilder, ENTITY input) Sets the non-id bindings on for the write query such that the instance of type I is written to the database.protected abstract voidpopulateIdBindings(MutableBindings bindingsBuilder, ID id) Binds the instance id to query variable(s).protected ENTITYpostProcessMappedSolution(ENTITY entity) Callback invoked after mapping a solution to an entity, allowing subclasses to modify the entity before returning it to the client.protected voidpostProcessUpdate(ENTITY input, Map<String, Value> bindings) Callback invoked after a successful insert/update.final ENTITYSaves the entity, loads it again and returns it.saveAndReturnId(ENTITY input) saveAndReturnId(ENTITY input, ID id) Saves the entity and returns its (possibly newly generated) ID.Methods inherited from class RDF4JDao
getNamedGraphQuery, getNamedSparqlString, getNamedSparqlSupplier, getNamedTupleQuery, getNamedUpdate, getRdf4JTemplate, prepareNamedSparqlSuppliersModifier and TypeMethodDescriptionprotected GraphQueryEvaluationBuildergetNamedGraphQuery(String key) protected Stringprotected NamedSparqlSupplierObtains theNamedSparqlSupplierwith the specified key for use in, e.g.,RDF4JTemplate.tupleQuery(Class, NamedSparqlSupplier).protected TupleQueryEvaluationBuildergetNamedTupleQuery(String key) protected UpdateExecutionBuildergetNamedUpdate(String key) protected RDF4JTemplateprotected abstract RDF4JDao.NamedSparqlSupplierPreparer
-
Constructor Details
-
SimpleRDF4JCRUDDao
-
SimpleRDF4JCRUDDao
-