diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java index 50aa36fa5..5476d3112 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java @@ -19,7 +19,7 @@ import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension; public interface IPersistenceDelegate extends IExecutableExtension { /** - * Writes the given context to the given persistence container using the key. + * Writes the given context to the given persistence container. * If the container does not exist yet, the class needs to be given. * * @param context The context to persist. Must not be <code>null</code>. @@ -29,6 +29,15 @@ public interface IPersistenceDelegate extends IExecutableExtension { */ public Object write(Object context, Object container) throws IOException; + /** + * Writes the given list of context objects to the given persistence container. + * If the container does not exist yet, the class needs to be given. + * + * @param context The list of contexts to persist. Must not be <code>null</code>. + * @param container The persistence container or class for a new one. Must not be <code>null</code>. + * + * @return The new or updated container instance. + */ public Object writeList(Object[] context, Object container) throws IOException; /** @@ -43,13 +52,21 @@ public interface IPersistenceDelegate extends IExecutableExtension { * Reads the context from the given persistence container. * If the context does not exist yet, the class needs to be given. * - * @param context The context to update or class for a new context. Must not be <code>null</code>. + * @param context The context to update or class for a new context or <code>null</code>. * @param container The persistence container. Must not be <code>null</code>. * * @return The new or updated context instance. */ public Object read(Object context, Object container) throws IOException; + /** + * Reads a list of context objects from the given persistence container. + * + * @param contextClass The class type of the context objects to read or <code>null</code>. + * @param container The persistence container. Must not be <code>null</code>. + * + * @return The list of context objects. Might be empty. + */ public Object[] readList(Class<?> contextClass, Object container) throws IOException; /** |