-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added @PersistAsBaseType to support persistent base/abstract bean con…
…tainer types
- Loading branch information
Showing
39 changed files
with
1,376 additions
and
335 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
ojcms-persistence/src/main/java/de/adito/ojcms/persistence/PersistAsBaseType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package de.adito.ojcms.persistence; | ||
|
||
import de.adito.ojcms.beans.IBean; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* A persistent bean container for beans annotated by this annotation will be created as base type container for multiple sub types. | ||
* The base bean type itself can also be used if it is not abstract. | ||
* | ||
* @author Simon Danner, 10.02.2018 | ||
*/ | ||
@Documented | ||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface PersistAsBaseType | ||
{ | ||
/** | ||
* The container id of the element, in which the bean/beans are stored. | ||
* | ||
* @return the container id | ||
*/ | ||
String containerId(); | ||
|
||
/** | ||
* All sub types the base type container is for. The base type itself can be included if it is not abstract. | ||
* At least two types must be provided. The given types must be assignable from the base bean type. | ||
* | ||
* @return an array of bean sub types the base container should be for | ||
*/ | ||
Class<? extends IBean>[] forSubTypes(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.