org.opensubsystems.patterns.mappeddata.persist
Interface MappingFactory

All Superinterfaces:
org.opensubsystems.core.persist.BasicDataFactory, org.opensubsystems.core.persist.DataFactory, org.opensubsystems.core.persist.ModifiableDataFactory
All Known Implementing Classes:
MappingDatabaseFactory

public interface MappingFactory
extends org.opensubsystems.core.persist.ModifiableDataFactory

Methods to create and delete mapped data in the persistence store.

Version:
$Id: MappingFactory.java,v 1.10 2007/01/07 06:15:07 bastafidli Exp $
Author:
Julian Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/06/30 23:43:42 jlegeny

Method Summary
 void create(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
          Create mapping record.
 void delete(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
          Delete mapping record.
 int[] getMappedData(int iId, int iMappingType)
          Get array of mapped records for particular ID.
 int[] getMappedData(java.lang.String strColumnIDs, int iMappingType)
          Get array of mapped records for particular set of IDs.
 
Methods inherited from interface org.opensubsystems.core.persist.ModifiableDataFactory
save
 
Methods inherited from interface org.opensubsystems.core.persist.BasicDataFactory
create, create, delete
 
Methods inherited from interface org.opensubsystems.core.persist.DataFactory
get, getDataType
 

Method Detail

create

void create(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
            throws org.opensubsystems.core.error.OSSException
Create mapping record.

Parameters:
tisIDs - - IDs and mapping type that has to be added into mapping table 1st value = mapped ID from one table 2nd value = mapped ID from second table 3rd value = mapping type
Throws:
org.opensubsystems.core.error.OSSException - - error during create

delete

void delete(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
            throws org.opensubsystems.core.error.OSSException
Delete mapping record.

Parameters:
tisIDs - - IDs and mapping type that has to be deleted from mapping table 1st value = mapped ID from one table 2nd value = mapped ID from second table 3rd value = mapping type
Throws:
org.opensubsystems.core.error.OSSException - - error during delete

getMappedData

int[] getMappedData(int iId,
                    int iMappingType)
                    throws org.opensubsystems.core.error.OSSException
Get array of mapped records for particular ID.

Parameters:
iId - - Id of the first data object in relation for which we want to retrieve Ids of the second objects in relation. This is id1 specified during creation.
iMappingType - - mapping type the retrieved data belongs to
Returns:
int[] - array of ids of mapped data objects, these are id2 specified during creation.
Throws:
org.opensubsystems.core.error.OSSException - - error during getting mapped data

getMappedData

int[] getMappedData(java.lang.String strColumnIDs,
                    int iMappingType)
                    throws org.opensubsystems.core.error.OSSException
Get array of mapped records for particular set of IDs.

Parameters:
strColumnIDs - - string representation of IDs separated by ',' of the first data objects in relations for which we want to retrieve Ids of the second objects in relations. These are id1 specified during creation.
iMappingType - - mapping type the retrieved data belongs to
Returns:
int[] - array of ids of mapped data objects, these are id2 specified during creation.
Throws:
org.opensubsystems.core.error.OSSException - - error during getting mapped data


Copyright © 2003 - 2006 OpenSubsystems s.r.o.