com.mockrunner.mock.connector.cci
Class MockRecordFactory

java.lang.Object
  extended by com.mockrunner.mock.connector.cci.MockRecordFactory
All Implemented Interfaces:
javax.resource.cci.RecordFactory

public class MockRecordFactory
extends java.lang.Object
implements javax.resource.cci.RecordFactory

Mock implementation of RecordFactory.


Constructor Summary
MockRecordFactory()
           
 
Method Summary
 javax.resource.cci.IndexedRecord createIndexedRecord(java.lang.String recordName)
           
 javax.resource.cci.MappedRecord createMappedRecord(java.lang.String recordName)
           
 java.util.List getCreatedIndexedRecords()
          Returns a list of all created indexed records.
 java.util.List getCreatedIndexedRecords(java.lang.String recordName)
          Returns a list of created indexed records that match the specified name.
 java.util.List getCreatedMappedRecords()
          Returns a list of all created mapped records.
 java.util.List getCreatedMappedRecords(java.lang.String recordName)
          Returns a list of created mapped records that match the specified name.
 int getNumberCreatedIndexedRecords()
          Returns the number of created indexed records.
 int getNumberCreatedMappedRecords()
          Returns the number of created mapped records.
 void resetIndexedRecords()
          Resets the list of created indexed records.
 void resetMappedRecords()
          Resets the list of created mapped records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockRecordFactory

public MockRecordFactory()
Method Detail

resetIndexedRecords

public void resetIndexedRecords()
Resets the list of created indexed records.


resetMappedRecords

public void resetMappedRecords()
Resets the list of created mapped records.


getNumberCreatedIndexedRecords

public int getNumberCreatedIndexedRecords()
Returns the number of created indexed records.

Returns:
the number of created indexed records

getNumberCreatedMappedRecords

public int getNumberCreatedMappedRecords()
Returns the number of created mapped records.

Returns:
the number of created mapped records

getCreatedIndexedRecords

public java.util.List getCreatedIndexedRecords()
Returns a list of all created indexed records.

Returns:
the List of all created indexed records

getCreatedIndexedRecords

public java.util.List getCreatedIndexedRecords(java.lang.String recordName)
Returns a list of created indexed records that match the specified name.

Parameters:
recordName - the name of the record
Returns:
the List of matching indexed records

getCreatedMappedRecords

public java.util.List getCreatedMappedRecords()
Returns a list of all created mapped records.

Returns:
the List of all created mapped records

getCreatedMappedRecords

public java.util.List getCreatedMappedRecords(java.lang.String recordName)
Returns a list of created mapped records that match the specified name.

Parameters:
recordName - the name of the record
Returns:
the List of matching mapped records

createIndexedRecord

public javax.resource.cci.IndexedRecord createIndexedRecord(java.lang.String recordName)
                                                     throws javax.resource.ResourceException
Specified by:
createIndexedRecord in interface javax.resource.cci.RecordFactory
Throws:
javax.resource.ResourceException

createMappedRecord

public javax.resource.cci.MappedRecord createMappedRecord(java.lang.String recordName)
                                                   throws javax.resource.ResourceException
Specified by:
createMappedRecord in interface javax.resource.cci.RecordFactory
Throws:
javax.resource.ResourceException