Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

EmptySyncNumberManagerDelegate.java

00001 /*
00002  *        OpenMobileIS - a free Java Framework for mobile applications
00003  *
00004  *   Copyright (C) 2004  Philippe Delrieu.
00005  *
00006  *   This program is free software; you can redistribute it and/or
00007  *   modify it under the terms of the GNU General Public
00008  *   License as published by the Free Software Foundation; either
00009  *   version 2 of the License, or (at your option) any later version.
00010  *
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *   General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU Library General Public
00017  *   License along with this library; if not, write to the Free
00018  *   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  * 
00020  * Philippe Delrieu kept the rigth to distribute all code Copyrighted by philippe Delrieu
00021  *  under other licence term even commercial one.
00022  *  
00023  *  Modifications :
00024  *  2004 Creation P.Delrieu
00025  * 
00026  */
00027 package org.openmobileis.synchro.algo.syncnumber.impl;
00028 
00029 import org.openmobileis.common.util.exception.ServiceException;
00030 import org.openmobileis.synchro.algo.syncnumber.SyncNumberManagerDelegate;
00031 import org.openmobileis.synchro.algo.syncnumber.SyncNumberNotFoundException;
00032 import org.openmobileis.synchro.algo.syncnumber.SynchroNumber;
00033 
00042 public final class EmptySyncNumberManagerDelegate implements SyncNumberManagerDelegate {
00043   private long syncnumber = 0;
00047   public EmptySyncNumberManagerDelegate() {
00048     super();
00049   }
00050 
00051   /* (non-Javadoc)
00052    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#setSyncNumberFactory(org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberQueryManager)
00053    */
00054   public void setSyncNumberFactory(SyncNumberQueryManager fac) {
00055   }
00056 
00057   /* (non-Javadoc)
00058    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#initDelegate()
00059    */
00060   public void initDelegate() {
00061   }
00062 
00063   /* (non-Javadoc)
00064    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#getSynchroNumber(long)
00065    */
00066   public SynchroNumber getSynchroNumber(long ns) throws SyncNumberNotFoundException {
00067     return new SynchroNumber(ns, 0);
00068   }
00069 
00070   /* (non-Javadoc)
00071    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#getNextSynchroNumber()
00072    */
00073   public SynchroNumber getNextSynchroNumber() throws SyncNumberNotFoundException {
00074     syncnumber +=1;
00075     return new SynchroNumber(syncnumber, syncnumber);
00076   }
00077 
00078   /* (non-Javadoc)
00079    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#deleteSyncNumber(org.openmobileis.commonserver.synchro.nsmanagement.SynchroNumber)
00080    */
00081   public void deleteSyncNumber(SynchroNumber ns) {
00082   }
00083 
00084   /* (non-Javadoc)
00085    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#createSynchroNumber(long, long)
00086    */
00087   public void createSynchroNumber(long ns, long timestamp) throws ServiceException {
00088   }
00089 
00090   /* (non-Javadoc)
00091    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#setTimeStampForSynchroNumber(long)
00092    */
00093   public void setTimeStampForSynchroNumber(long syncNumber) {
00094   }
00095 
00096   /* (non-Javadoc)
00097    * @see org.openmobileis.commonserver.synchro.nsmanagement.SyncNumberManagerDelegate#getTimeStampForSynchroNumber(long)
00098    */
00099   public long getTimeStampForSynchroNumber(long syncNumber) throws SyncNumberNotFoundException {
00100     return syncNumber;
00101   }
00102 
00103 }

Generated on Wed Dec 14 21:05:32 2005 for OpenMobileIS by  doxygen 1.4.4