public abstract class BaseModelRepository<T extends Model> extends BaseRepository<T> implements ModelRepository<T>
modelClass| Constructor and Description |
|---|
BaseModelRepository() |
BaseModelRepository(String modelName) |
| Modifier and Type | Method and Description |
|---|---|
T |
createModel()
Create a new/empty model instance.
|
T |
createModel(org.neo4j.graphdb.PropertyContainer node,
FieldList fields)
Create appropriate the model for a neo4j property container and fetch some fields.
|
T |
find(long id,
FieldList fields) |
org.neo4j.graphdb.Node |
getNode(Model model)
Get the underlying neo4j node for a model.
|
org.neo4j.graphdb.Label |
label()
Get the main label to use.
|
Set<org.neo4j.graphdb.Label> |
labels()
Set of labels used for models of this repository.
|
void |
remove(T model)
Delete a model
|
void |
save(SaveContext<T> context)
Save the model inside the passed SaveContext.
|
cache, contains, createModel, dispose, fetch, fetch, fetch, find, findByUuid, getModelClass, getType, graph, initialize, logger, persistence, queryBuilder, queryIdentifier, refetch, refetch, relationships, save, save, search, service, sort, validateModelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcache, contains, createModel, dispose, fetch, fetch, fetch, find, findByUuid, getModelClass, getType, graph, initialize, persistence, queryBuilder, queryIdentifier, refetch, refetch, relationships, save, save, search, service, sortpublic BaseModelRepository()
public BaseModelRepository(String modelName)
public T createModel()
ModelRepositorycreateModel in interface ModelRepository<T extends Model>public T createModel(org.neo4j.graphdb.PropertyContainer node, FieldList fields)
RepositorycreateModel in interface Repository<T extends Model>node - The property container to usefields - Field list to fetch from property containerpublic org.neo4j.graphdb.Node getNode(Model model)
ModelRepositorygetNode in interface ModelRepository<T extends Model>model - Model which represents the neo4j nodepublic org.neo4j.graphdb.Label label()
ModelRepositorylabel in interface ModelRepository<T extends Model>public Set<org.neo4j.graphdb.Label> labels()
ModelRepositorylabels in interface ModelRepository<T extends Model>public void remove(T model) throws de.whitefrog.frogr.exception.PersistException
Repositoryremove in interface Repository<T extends Model>model - Model to deletede.whitefrog.frogr.exception.PersistExceptionpublic void save(SaveContext<T> context) throws de.whitefrog.frogr.exception.PersistException
Repositorysave in interface Repository<T extends Model>context - Must contain the model to savede.whitefrog.frogr.exception.PersistExceptionCopyright © 2018. All rights reserved.