local.tomas.mobile.sync.synchronizer.store.impl
Class JdbcSynchronizerStore

java.lang.Object
  extended by local.tomas.mobile.sync.synchronizer.store.impl.JdbcSynchronizerStore
All Implemented Interfaces:
SynchronizerStore

public class JdbcSynchronizerStore
extends java.lang.Object
implements SynchronizerStore


Constructor Summary
JdbcSynchronizerStore()
           
 
Method Summary
 void close()
           
 void commit()
           
 void deletePartnership(java.lang.String id)
           
 void deleteRecord(java.lang.String id)
           
 java.util.Collection<SyncPartnership> getAllPartnerships()
           
 java.util.Collection<SyncRecord> getAllRecords(java.lang.String partnershipId)
           
protected  java.lang.String[] getCreatePartnershipIndexes()
           
protected  java.lang.String getCreatePartnershipTable()
           
protected  java.lang.String[] getCreateRecordIndexes()
           
protected  java.lang.String getCreateRecordTable()
           
 javax.sql.DataSource getDataSource()
           
 SyncPartnership getPartnershipById(java.lang.String id)
           
 SyncPartnership getPartnershipByName(java.lang.String name, java.lang.String type)
           
protected  java.lang.String getPartnershipTableName()
           
protected  java.lang.String[] getPostCreate()
           
 SyncRecord getRecordByDesktopUID(java.lang.String partnershipId, java.lang.String uid)
           
 SyncRecord getRecordById(java.lang.String id)
           
 SyncRecord getRecordByMobileUID(java.lang.String partnershipId, java.lang.String uid)
           
protected  java.lang.String getRecordTableName()
           
 java.lang.String getTablePrefix()
           
 void init()
           
 void rollback()
           
 void savePartnership(SyncPartnership partnership)
           
 void saveRecord(SyncRecord record)
           
 void setDataSource(javax.sql.DataSource dataSource)
           
protected  void setRecord(SyncRecord record, java.sql.PreparedStatement stm)
           
 void setTablePrefix(java.lang.String tablePrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcSynchronizerStore

public JdbcSynchronizerStore()
Method Detail

getDataSource

public javax.sql.DataSource getDataSource()

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)

getTablePrefix

public java.lang.String getTablePrefix()

setTablePrefix

public void setTablePrefix(java.lang.String tablePrefix)

init

public void init()
          throws SynchronizerStoreException
Throws:
SynchronizerStoreException

close

public void close()

commit

public void commit()
            throws SynchronizerStoreException
Specified by:
commit in interface SynchronizerStore
Throws:
SynchronizerStoreException

rollback

public void rollback()
Specified by:
rollback in interface SynchronizerStore

getPartnershipTableName

protected java.lang.String getPartnershipTableName()

getRecordTableName

protected java.lang.String getRecordTableName()

getCreatePartnershipTable

protected java.lang.String getCreatePartnershipTable()

getCreatePartnershipIndexes

protected java.lang.String[] getCreatePartnershipIndexes()

getCreateRecordTable

protected java.lang.String getCreateRecordTable()

getCreateRecordIndexes

protected java.lang.String[] getCreateRecordIndexes()

getPostCreate

protected java.lang.String[] getPostCreate()

getPartnershipById

public SyncPartnership getPartnershipById(java.lang.String id)
                                   throws SynchronizerStoreException
Specified by:
getPartnershipById in interface SynchronizerStore
Throws:
SynchronizerStoreException

getPartnershipByName

public SyncPartnership getPartnershipByName(java.lang.String name,
                                            java.lang.String type)
                                     throws SynchronizerStoreException
Specified by:
getPartnershipByName in interface SynchronizerStore
Throws:
SynchronizerStoreException

savePartnership

public void savePartnership(SyncPartnership partnership)
                     throws SynchronizerStoreException
Specified by:
savePartnership in interface SynchronizerStore
Throws:
SynchronizerStoreException

getAllPartnerships

public java.util.Collection<SyncPartnership> getAllPartnerships()
                                                         throws SynchronizerStoreException
Specified by:
getAllPartnerships in interface SynchronizerStore
Throws:
SynchronizerStoreException

deletePartnership

public void deletePartnership(java.lang.String id)
                       throws SynchronizerStoreException
Specified by:
deletePartnership in interface SynchronizerStore
Throws:
SynchronizerStoreException

setRecord

protected void setRecord(SyncRecord record,
                         java.sql.PreparedStatement stm)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

getRecordById

public SyncRecord getRecordById(java.lang.String id)
                         throws SynchronizerStoreException
Specified by:
getRecordById in interface SynchronizerStore
Throws:
SynchronizerStoreException

getRecordByDesktopUID

public SyncRecord getRecordByDesktopUID(java.lang.String partnershipId,
                                        java.lang.String uid)
                                 throws SynchronizerStoreException
Specified by:
getRecordByDesktopUID in interface SynchronizerStore
Throws:
SynchronizerStoreException

getRecordByMobileUID

public SyncRecord getRecordByMobileUID(java.lang.String partnershipId,
                                       java.lang.String uid)
                                throws SynchronizerStoreException
Specified by:
getRecordByMobileUID in interface SynchronizerStore
Throws:
SynchronizerStoreException

saveRecord

public void saveRecord(SyncRecord record)
                throws SynchronizerStoreException
Specified by:
saveRecord in interface SynchronizerStore
Throws:
SynchronizerStoreException

getAllRecords

public java.util.Collection<SyncRecord> getAllRecords(java.lang.String partnershipId)
                                               throws SynchronizerStoreException
Specified by:
getAllRecords in interface SynchronizerStore
Throws:
SynchronizerStoreException

deleteRecord

public void deleteRecord(java.lang.String id)
                  throws SynchronizerStoreException
Specified by:
deleteRecord in interface SynchronizerStore
Throws:
SynchronizerStoreException


Copyright © 2007 null. All Rights Reserved.