com.kuka.nav.appdata
Interface AppData


public interface AppData

Provides application data operations.


Method Summary
 boolean contains(String identifier)
          Returns true if an entry exists for the specified identifier in the database.
 boolean delete(String identifier)
          Deletes the application data with the given identifier.
 Collection<AppDataInfo> getAllMetaData()
          List of meta datas of the stored entries.
 AppDataInfo getMetaData(String identifier)
          Getter for meta-info of an application data.
<T> T
load(String identifier, Class<T> type)
          Loads a copy of the stored object from the application data storage.
<T> void
save(String identifier, T object)
          Stores the application data persistently.
 

Method Detail

save

<T> void save(String identifier,
              T object)
          throws AppDataException
Stores the application data persistently. If there was an application data entry already stored with the given identifier, it will be overwritten with the new application data. Requirements for objects that should be stored:

Type Parameters:
T - the type of the data
Parameters:
identifier - the identifier which will provide access to the application data.
object - the object to be stored.
Throws:
AppDataException - if the saving was unsuccessful.

delete

boolean delete(String identifier)
Deletes the application data with the given identifier.

Parameters:
identifier - the identifier of the application data
Returns:
true if the deletion was successful, otherwise false.

load

<T> T load(String identifier,
           Class<T> type)
       throws AppDataException
Loads a copy of the stored object from the application data storage. See save(String, Object) for limitations on saveable objects.

Type Parameters:
T - the type of the application data
Parameters:
identifier - the identifier of the application data
type - the class representation of the application data e.g. MyData.class
Returns:
a copy of the stored object
Throws:
AppDataException - If there was an error during restoring the object or no application data exists with the given identifier.

getMetaData

AppDataInfo getMetaData(String identifier)
                        throws AppDataEntryNotFoundException
Getter for meta-info of an application data.

Parameters:
identifier - the identifier of the application data
Returns:
the meta-info of the given application data
Throws:
AppDataEntryNotFoundException - if an error happened during getting the meta-info of the application data or there is no application data with the given identifier.

getAllMetaData

Collection<AppDataInfo> getAllMetaData()
List of meta datas of the stored entries.

Returns:
the application meta information of each stored application data entry

contains

boolean contains(String identifier)
Returns true if an entry exists for the specified identifier in the database.

Parameters:
identifier - unique identifier for the entry
Returns:
true if there is a entry with the given identifier, otherwise false


Copyright © 2019. All rights reserved.