SRJRCFrames
v0.1.296

de.schwarzrot.data.access.pref
Class PreferencesAccessor

java.lang.Object
  extended by de.schwarzrot.data.access.pref.PreferencesAccessor
All Implemented Interfaces:
DataAccessor

public class PreferencesAccessor
extends Object
implements DataAccessor

wrapper class to access values from preferences in an abstract way. This class is mainly used for read purpose, like the counterpart from jdbc: resultset.

It hides the fallback mechanism which first reads a value from user space and if no such value exists, it tries to fetch it from system space.

Author:
Reinhard Mantey

Constructor Summary
PreferencesAccessor(PreferencesManager pm, EntityDescriptor ed)
           
PreferencesAccessor(PreferencesManager prefsManager, EntityDescriptor ed, String subPath)
           
PreferencesAccessor(PreferencesManager prefsManager, String nodePath)
           
 
Method Summary
 void close()
          close the data container and free resources
 Collection<String> entryNames()
          returns a list of names, that are known by this data collection
 Object getHandle()
          returns a handle to the data
 Object getObject(String name)
          returns a value by name
 boolean hasData()
          returns true, if data is available, otherwise false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesAccessor

public PreferencesAccessor(PreferencesManager pm,
                           EntityDescriptor ed)

PreferencesAccessor

public PreferencesAccessor(PreferencesManager prefsManager,
                           EntityDescriptor ed,
                           String subPath)

PreferencesAccessor

public PreferencesAccessor(PreferencesManager prefsManager,
                           String nodePath)
Method Detail

close

public void close()
Description copied from interface: DataAccessor
close the data container and free resources

Specified by:
close in interface DataAccessor

entryNames

public Collection<String> entryNames()
Description copied from interface: DataAccessor
returns a list of names, that are known by this data collection

Specified by:
entryNames in interface DataAccessor
Returns:
- a list of names

getHandle

public Object getHandle()
Description copied from interface: DataAccessor
returns a handle to the data

Specified by:
getHandle in interface DataAccessor
Returns:
- a handle to the data

getObject

public Object getObject(String name)
Description copied from interface: DataAccessor
returns a value by name

Specified by:
getObject in interface DataAccessor
Parameters:
name - - name of the value
Returns:
- the value

hasData

public boolean hasData()
Description copied from interface: DataAccessor
returns true, if data is available, otherwise false

Specified by:
hasData in interface DataAccessor
Returns:
- true, if data is available, otherwise false

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.