public class JpaRelationshipRepository<S,I extends java.io.Serializable,T,J extends java.io.Serializable> extends JpaRepositoryBase<T> implements io.crnk.core.repository.RelationshipRepositoryV2<S,I,T,J>, io.crnk.core.repository.BulkRelationshipRepositoryV2<S,I,T,J>
module, repositoryConfig| Constructor and Description |
|---|
JpaRelationshipRepository(JpaModule module,
java.lang.Class<S> sourceResourceClass,
JpaRepositoryConfig<T> targetResourceClass)
JPA relationship directly exposed as repository
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRelations(S source,
java.lang.Iterable<J> targetIds,
java.lang.String fieldName) |
io.crnk.core.resource.list.ResourceList<T> |
findManyTargets(I sourceId,
java.lang.String fieldName,
io.crnk.core.queryspec.QuerySpec querySpec) |
T |
findOneTarget(I sourceId,
java.lang.String fieldName,
io.crnk.core.queryspec.QuerySpec querySpec) |
io.crnk.core.engine.internal.utils.MultivaluedMap<I,T> |
findTargets(java.lang.Iterable<I> sourceIds,
java.lang.String fieldName,
io.crnk.core.queryspec.QuerySpec querySpec) |
java.lang.Class<S> |
getSourceResourceClass() |
java.lang.Class<?> |
getTargetEntityClass() |
java.lang.Class<T> |
getTargetResourceClass() |
void |
removeRelations(S source,
java.lang.Iterable<J> targetIds,
java.lang.String fieldName) |
void |
setRelation(S source,
J targetId,
java.lang.String fieldName) |
void |
setRelations(S source,
java.lang.Iterable<J> targetIds,
java.lang.String fieldName) |
fetchRelations, filterExecutor, filterQuery, filterQuerySpec, filterResults, filterTuples, getUnique, mappublic JpaRelationshipRepository(JpaModule module, java.lang.Class<S> sourceResourceClass, JpaRepositoryConfig<T> targetResourceClass)
module - that manages this repositorysourceResourceClass - from this relationtargetResourceClass - from this relationpublic void setRelations(S source, java.lang.Iterable<J> targetIds, java.lang.String fieldName)
public void addRelations(S source, java.lang.Iterable<J> targetIds, java.lang.String fieldName)
public void removeRelations(S source, java.lang.Iterable<J> targetIds, java.lang.String fieldName)
public io.crnk.core.engine.internal.utils.MultivaluedMap<I,T> findTargets(java.lang.Iterable<I> sourceIds, java.lang.String fieldName, io.crnk.core.queryspec.QuerySpec querySpec)
public T findOneTarget(I sourceId, java.lang.String fieldName, io.crnk.core.queryspec.QuerySpec querySpec)
public io.crnk.core.resource.list.ResourceList<T> findManyTargets(I sourceId, java.lang.String fieldName, io.crnk.core.queryspec.QuerySpec querySpec)
public java.lang.Class<S> getSourceResourceClass()
public java.lang.Class<T> getTargetResourceClass()
public java.lang.Class<?> getTargetEntityClass()