org.nakedobjects.plugins.xml.objectstore.internal.data.xml
Class XmlDataManager

java.lang.Object
  extended by org.nakedobjects.plugins.xml.objectstore.internal.data.xml.XmlDataManager
All Implemented Interfaces:
DataManager

public class XmlDataManager
extends java.lang.Object
implements DataManager


Constructor Summary
XmlDataManager(XmlFile xmlFile)
           
 
Method Summary
 java.lang.String getDebugData()
           
 ObjectDataVector getInstances(ObjectData pattern)
          Return data for all instances that match the pattern.
 void insertObject(ObjectData data)
          Save the data for an object and adds the reference to a list of instances
 boolean isFixturesInstalled()
           
 Data loadData(SerialOid oid)
           
protected  boolean matchesPattern(ObjectData patternData, ObjectData candidateData)
          A helper that determines if two sets of data match.
protected  long nextId()
          Read in the next unique number for the object identifier.
 int numberOfInstances(ObjectData pattern)
          Return the number of instances that match the specified data
 void remove(SerialOid oid)
           
 void save(Data data)
          Save the data for latter retrieval.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDataManager

public XmlDataManager(XmlFile xmlFile)
Method Detail

shutdown

public void shutdown()
Specified by:
shutdown in interface DataManager

isFixturesInstalled

public boolean isFixturesInstalled()
Specified by:
isFixturesInstalled in interface DataManager

loadData

public Data loadData(SerialOid oid)
Specified by:
loadData in interface DataManager

getInstances

public ObjectDataVector getInstances(ObjectData pattern)
Description copied from interface: DataManager
Return data for all instances that match the pattern.

Specified by:
getInstances in interface DataManager

numberOfInstances

public int numberOfInstances(ObjectData pattern)
Description copied from interface: DataManager
Return the number of instances that match the specified data

Specified by:
numberOfInstances in interface DataManager

matchesPattern

protected boolean matchesPattern(ObjectData patternData,
                                 ObjectData candidateData)
A helper that determines if two sets of data match. A match occurs when the types are the same and any field in the pattern also occurs in the data set under test.


nextId

protected long nextId()
               throws PersistorException
Read in the next unique number for the object identifier.

Throws:
PersistorException

insertObject

public final void insertObject(ObjectData data)
Save the data for an object and adds the reference to a list of instances

Specified by:
insertObject in interface DataManager

remove

public final void remove(SerialOid oid)
                  throws ObjectNotFoundException,
                         ObjectPersistenceException
Specified by:
remove in interface DataManager
Throws:
ObjectNotFoundException
ObjectPersistenceException

save

public final void save(Data data)
Save the data for latter retrieval.

Specified by:
save in interface DataManager

getDebugData

public java.lang.String getDebugData()
Specified by:
getDebugData in interface DataManager


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.