Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java
new file mode 100644
index 0000000000..c81af9140b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Victor Roldan Betancort - initial API and implementation
+ */
+
+package org.eclipse.emf.cdo.server.internal.db4o;
+
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class DB4OCommitInfo
+{
+ private int branchID;
+
+ private long timeStamp;
+
+ private String userID;
+
+ private String comment;
+
+ public DB4OCommitInfo(int branchID, long timeStamp, String userID, String comment)
+ {
+ this.branchID = branchID;
+ this.timeStamp = timeStamp;
+ this.userID = userID;
+ this.comment = comment;
+ }
+
+ public int getBranchID()
+ {
+ return branchID;
+ }
+
+ public long getTimeStamp()
+ {
+ return timeStamp;
+ }
+
+ public void handle(InternalCDOBranchManager branchManager, InternalCDOCommitInfoManager manager,
+ CDOCommitInfoHandler handler)
+ {
+ InternalCDOBranch branch = branchManager.getBranch(branchID);
+ CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, userID, comment, null);
+ handler.handleCommitInfo(commitInfo);
+ }
+}

Back to the top