View Javadoc
1   /*
2    * Tentackle - https://tentackle.org
3    *
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Lesser General Public
6    * License as published by the Free Software Foundation; either
7    * version 2.1 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Lesser General Public License for more details.
13   *
14   * You should have received a copy of the GNU Lesser General Public
15   * License along with this library; if not, write to the Free Software
16   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17   */
18  
19  package org.tentackle.dbms.prefs.trip;
20  
21  import org.tentackle.dbms.prefs.DbPreferences;
22  import org.tentackle.dbms.prefs.DbPreferencesFactory;
23  import org.tentackle.dbms.prefs.DbPreferencesOperation;
24  import org.tentackle.dbms.prefs.DbPreferencesOperation.RefreshInfo;
25  import org.tentackle.dbms.trip.AbstractDbOperationRemoteDelegateImpl;
26  import org.tentackle.dbms.trip.RemoteDbSessionImpl;
27  
28  /**
29   * Server-side implementation of the {@link DbPreferencesOperationRemoteDelegate}.
30   *
31   * @author harald
32   */
33  public class DbPreferencesOperationRemoteDelegateImpl
34         extends AbstractDbOperationRemoteDelegateImpl<DbPreferencesOperation>
35         implements DbPreferencesOperationRemoteDelegate {
36  
37    public DbPreferencesOperationRemoteDelegateImpl(RemoteDbSessionImpl serverSession,
38                                                    Class<DbPreferencesOperation> clazz) {
39      super(serverSession, clazz);
40    }
41  
42    @Override
43    public DbPreferences loadRootTree(String user, boolean forced) {
44      return dbOperation.loadRootTree(user, forced);
45    }
46  
47    @Override
48    public RefreshInfo loadRefreshInfo(String user, long serial) {
49      DbPreferences node = DbPreferencesFactory.getInstance().getRootTree(getSession(), user);
50      return dbOperation.loadRefreshInfo(node, serial);
51    }
52  
53    @Override
54    public boolean flush(DbPreferences node, boolean sync) {
55      return dbOperation.flush(node, sync, true);
56    }
57  
58  }