|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.persist.db.DatabaseFactoryImpl
org.opensubsystems.patterns.mappeddata.persist.db.MappingDatabaseFactory
public class MappingDatabaseFactory
Data factory to retrieve and manipulate mapping records in persistence store. Subsystems that want to create mappings should derive database factory class from this class. The only thing which is required is to implement constructor that provides database schema, that is able to provide database queries to this factory.
| Field Summary | |
|---|---|
protected MappingDatabaseSchema |
m_schema
Schema to use to execute database dependent operations. |
| Fields inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl |
|---|
m_connectionFactory, m_iConcurrencySelectListResultSet, m_iDataType, m_iTypeSelectListResultSet, m_transactionFactory |
| Constructor Summary | |
|---|---|
MappingDatabaseFactory(MappingDatabaseSchema schema)
Default constructor. |
|
| Method Summary | |
|---|---|
int |
create(java.util.Collection colDataObject)
|
org.opensubsystems.core.data.DataObject |
create(org.opensubsystems.core.data.DataObject data)
|
void |
create(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
Create mapping record. |
void |
delete(int iId,
int iDomainId)
|
void |
delete(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
Delete mapping record. |
org.opensubsystems.core.data.DataObject |
get(int iId,
int iDomainId)
|
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. |
org.opensubsystems.core.data.DataObject |
load(java.sql.ResultSet rsQueryResults,
int initialIndex)
|
org.opensubsystems.core.data.ModifiableDataObject |
save(org.opensubsystems.core.data.ModifiableDataObject data)
|
| Methods inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl |
|---|
getConcurrencySelectListResultSet, getDataType, getTypeSelectListResultSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensubsystems.core.persist.DataFactory |
|---|
getDataType |
| Field Detail |
|---|
protected MappingDatabaseSchema m_schema
| Constructor Detail |
|---|
public MappingDatabaseFactory(MappingDatabaseSchema schema)
throws org.opensubsystems.core.error.OSSException
schema - - schema to use by this factory to execute database dependent
operations
org.opensubsystems.core.error.OSSException - - an error has occured| Method Detail |
|---|
public void create(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
throws org.opensubsystems.core.error.OSSException
create in interface MappingFactorytisIDs - - 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
org.opensubsystems.core.error.OSSException - - error during create
public void delete(org.opensubsystems.core.util.ThreeIntStruct tisIDs)
throws org.opensubsystems.core.error.OSSException
delete in interface MappingFactorytisIDs - - 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
org.opensubsystems.core.error.OSSException - - error during delete
public int[] getMappedData(int iId,
int iMappingType)
throws org.opensubsystems.core.error.OSSException
getMappedData in interface MappingFactoryiId - - 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
org.opensubsystems.core.error.OSSException - - error during getting mapped data
public int[] getMappedData(java.lang.String strColumnIDs,
int iMappingType)
throws org.opensubsystems.core.error.OSSException
getMappedData in interface MappingFactorystrColumnIDs - - 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
org.opensubsystems.core.error.OSSException - - error during getting mapped data
public org.opensubsystems.core.data.DataObject load(java.sql.ResultSet rsQueryResults,
int initialIndex)
throws org.opensubsystems.core.error.OSSDatabaseAccessException
load in interface org.opensubsystems.core.persist.db.DatabaseFactoryorg.opensubsystems.core.error.OSSDatabaseAccessException
public org.opensubsystems.core.data.DataObject get(int iId,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
get in interface org.opensubsystems.core.persist.DataFactoryorg.opensubsystems.core.error.OSSException
public org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
throws org.opensubsystems.core.error.OSSException
create in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public int create(java.util.Collection colDataObject)
throws org.opensubsystems.core.error.OSSException
create in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public void delete(int iId,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
delete in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
throws org.opensubsystems.core.error.OSSException
save in interface org.opensubsystems.core.persist.ModifiableDataFactoryorg.opensubsystems.core.error.OSSException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||