Repository: deltaspike Updated Branches: refs/heads/master 63f15665c -> a93fa7872
DELTASPIKE-1045 documented (Abstract)FullEntityRepository Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/a93fa787 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/a93fa787 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/a93fa787 Branch: refs/heads/master Commit: a93fa78723bbc673291ff90d4a86e30c8d820966 Parents: 63f1566 Author: Harald Wellmann <[email protected]> Authored: Sat Dec 19 17:00:46 2015 +0100 Committer: Harald Wellmann <[email protected]> Committed: Sat Dec 19 17:00:46 2015 +0100 ---------------------------------------------------------------------- documentation/src/main/asciidoc/data.adoc | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a93fa787/documentation/src/main/asciidoc/data.adoc ---------------------------------------------------------------------- diff --git a/documentation/src/main/asciidoc/data.adoc b/documentation/src/main/asciidoc/data.adoc index 7cf6a1f..f14d34a 100644 --- a/documentation/src/main/asciidoc/data.adoc +++ b/documentation/src/main/asciidoc/data.adoc @@ -248,7 +248,7 @@ Repositories can be deactivated creating a <<spi.adoc#_classdeactivator,ClassDea The `EntityRepository` interface implements the <<core.adoc#_deactivatable,Deactivatable>> interface allowing it to be used in the ClassDeactivator. -If your repository don't implement `EntityRepository` and you want to deactivate it, you will need to implement the <<core.adoc#_deactivatable,Deactivatable>> interface yourself. +If your repository does not implement `EntityRepository` and you want to deactivate it, you will need to implement the <<core.adoc#_deactivatable,Deactivatable>> interface yourself. [source,java] ---------------------------------------- @@ -314,6 +314,29 @@ public interface PersonRepository extends EntityRepository<Person, Long>, Entity } ------------------------------------------------------------------------------------------------------- +This is equivalent to extending the `FullEntityRepository` interface: + +[source,java] +------------------------------------------------------------------------------------------------------- +@Repository +public interface PersonRepository extends FullEntityRepository<Person, Long> +{ + ... +} +------------------------------------------------------------------------------------------------------- + +For abstract classes, there is a convenience base class `AbstractFullEntityRepository` which also +implements `EntityManagerDelegate` and thus exposes most `EntityManager` methods: + +[source,java] +------------------------------------------------------------------------------------------------------- +@Repository +public abstract PersonRepository extends AbstractFullEntityRepository<Person, Long> +{ + ... +} +------------------------------------------------------------------------------------------------------- + == Query Method Expressions Good naming is a difficult aspects in software engineering. A good
