junitx.ddtunit.data.db
Class DbDataRestorer

java.lang.Object
  extended by junitx.ddtunit.data.db.DbDataRestorer
All Implemented Interfaces:
IDataSetSerializer

public class DbDataRestorer
extends Object
implements IDataSetSerializer


Constructor Summary
DbDataRestorer()
           
 
Method Summary
 StringBuffer createXml(String clusterId)
          Create xml testdata resource for specified clusterId.
 TypedObject getObject(String id, String type)
          Retrieve single object instance from database.
 TestClusterDataSet restore(String resource, String clusterId)
          Process xml resource specified by resource name and a special section of the xml resource specified by the classId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbDataRestorer

public DbDataRestorer()
Method Detail

restore

public TestClusterDataSet restore(String resource,
                                  String clusterId)
Description copied from interface: IDataSetSerializer
Process xml resource specified by resource name and a special section of the xml resource specified by the classId.
If the resource was allready processed nothing will be done.

Specified by:
restore in interface IDataSetSerializer
Parameters:
resource - to process
clusterId - to filter inside of the xml resource

createXml

public StringBuffer createXml(String clusterId)
Create xml testdata resource for specified clusterId.

Parameters:
clusterId - to create xml resource for
Returns:
StringBuffer representation of xml resource

getObject

public TypedObject getObject(String id,
                             String type)
Retrieve single object instance from database.

Parameters:
id - used to identify object
type - of object to retrieve
Returns:
TypedObject created by repository


Copyright © 2004-2011. All Rights Reserved.