]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ServerInformationImpl.java
Merge "Save cluster sets only when creating DB snapshots"
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / ServerInformationImpl.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package fi.vtt.simantics.procore.internal;
13
14 import org.simantics.db.service.ServerInformation;
15
16 public class ServerInformationImpl implements ServerInformation {
17     final String serverId;
18     final String protocolId;
19     final String databaseId;
20     final long firstChangeSetId;
21
22     // TODO: get this from the server
23     // Default UTF-8
24     String characterSet = "UTF-8";
25
26     public ServerInformationImpl(String serverId, String protocolId, String databaseId, long firstChangeSetId) {
27         this.serverId = serverId;
28         this.protocolId = protocolId;
29         this.databaseId = databaseId;
30         this.firstChangeSetId = firstChangeSetId;
31     }
32
33     @Override
34     public String getServerId() {
35         return serverId;
36     }
37
38     @Override
39     public String getProtocolId() {
40         return protocolId;
41     }
42
43     @Override
44     public String getDatabaseId() {
45         return databaseId;
46     }
47
48     @Override
49     public long getFirstChangeSetId() {
50         return firstChangeSetId;
51     }
52
53     @Override
54     public String getCharacterSet() {
55         return characterSet;
56     }
57
58     @Override
59     public String toString() {
60         return "ServerInformation [server id=" + serverId + ", protocol id=" + protocolId + ", database id=" + databaseId + ", charset=" + characterSet + "]";
61     }
62 }