diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IMappingStrategy.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IMappingStrategy.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IMappingStrategy.java new file mode 100644 index 0000000000..689a4847bd --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IMappingStrategy.java @@ -0,0 +1,51 @@ +/*************************************************************************** + * Copyright (c) 2004 - 2008 Eike Stepper, Germany. + * 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: + * Eike Stepper - initial API and implementation + **************************************************************************/ +package org.eclipse.emf.cdo.server.db; + +import org.eclipse.emf.cdo.common.id.CDOID; +import org.eclipse.emf.cdo.common.model.CDOClass; +import org.eclipse.emf.cdo.common.model.CDOClassRef; + +import org.eclipse.net4j.util.collection.CloseableIterator; + +import java.sql.Connection; +import java.util.Map; + +/** + * @author Eike Stepper + */ +public interface IMappingStrategy +{ + public String getType(); + + public IDBStore getStore(); + + public void setStore(IDBStore store); + + public Map<String, String> getProperties(); + + public void setProperties(Map<String, String> properties); + + public IClassMapping getClassMapping(CDOClass cdoClass); + + public CloseableIterator<CDOID> readObjectIDs(IDBStoreReader storeReader, boolean withTypes); + + public CDOClassRef readObjectType(IDBStoreReader storeReader, CDOID id); + + public CDOID readResourceID(IDBStoreReader storeReader, String path); + + public String readResourcePath(IDBStoreReader storeReader, CDOID id); + + /** + * Must return the maximum CDOID value . + */ + public long repairAfterCrash(Connection connection); +} |