systemic.sif.sbpframework.persist.dao
Class ObjectSyncInfoDAO

java.lang.Object
  extended by systemic.sif.sbpframework.persist.dao.BaseDAO
      extended by systemic.sif.sbpframework.persist.dao.ObjectSyncInfoDAO

public class ObjectSyncInfoDAO
extends BaseDAO

Author:
Joerg Huber

Constructor Summary
ObjectSyncInfoDAO()
           
 
Method Summary
 ObjectZoneSync retrieve(java.lang.String sifObjectName, java.lang.String agentId, java.lang.String zoneID)
          This method attempts to retrieve the ObjectZoneSync element for the given SIF Object and Zone ID.
 void save(ObjectZoneSync objectZoneSync)
          Saves the given ObjectZoneSync to the DB.
 
Methods inherited from class systemic.sif.sbpframework.persist.dao.BaseDAO
getCurrentSession, loadSubObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectSyncInfoDAO

public ObjectSyncInfoDAO()
Method Detail

retrieve

public ObjectZoneSync retrieve(java.lang.String sifObjectName,
                               java.lang.String agentId,
                               java.lang.String zoneID)
                        throws java.lang.IllegalArgumentException,
                               javax.persistence.PersistenceException
This method attempts to retrieve the ObjectZoneSync element for the given SIF Object and Zone ID. If it does not exist then null is returned.

Parameters:
sifObjectName - The name of the SIF Object for which the ObjectZoneSync info shall be returned.
zoneID - The Zone ID for which the ObjectZoneSync info shall be returned.
Returns:
The Object for the given SIF Object and Zone ID if it exists or null if it does not exist.
Throws:
IllegalArgumentException: - id is null.
PersistenceException: - There is an issue with the underlying database. An error is logged.
java.lang.IllegalArgumentException
javax.persistence.PersistenceException

save

public void save(ObjectZoneSync objectZoneSync)
          throws java.lang.IllegalArgumentException,
                 javax.persistence.PersistenceException
Saves the given ObjectZoneSync to the DB. If it exists it is updated otherwise it is created.

Parameters:
objectZoneSync - Object to persist to the DB.
Throws:
java.lang.IllegalArgumentException - objectZoneSync parameter is null.
javax.persistence.PersistenceException - A database error occurred.