This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Persistence interface and annotation
Signed-off-by: Daniel Bluhm <bluhmdj@ornl.gov>
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...ce.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/IPersistenceHandler.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,6 @@ | ||
package org.eclipse.ice.dev.annotations; | ||
|
||
public interface IPersistenceHandler { | ||
public <T extends IDataElement> void save(T element) throws Exception; | ||
public <T extends IDataElement> T findByID(String id) throws Exception; | ||
} |
13 changes: 13 additions & 0 deletions
13
org.eclipse.ice.dev.annotations/src/main/java/org/eclipse/ice/dev/annotations/Persisted.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,13 @@ | ||
package org.eclipse.ice.dev.annotations; | ||
|
||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
@Retention(SOURCE) | ||
@Target(TYPE) | ||
public @interface Persisted { | ||
String collection(); | ||
} |