All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bimserver.interfaces.SConverter Maven / Gradle / Ivy

There is a newer version: 1.5.9
Show newest version
package org.bimserver.interfaces;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.bimserver.BimserverDatabaseException;
import org.bimserver.database.DatabaseSession;
import org.bimserver.database.OldQuery;

/******************************************************************************
 * Copyright (C) 2009-2015  BIMserver.org
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see .
 *****************************************************************************/

import org.bimserver.emf.IdEObjectImpl;
import org.bimserver.interfaces.objects.*;
import org.bimserver.models.geometry.GeometryData;
import org.bimserver.models.geometry.GeometryFactory;
import org.bimserver.models.geometry.GeometryInfo;
import org.bimserver.models.geometry.GeometryPackage;
import org.bimserver.models.geometry.Vector3f;
import org.bimserver.models.log.AccessMethod;
import org.bimserver.models.log.CheckoutRelated;
import org.bimserver.models.log.DatabaseCreated;
import org.bimserver.models.log.Download;
import org.bimserver.models.log.ExtendedDataAddedToProject;
import org.bimserver.models.log.ExtendedDataAddedToRevision;
import org.bimserver.models.log.GeoTagUpdated;
import org.bimserver.models.log.LogAction;
import org.bimserver.models.log.LogFactory;
import org.bimserver.models.log.LogPackage;
import org.bimserver.models.log.NewCheckoutAdded;
import org.bimserver.models.log.NewObjectIDMUploaded;
import org.bimserver.models.log.NewProjectAdded;
import org.bimserver.models.log.NewRevisionAdded;
import org.bimserver.models.log.NewUserAdded;
import org.bimserver.models.log.PasswordChanged;
import org.bimserver.models.log.PasswordReset;
import org.bimserver.models.log.ProjectDeleted;
import org.bimserver.models.log.ProjectRelated;
import org.bimserver.models.log.ProjectUndeleted;
import org.bimserver.models.log.ProjectUpdated;
import org.bimserver.models.log.RemoteServiceCalled;
import org.bimserver.models.log.RevisionBranched;
import org.bimserver.models.log.RevisionRelated;
import org.bimserver.models.log.RevisionUpdated;
import org.bimserver.models.log.ServerLog;
import org.bimserver.models.log.ServerStarted;
import org.bimserver.models.log.SettingsSaved;
import org.bimserver.models.log.UserAddedToProject;
import org.bimserver.models.log.UserChanged;
import org.bimserver.models.log.UserDeleted;
import org.bimserver.models.log.UserRelated;
import org.bimserver.models.log.UserRemovedFromProject;
import org.bimserver.models.log.UserUndeleted;
import org.bimserver.models.store.*;

public class SConverter {

	public Set convertToSSetGeometryInfo(Collection input) {
		Set result = new HashSet();
		for (GeometryInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetGeometryInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SGeometryInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListGeometryInfo(Collection input) {
		List result = new ArrayList();
		for (GeometryInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListGeometryInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SGeometryInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SGeometryInfo convertToSObject(GeometryInfo input) {
		if (input == null) {
			return null;
		}
		
		SGeometryInfo result = new SGeometryInfo();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setStartVertex(input.getStartVertex());
		result.setStartIndex(input.getStartIndex());
		result.setPrimitiveCount(input.getPrimitiveCount());
		result.setTransformation(input.getTransformation());
		result.setArea(input.getArea());
		result.setVolume(input.getVolume());
		Vector3f minBoundsVal = input.getMinBounds();
		result.setMinBounds(convertToSObject(minBoundsVal));
		Vector3f maxBoundsVal = input.getMaxBounds();
		result.setMaxBounds(convertToSObject(maxBoundsVal));
		GeometryData dataVal = input.getData();
		result.setDataId(dataVal == null ? -1 : dataVal.getOid());
		return result;
	}
	public GeometryInfo convertFromSObject(SGeometryInfo input, DatabaseSession session) throws BimserverDatabaseException {
		GeometryInfo result = convertFromSObject(input, GeometryFactory.eINSTANCE.createGeometryInfo(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public GeometryInfo convertFromSObject(SGeometryInfo input, GeometryInfo result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setStartVertex(input.getStartVertex());
		result.setStartIndex(input.getStartIndex());
		result.setPrimitiveCount(input.getPrimitiveCount());
		result.setTransformation(input.getTransformation());
		result.setArea(input.getArea());
		result.setVolume(input.getVolume());
		result.setMinBounds(convertFromSObject(input.getMinBounds(), session));
		result.setMaxBounds(convertFromSObject(input.getMaxBounds(), session));
		result.setData((GeometryData)session.get(GeometryPackage.eINSTANCE.getGeometryData(), input.getDataId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetVector3f(Collection input) {
		Set result = new HashSet();
		for (Vector3f o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetVector3f(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SVector3f o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListVector3f(Collection input) {
		List result = new ArrayList();
		for (Vector3f o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListVector3f(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SVector3f o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SVector3f convertToSObject(Vector3f input) {
		if (input == null) {
			return null;
		}
		
		SVector3f result = new SVector3f();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setX(input.getX());
		result.setY(input.getY());
		result.setZ(input.getZ());
		return result;
	}
	public Vector3f convertFromSObject(SVector3f input, DatabaseSession session) throws BimserverDatabaseException {
		Vector3f result = convertFromSObject(input, GeometryFactory.eINSTANCE.createVector3f(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Vector3f convertFromSObject(SVector3f input, Vector3f result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setX(input.getX());
		result.setY(input.getY());
		result.setZ(input.getZ());
		return result;
	}

	public Set convertToSSetGeometryData(Collection input) {
		Set result = new HashSet();
		for (GeometryData o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetGeometryData(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SGeometryData o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListGeometryData(Collection input) {
		List result = new ArrayList();
		for (GeometryData o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListGeometryData(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SGeometryData o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SGeometryData convertToSObject(GeometryData input) {
		if (input == null) {
			return null;
		}
		
		SGeometryData result = new SGeometryData();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setIndices(input.getIndices());
		result.setVertices(input.getVertices());
		result.setNormals(input.getNormals());
		result.setMaterials(input.getMaterials());
		result.setMaterialIndices(input.getMaterialIndices());
		return result;
	}
	public GeometryData convertFromSObject(SGeometryData input, DatabaseSession session) throws BimserverDatabaseException {
		GeometryData result = convertFromSObject(input, GeometryFactory.eINSTANCE.createGeometryData(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public GeometryData convertFromSObject(SGeometryData input, GeometryData result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setIndices(input.getIndices());
		result.setVertices(input.getVertices());
		result.setNormals(input.getNormals());
		result.setMaterials(input.getMaterials());
		result.setMaterialIndices(input.getMaterialIndices());
		return result;
	}
		public SAccessMethod convertToSObject(AccessMethod input) {
			return SAccessMethod.values()[input.ordinal()];
		}
		
		public AccessMethod convertFromSObject(SAccessMethod input) {
			return AccessMethod.values()[input.ordinal()];
		}

	public Set convertToSSetLogAction(Collection input) {
		Set result = new HashSet();
		for (LogAction o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetLogAction(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SLogAction o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListLogAction(Collection input) {
		List result = new ArrayList();
		for (LogAction o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListLogAction(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SLogAction o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SLogAction convertToSObject(LogAction input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ExtendedDataAddedToProject) {
			return convertToSObject((ExtendedDataAddedToProject)input);
		}
		else if (input instanceof ServerStarted) {
			return convertToSObject((ServerStarted)input);
		}
		else if (input instanceof ExtendedDataAddedToRevision) {
			return convertToSObject((ExtendedDataAddedToRevision)input);
		}
		else if (input instanceof ProjectRelated) {
			return convertToSObject((ProjectRelated)input);
		}
		else if (input instanceof CheckoutRelated) {
			return convertToSObject((CheckoutRelated)input);
		}
		else if (input instanceof NewObjectIDMUploaded) {
			return convertToSObject((NewObjectIDMUploaded)input);
		}
		else if (input instanceof RevisionRelated) {
			return convertToSObject((RevisionRelated)input);
		}
		else if (input instanceof DatabaseCreated) {
			return convertToSObject((DatabaseCreated)input);
		}
		else if (input instanceof RevisionBranched) {
			return convertToSObject((RevisionBranched)input);
		}
		else if (input instanceof GeoTagUpdated) {
			return convertToSObject((GeoTagUpdated)input);
		}
		else if (input instanceof RemoteServiceCalled) {
			return convertToSObject((RemoteServiceCalled)input);
		}
		else if (input instanceof UserRelated) {
			return convertToSObject((UserRelated)input);
		}
		else if (input instanceof SettingsSaved) {
			return convertToSObject((SettingsSaved)input);
		}
		else if (input instanceof Download) {
			return convertToSObject((Download)input);
		}
		SLogAction result = new SLogAction();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public LogAction convertFromSObject(SLogAction input, DatabaseSession session) throws BimserverDatabaseException {
		LogAction result = convertFromSObject(input, LogFactory.eINSTANCE.createLogAction(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public LogAction convertFromSObject(SLogAction input, LogAction result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SExtendedDataAddedToProject) {
			return convertFromSObject((SExtendedDataAddedToProject)input, session);
		}
		else if (input instanceof SServerStarted) {
			return convertFromSObject((SServerStarted)input, session);
		}
		else if (input instanceof SExtendedDataAddedToRevision) {
			return convertFromSObject((SExtendedDataAddedToRevision)input, session);
		}
		else if (input instanceof SProjectRelated) {
			return convertFromSObject((SProjectRelated)input, session);
		}
		else if (input instanceof SCheckoutRelated) {
			return convertFromSObject((SCheckoutRelated)input, session);
		}
		else if (input instanceof SNewObjectIDMUploaded) {
			return convertFromSObject((SNewObjectIDMUploaded)input, session);
		}
		else if (input instanceof SRevisionRelated) {
			return convertFromSObject((SRevisionRelated)input, session);
		}
		else if (input instanceof SDatabaseCreated) {
			return convertFromSObject((SDatabaseCreated)input, session);
		}
		else if (input instanceof SRevisionBranched) {
			return convertFromSObject((SRevisionBranched)input, session);
		}
		else if (input instanceof SGeoTagUpdated) {
			return convertFromSObject((SGeoTagUpdated)input, session);
		}
		else if (input instanceof SRemoteServiceCalled) {
			return convertFromSObject((SRemoteServiceCalled)input, session);
		}
		else if (input instanceof SUserRelated) {
			return convertFromSObject((SUserRelated)input, session);
		}
		else if (input instanceof SSettingsSaved) {
			return convertFromSObject((SSettingsSaved)input, session);
		}
		else if (input instanceof SDownload) {
			return convertFromSObject((SDownload)input, session);
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetServerLog(Collection input) {
		Set result = new HashSet();
		for (ServerLog o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServerLog(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServerLog o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServerLog(Collection input) {
		List result = new ArrayList();
		for (ServerLog o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServerLog(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServerLog o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServerLog convertToSObject(ServerLog input) {
		if (input == null) {
			return null;
		}
		
		SServerLog result = new SServerLog();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listactions = new ArrayList();
		for (LogAction v : input.getActions()) {
			listactions.add(v.getOid());
		}
		result.setActions(listactions);
		return result;
	}
	public ServerLog convertFromSObject(SServerLog input, DatabaseSession session) throws BimserverDatabaseException {
		ServerLog result = convertFromSObject(input, LogFactory.eINSTANCE.createServerLog(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServerLog convertFromSObject(SServerLog input, ServerLog result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listactions = result.getActions();
		for (long oid : input.getActions()) {
			listactions.add((LogAction)session.get(LogPackage.eINSTANCE.getLogAction(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetProjectRelated(Collection input) {
		Set result = new HashSet();
		for (ProjectRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProjectRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProjectRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProjectRelated(Collection input) {
		List result = new ArrayList();
		for (ProjectRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProjectRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProjectRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProjectRelated convertToSObject(ProjectRelated input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ProjectDeleted) {
			return convertToSObject((ProjectDeleted)input);
		}
		else if (input instanceof ProjectUndeleted) {
			return convertToSObject((ProjectUndeleted)input);
		}
		else if (input instanceof ProjectUpdated) {
			return convertToSObject((ProjectUpdated)input);
		}
		else if (input instanceof NewProjectAdded) {
			return convertToSObject((NewProjectAdded)input);
		}
		SProjectRelated result = new SProjectRelated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public ProjectRelated convertFromSObject(SProjectRelated input, DatabaseSession session) throws BimserverDatabaseException {
		ProjectRelated result = convertFromSObject(input, LogFactory.eINSTANCE.createProjectRelated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ProjectRelated convertFromSObject(SProjectRelated input, ProjectRelated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SProjectDeleted) {
			return convertFromSObject((SProjectDeleted)input, session);
		}
		else if (input instanceof SProjectUndeleted) {
			return convertFromSObject((SProjectUndeleted)input, session);
		}
		else if (input instanceof SProjectUpdated) {
			return convertFromSObject((SProjectUpdated)input, session);
		}
		else if (input instanceof SNewProjectAdded) {
			return convertFromSObject((SNewProjectAdded)input, session);
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetCheckoutRelated(Collection input) {
		Set result = new HashSet();
		for (CheckoutRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCheckoutRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCheckoutRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCheckoutRelated(Collection input) {
		List result = new ArrayList();
		for (CheckoutRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCheckoutRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCheckoutRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCheckoutRelated convertToSObject(CheckoutRelated input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof NewCheckoutAdded) {
			return convertToSObject((NewCheckoutAdded)input);
		}
		SCheckoutRelated result = new SCheckoutRelated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Checkout checkoutVal = input.getCheckout();
		result.setCheckoutId(checkoutVal == null ? -1 : checkoutVal.getOid());
		return result;
	}
	public CheckoutRelated convertFromSObject(SCheckoutRelated input, DatabaseSession session) throws BimserverDatabaseException {
		CheckoutRelated result = convertFromSObject(input, LogFactory.eINSTANCE.createCheckoutRelated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public CheckoutRelated convertFromSObject(SCheckoutRelated input, CheckoutRelated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SNewCheckoutAdded) {
			return convertFromSObject((SNewCheckoutAdded)input, session);
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setCheckout((Checkout)session.get(StorePackage.eINSTANCE.getCheckout(), input.getCheckoutId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetRevisionRelated(Collection input) {
		Set result = new HashSet();
		for (RevisionRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionRelated(Collection input) {
		List result = new ArrayList();
		for (RevisionRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionRelated convertToSObject(RevisionRelated input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof RevisionUpdated) {
			return convertToSObject((RevisionUpdated)input);
		}
		else if (input instanceof NewRevisionAdded) {
			return convertToSObject((NewRevisionAdded)input);
		}
		SRevisionRelated result = new SRevisionRelated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevisionId(revisionVal == null ? -1 : revisionVal.getOid());
		return result;
	}
	public RevisionRelated convertFromSObject(SRevisionRelated input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionRelated result = convertFromSObject(input, LogFactory.eINSTANCE.createRevisionRelated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionRelated convertFromSObject(SRevisionRelated input, RevisionRelated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SRevisionUpdated) {
			return convertFromSObject((SRevisionUpdated)input, session);
		}
		else if (input instanceof SNewRevisionAdded) {
			return convertFromSObject((SNewRevisionAdded)input, session);
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getRevisionId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserRelated(Collection input) {
		Set result = new HashSet();
		for (UserRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserRelated(Collection input) {
		List result = new ArrayList();
		for (UserRelated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserRelated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserRelated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserRelated convertToSObject(UserRelated input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof UserAddedToProject) {
			return convertToSObject((UserAddedToProject)input);
		}
		else if (input instanceof UserDeleted) {
			return convertToSObject((UserDeleted)input);
		}
		else if (input instanceof NewUserAdded) {
			return convertToSObject((NewUserAdded)input);
		}
		else if (input instanceof PasswordChanged) {
			return convertToSObject((PasswordChanged)input);
		}
		else if (input instanceof PasswordReset) {
			return convertToSObject((PasswordReset)input);
		}
		else if (input instanceof UserChanged) {
			return convertToSObject((UserChanged)input);
		}
		else if (input instanceof UserUndeleted) {
			return convertToSObject((UserUndeleted)input);
		}
		else if (input instanceof UserRemovedFromProject) {
			return convertToSObject((UserRemovedFromProject)input);
		}
		SUserRelated result = new SUserRelated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public UserRelated convertFromSObject(SUserRelated input, DatabaseSession session) throws BimserverDatabaseException {
		UserRelated result = convertFromSObject(input, LogFactory.eINSTANCE.createUserRelated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserRelated convertFromSObject(SUserRelated input, UserRelated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SUserAddedToProject) {
			return convertFromSObject((SUserAddedToProject)input, session);
		}
		else if (input instanceof SUserDeleted) {
			return convertFromSObject((SUserDeleted)input, session);
		}
		else if (input instanceof SNewUserAdded) {
			return convertFromSObject((SNewUserAdded)input, session);
		}
		else if (input instanceof SPasswordChanged) {
			return convertFromSObject((SPasswordChanged)input, session);
		}
		else if (input instanceof SPasswordReset) {
			return convertFromSObject((SPasswordReset)input, session);
		}
		else if (input instanceof SUserChanged) {
			return convertFromSObject((SUserChanged)input, session);
		}
		else if (input instanceof SUserUndeleted) {
			return convertFromSObject((SUserUndeleted)input, session);
		}
		else if (input instanceof SUserRemovedFromProject) {
			return convertFromSObject((SUserRemovedFromProject)input, session);
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetNewUserAdded(Collection input) {
		Set result = new HashSet();
		for (NewUserAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetNewUserAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SNewUserAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListNewUserAdded(Collection input) {
		List result = new ArrayList();
		for (NewUserAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListNewUserAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SNewUserAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SNewUserAdded convertToSObject(NewUserAdded input) {
		if (input == null) {
			return null;
		}
		
		SNewUserAdded result = new SNewUserAdded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public NewUserAdded convertFromSObject(SNewUserAdded input, DatabaseSession session) throws BimserverDatabaseException {
		NewUserAdded result = convertFromSObject(input, LogFactory.eINSTANCE.createNewUserAdded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public NewUserAdded convertFromSObject(SNewUserAdded input, NewUserAdded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetNewProjectAdded(Collection input) {
		Set result = new HashSet();
		for (NewProjectAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetNewProjectAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SNewProjectAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListNewProjectAdded(Collection input) {
		List result = new ArrayList();
		for (NewProjectAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListNewProjectAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SNewProjectAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SNewProjectAdded convertToSObject(NewProjectAdded input) {
		if (input == null) {
			return null;
		}
		
		SNewProjectAdded result = new SNewProjectAdded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		Project parentProjectVal = input.getParentProject();
		result.setParentProjectId(parentProjectVal == null ? -1 : parentProjectVal.getOid());
		return result;
	}
	public NewProjectAdded convertFromSObject(SNewProjectAdded input, DatabaseSession session) throws BimserverDatabaseException {
		NewProjectAdded result = convertFromSObject(input, LogFactory.eINSTANCE.createNewProjectAdded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public NewProjectAdded convertFromSObject(SNewProjectAdded input, NewProjectAdded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		result.setParentProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getParentProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetRevisionBranched(Collection input) {
		Set result = new HashSet();
		for (RevisionBranched o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionBranched(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionBranched o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionBranched(Collection input) {
		List result = new ArrayList();
		for (RevisionBranched o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionBranched(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionBranched o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionBranched convertToSObject(RevisionBranched input) {
		if (input == null) {
			return null;
		}
		
		SRevisionBranched result = new SRevisionBranched();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Revision oldrevisionVal = input.getOldrevision();
		result.setOldrevisionId(oldrevisionVal == null ? -1 : oldrevisionVal.getOid());
		Revision newrevisionVal = input.getNewrevision();
		result.setNewrevisionId(newrevisionVal == null ? -1 : newrevisionVal.getOid());
		return result;
	}
	public RevisionBranched convertFromSObject(SRevisionBranched input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionBranched result = convertFromSObject(input, LogFactory.eINSTANCE.createRevisionBranched(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionBranched convertFromSObject(SRevisionBranched input, RevisionBranched result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setOldrevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getOldrevisionId(), OldQuery.getDefault()));
		result.setNewrevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getNewrevisionId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetNewRevisionAdded(Collection input) {
		Set result = new HashSet();
		for (NewRevisionAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetNewRevisionAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SNewRevisionAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListNewRevisionAdded(Collection input) {
		List result = new ArrayList();
		for (NewRevisionAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListNewRevisionAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SNewRevisionAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SNewRevisionAdded convertToSObject(NewRevisionAdded input) {
		if (input == null) {
			return null;
		}
		
		SNewRevisionAdded result = new SNewRevisionAdded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevisionId(revisionVal == null ? -1 : revisionVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public NewRevisionAdded convertFromSObject(SNewRevisionAdded input, DatabaseSession session) throws BimserverDatabaseException {
		NewRevisionAdded result = convertFromSObject(input, LogFactory.eINSTANCE.createNewRevisionAdded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public NewRevisionAdded convertFromSObject(SNewRevisionAdded input, NewRevisionAdded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getRevisionId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetNewCheckoutAdded(Collection input) {
		Set result = new HashSet();
		for (NewCheckoutAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetNewCheckoutAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SNewCheckoutAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListNewCheckoutAdded(Collection input) {
		List result = new ArrayList();
		for (NewCheckoutAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListNewCheckoutAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SNewCheckoutAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SNewCheckoutAdded convertToSObject(NewCheckoutAdded input) {
		if (input == null) {
			return null;
		}
		
		SNewCheckoutAdded result = new SNewCheckoutAdded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Checkout checkoutVal = input.getCheckout();
		result.setCheckoutId(checkoutVal == null ? -1 : checkoutVal.getOid());
		return result;
	}
	public NewCheckoutAdded convertFromSObject(SNewCheckoutAdded input, DatabaseSession session) throws BimserverDatabaseException {
		NewCheckoutAdded result = convertFromSObject(input, LogFactory.eINSTANCE.createNewCheckoutAdded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public NewCheckoutAdded convertFromSObject(SNewCheckoutAdded input, NewCheckoutAdded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setCheckout((Checkout)session.get(StorePackage.eINSTANCE.getCheckout(), input.getCheckoutId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetSettingsSaved(Collection input) {
		Set result = new HashSet();
		for (SettingsSaved o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetSettingsSaved(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SSettingsSaved o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListSettingsSaved(Collection input) {
		List result = new ArrayList();
		for (SettingsSaved o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListSettingsSaved(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SSettingsSaved o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SSettingsSaved convertToSObject(SettingsSaved input) {
		if (input == null) {
			return null;
		}
		
		SSettingsSaved result = new SSettingsSaved();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public SettingsSaved convertFromSObject(SSettingsSaved input, DatabaseSession session) throws BimserverDatabaseException {
		SettingsSaved result = convertFromSObject(input, LogFactory.eINSTANCE.createSettingsSaved(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public SettingsSaved convertFromSObject(SSettingsSaved input, SettingsSaved result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserAddedToProject(Collection input) {
		Set result = new HashSet();
		for (UserAddedToProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserAddedToProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserAddedToProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserAddedToProject(Collection input) {
		List result = new ArrayList();
		for (UserAddedToProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserAddedToProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserAddedToProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserAddedToProject convertToSObject(UserAddedToProject input) {
		if (input == null) {
			return null;
		}
		
		SUserAddedToProject result = new SUserAddedToProject();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public UserAddedToProject convertFromSObject(SUserAddedToProject input, DatabaseSession session) throws BimserverDatabaseException {
		UserAddedToProject result = convertFromSObject(input, LogFactory.eINSTANCE.createUserAddedToProject(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserAddedToProject convertFromSObject(SUserAddedToProject input, UserAddedToProject result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetNewObjectIDMUploaded(Collection input) {
		Set result = new HashSet();
		for (NewObjectIDMUploaded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetNewObjectIDMUploaded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SNewObjectIDMUploaded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListNewObjectIDMUploaded(Collection input) {
		List result = new ArrayList();
		for (NewObjectIDMUploaded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListNewObjectIDMUploaded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SNewObjectIDMUploaded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SNewObjectIDMUploaded convertToSObject(NewObjectIDMUploaded input) {
		if (input == null) {
			return null;
		}
		
		SNewObjectIDMUploaded result = new SNewObjectIDMUploaded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public NewObjectIDMUploaded convertFromSObject(SNewObjectIDMUploaded input, DatabaseSession session) throws BimserverDatabaseException {
		NewObjectIDMUploaded result = convertFromSObject(input, LogFactory.eINSTANCE.createNewObjectIDMUploaded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public NewObjectIDMUploaded convertFromSObject(SNewObjectIDMUploaded input, NewObjectIDMUploaded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetDownload(Collection input) {
		Set result = new HashSet();
		for (Download o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDownload(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDownload o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDownload(Collection input) {
		List result = new ArrayList();
		for (Download o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDownload(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDownload o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDownload convertToSObject(Download input) {
		if (input == null) {
			return null;
		}
		
		SDownload result = new SDownload();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public Download convertFromSObject(SDownload input, DatabaseSession session) throws BimserverDatabaseException {
		Download result = convertFromSObject(input, LogFactory.eINSTANCE.createDownload(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Download convertFromSObject(SDownload input, Download result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserRemovedFromProject(Collection input) {
		Set result = new HashSet();
		for (UserRemovedFromProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserRemovedFromProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserRemovedFromProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserRemovedFromProject(Collection input) {
		List result = new ArrayList();
		for (UserRemovedFromProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserRemovedFromProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserRemovedFromProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserRemovedFromProject convertToSObject(UserRemovedFromProject input) {
		if (input == null) {
			return null;
		}
		
		SUserRemovedFromProject result = new SUserRemovedFromProject();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public UserRemovedFromProject convertFromSObject(SUserRemovedFromProject input, DatabaseSession session) throws BimserverDatabaseException {
		UserRemovedFromProject result = convertFromSObject(input, LogFactory.eINSTANCE.createUserRemovedFromProject(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserRemovedFromProject convertFromSObject(SUserRemovedFromProject input, UserRemovedFromProject result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetProjectDeleted(Collection input) {
		Set result = new HashSet();
		for (ProjectDeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProjectDeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProjectDeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProjectDeleted(Collection input) {
		List result = new ArrayList();
		for (ProjectDeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProjectDeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProjectDeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProjectDeleted convertToSObject(ProjectDeleted input) {
		if (input == null) {
			return null;
		}
		
		SProjectDeleted result = new SProjectDeleted();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public ProjectDeleted convertFromSObject(SProjectDeleted input, DatabaseSession session) throws BimserverDatabaseException {
		ProjectDeleted result = convertFromSObject(input, LogFactory.eINSTANCE.createProjectDeleted(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ProjectDeleted convertFromSObject(SProjectDeleted input, ProjectDeleted result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserDeleted(Collection input) {
		Set result = new HashSet();
		for (UserDeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserDeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserDeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserDeleted(Collection input) {
		List result = new ArrayList();
		for (UserDeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserDeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserDeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserDeleted convertToSObject(UserDeleted input) {
		if (input == null) {
			return null;
		}
		
		SUserDeleted result = new SUserDeleted();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public UserDeleted convertFromSObject(SUserDeleted input, DatabaseSession session) throws BimserverDatabaseException {
		UserDeleted result = convertFromSObject(input, LogFactory.eINSTANCE.createUserDeleted(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserDeleted convertFromSObject(SUserDeleted input, UserDeleted result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetPasswordReset(Collection input) {
		Set result = new HashSet();
		for (PasswordReset o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPasswordReset(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPasswordReset o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPasswordReset(Collection input) {
		List result = new ArrayList();
		for (PasswordReset o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPasswordReset(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPasswordReset o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPasswordReset convertToSObject(PasswordReset input) {
		if (input == null) {
			return null;
		}
		
		SPasswordReset result = new SPasswordReset();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public PasswordReset convertFromSObject(SPasswordReset input, DatabaseSession session) throws BimserverDatabaseException {
		PasswordReset result = convertFromSObject(input, LogFactory.eINSTANCE.createPasswordReset(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PasswordReset convertFromSObject(SPasswordReset input, PasswordReset result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetDatabaseCreated(Collection input) {
		Set result = new HashSet();
		for (DatabaseCreated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDatabaseCreated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDatabaseCreated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDatabaseCreated(Collection input) {
		List result = new ArrayList();
		for (DatabaseCreated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDatabaseCreated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDatabaseCreated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDatabaseCreated convertToSObject(DatabaseCreated input) {
		if (input == null) {
			return null;
		}
		
		SDatabaseCreated result = new SDatabaseCreated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setPath(input.getPath());
		result.setVersion(input.getVersion());
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public DatabaseCreated convertFromSObject(SDatabaseCreated input, DatabaseSession session) throws BimserverDatabaseException {
		DatabaseCreated result = convertFromSObject(input, LogFactory.eINSTANCE.createDatabaseCreated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DatabaseCreated convertFromSObject(SDatabaseCreated input, DatabaseCreated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setPath(input.getPath());
		result.setVersion(input.getVersion());
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetServerStarted(Collection input) {
		Set result = new HashSet();
		for (ServerStarted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServerStarted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServerStarted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServerStarted(Collection input) {
		List result = new ArrayList();
		for (ServerStarted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServerStarted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServerStarted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServerStarted convertToSObject(ServerStarted input) {
		if (input == null) {
			return null;
		}
		
		SServerStarted result = new SServerStarted();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		return result;
	}
	public ServerStarted convertFromSObject(SServerStarted input, DatabaseSession session) throws BimserverDatabaseException {
		ServerStarted result = convertFromSObject(input, LogFactory.eINSTANCE.createServerStarted(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServerStarted convertFromSObject(SServerStarted input, ServerStarted result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetProjectUpdated(Collection input) {
		Set result = new HashSet();
		for (ProjectUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProjectUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProjectUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProjectUpdated(Collection input) {
		List result = new ArrayList();
		for (ProjectUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProjectUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProjectUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProjectUpdated convertToSObject(ProjectUpdated input) {
		if (input == null) {
			return null;
		}
		
		SProjectUpdated result = new SProjectUpdated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public ProjectUpdated convertFromSObject(SProjectUpdated input, DatabaseSession session) throws BimserverDatabaseException {
		ProjectUpdated result = convertFromSObject(input, LogFactory.eINSTANCE.createProjectUpdated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ProjectUpdated convertFromSObject(SProjectUpdated input, ProjectUpdated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserUndeleted(Collection input) {
		Set result = new HashSet();
		for (UserUndeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserUndeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserUndeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserUndeleted(Collection input) {
		List result = new ArrayList();
		for (UserUndeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserUndeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserUndeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserUndeleted convertToSObject(UserUndeleted input) {
		if (input == null) {
			return null;
		}
		
		SUserUndeleted result = new SUserUndeleted();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public UserUndeleted convertFromSObject(SUserUndeleted input, DatabaseSession session) throws BimserverDatabaseException {
		UserUndeleted result = convertFromSObject(input, LogFactory.eINSTANCE.createUserUndeleted(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserUndeleted convertFromSObject(SUserUndeleted input, UserUndeleted result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetProjectUndeleted(Collection input) {
		Set result = new HashSet();
		for (ProjectUndeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProjectUndeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProjectUndeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProjectUndeleted(Collection input) {
		List result = new ArrayList();
		for (ProjectUndeleted o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProjectUndeleted(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProjectUndeleted o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProjectUndeleted convertToSObject(ProjectUndeleted input) {
		if (input == null) {
			return null;
		}
		
		SProjectUndeleted result = new SProjectUndeleted();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public ProjectUndeleted convertFromSObject(SProjectUndeleted input, DatabaseSession session) throws BimserverDatabaseException {
		ProjectUndeleted result = convertFromSObject(input, LogFactory.eINSTANCE.createProjectUndeleted(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ProjectUndeleted convertFromSObject(SProjectUndeleted input, ProjectUndeleted result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetRevisionUpdated(Collection input) {
		Set result = new HashSet();
		for (RevisionUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionUpdated(Collection input) {
		List result = new ArrayList();
		for (RevisionUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionUpdated convertToSObject(RevisionUpdated input) {
		if (input == null) {
			return null;
		}
		
		SRevisionUpdated result = new SRevisionUpdated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevisionId(revisionVal == null ? -1 : revisionVal.getOid());
		return result;
	}
	public RevisionUpdated convertFromSObject(SRevisionUpdated input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionUpdated result = convertFromSObject(input, LogFactory.eINSTANCE.createRevisionUpdated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionUpdated convertFromSObject(SRevisionUpdated input, RevisionUpdated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getRevisionId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetGeoTagUpdated(Collection input) {
		Set result = new HashSet();
		for (GeoTagUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetGeoTagUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SGeoTagUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListGeoTagUpdated(Collection input) {
		List result = new ArrayList();
		for (GeoTagUpdated o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListGeoTagUpdated(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SGeoTagUpdated o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SGeoTagUpdated convertToSObject(GeoTagUpdated input) {
		if (input == null) {
			return null;
		}
		
		SGeoTagUpdated result = new SGeoTagUpdated();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		GeoTag geoTagVal = input.getGeoTag();
		result.setGeoTagId(geoTagVal == null ? -1 : geoTagVal.getOid());
		return result;
	}
	public GeoTagUpdated convertFromSObject(SGeoTagUpdated input, DatabaseSession session) throws BimserverDatabaseException {
		GeoTagUpdated result = convertFromSObject(input, LogFactory.eINSTANCE.createGeoTagUpdated(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public GeoTagUpdated convertFromSObject(SGeoTagUpdated input, GeoTagUpdated result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setGeoTag((GeoTag)session.get(StorePackage.eINSTANCE.getGeoTag(), input.getGeoTagId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetPasswordChanged(Collection input) {
		Set result = new HashSet();
		for (PasswordChanged o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPasswordChanged(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPasswordChanged o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPasswordChanged(Collection input) {
		List result = new ArrayList();
		for (PasswordChanged o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPasswordChanged(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPasswordChanged o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPasswordChanged convertToSObject(PasswordChanged input) {
		if (input == null) {
			return null;
		}
		
		SPasswordChanged result = new SPasswordChanged();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public PasswordChanged convertFromSObject(SPasswordChanged input, DatabaseSession session) throws BimserverDatabaseException {
		PasswordChanged result = convertFromSObject(input, LogFactory.eINSTANCE.createPasswordChanged(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PasswordChanged convertFromSObject(SPasswordChanged input, PasswordChanged result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserChanged(Collection input) {
		Set result = new HashSet();
		for (UserChanged o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserChanged(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserChanged o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserChanged(Collection input) {
		List result = new ArrayList();
		for (UserChanged o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserChanged(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserChanged o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserChanged convertToSObject(UserChanged input) {
		if (input == null) {
			return null;
		}
		
		SUserChanged result = new SUserChanged();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public UserChanged convertFromSObject(SUserChanged input, DatabaseSession session) throws BimserverDatabaseException {
		UserChanged result = convertFromSObject(input, LogFactory.eINSTANCE.createUserChanged(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserChanged convertFromSObject(SUserChanged input, UserChanged result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetExtendedDataAddedToRevision(Collection input) {
		Set result = new HashSet();
		for (ExtendedDataAddedToRevision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetExtendedDataAddedToRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SExtendedDataAddedToRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListExtendedDataAddedToRevision(Collection input) {
		List result = new ArrayList();
		for (ExtendedDataAddedToRevision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListExtendedDataAddedToRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SExtendedDataAddedToRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SExtendedDataAddedToRevision convertToSObject(ExtendedDataAddedToRevision input) {
		if (input == null) {
			return null;
		}
		
		SExtendedDataAddedToRevision result = new SExtendedDataAddedToRevision();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevisionId(revisionVal == null ? -1 : revisionVal.getOid());
		ExtendedData extendedDataVal = input.getExtendedData();
		result.setExtendedDataId(extendedDataVal == null ? -1 : extendedDataVal.getOid());
		return result;
	}
	public ExtendedDataAddedToRevision convertFromSObject(SExtendedDataAddedToRevision input, DatabaseSession session) throws BimserverDatabaseException {
		ExtendedDataAddedToRevision result = convertFromSObject(input, LogFactory.eINSTANCE.createExtendedDataAddedToRevision(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ExtendedDataAddedToRevision convertFromSObject(SExtendedDataAddedToRevision input, ExtendedDataAddedToRevision result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getRevisionId(), OldQuery.getDefault()));
		result.setExtendedData((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), input.getExtendedDataId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetExtendedDataAddedToProject(Collection input) {
		Set result = new HashSet();
		for (ExtendedDataAddedToProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetExtendedDataAddedToProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SExtendedDataAddedToProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListExtendedDataAddedToProject(Collection input) {
		List result = new ArrayList();
		for (ExtendedDataAddedToProject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListExtendedDataAddedToProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SExtendedDataAddedToProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SExtendedDataAddedToProject convertToSObject(ExtendedDataAddedToProject input) {
		if (input == null) {
			return null;
		}
		
		SExtendedDataAddedToProject result = new SExtendedDataAddedToProject();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		ExtendedData extendedDataVal = input.getExtendedData();
		result.setExtendedDataId(extendedDataVal == null ? -1 : extendedDataVal.getOid());
		return result;
	}
	public ExtendedDataAddedToProject convertFromSObject(SExtendedDataAddedToProject input, DatabaseSession session) throws BimserverDatabaseException {
		ExtendedDataAddedToProject result = convertFromSObject(input, LogFactory.eINSTANCE.createExtendedDataAddedToProject(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ExtendedDataAddedToProject convertFromSObject(SExtendedDataAddedToProject input, ExtendedDataAddedToProject result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		result.setExtendedData((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), input.getExtendedDataId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetRemoteServiceCalled(Collection input) {
		Set result = new HashSet();
		for (RemoteServiceCalled o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRemoteServiceCalled(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRemoteServiceCalled o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRemoteServiceCalled(Collection input) {
		List result = new ArrayList();
		for (RemoteServiceCalled o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRemoteServiceCalled(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRemoteServiceCalled o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRemoteServiceCalled convertToSObject(RemoteServiceCalled input) {
		if (input == null) {
			return null;
		}
		
		SRemoteServiceCalled result = new SRemoteServiceCalled();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setState(SNotifictionResultEnum.values()[input.getState().ordinal()]);
		result.setPercentage(input.getPercentage());
		result.getInfos().addAll(input.getInfos());
		result.getWarnings().addAll(input.getWarnings());
		result.getErrors().addAll(input.getErrors());
		User executorVal = input.getExecutor();
		result.setExecutorId(executorVal == null ? -1 : executorVal.getOid());
		Service serviceVal = input.getService();
		result.setServiceId(serviceVal == null ? -1 : serviceVal.getOid());
		return result;
	}
	public RemoteServiceCalled convertFromSObject(SRemoteServiceCalled input, DatabaseSession session) throws BimserverDatabaseException {
		RemoteServiceCalled result = convertFromSObject(input, LogFactory.eINSTANCE.createRemoteServiceCalled(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RemoteServiceCalled convertFromSObject(SRemoteServiceCalled input, RemoteServiceCalled result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setState(NotifictionResultEnum.values()[input.getState().ordinal()]);
		result.setPercentage(input.getPercentage());
		result.getInfos().addAll(input.getInfos());
		result.getWarnings().addAll(input.getWarnings());
		result.getErrors().addAll(input.getErrors());
		result.setExecutor((User)session.get(StorePackage.eINSTANCE.getUser(), input.getExecutorId(), OldQuery.getDefault()));
		result.setService((Service)session.get(StorePackage.eINSTANCE.getService(), input.getServiceId(), OldQuery.getDefault()));
		return result;
	}
		public SUserType convertToSObject(UserType input) {
			return SUserType.values()[input.ordinal()];
		}
		
		public UserType convertFromSObject(SUserType input) {
			return UserType.values()[input.ordinal()];
		}
		public SSIPrefix convertToSObject(SIPrefix input) {
			return SSIPrefix.values()[input.ordinal()];
		}
		
		public SIPrefix convertFromSObject(SSIPrefix input) {
			return SIPrefix.values()[input.ordinal()];
		}
		public SObjectState convertToSObject(ObjectState input) {
			return SObjectState.values()[input.ordinal()];
		}
		
		public ObjectState convertFromSObject(SObjectState input) {
			return ObjectState.values()[input.ordinal()];
		}

	public Set convertToSSetProject(Collection input) {
		Set result = new HashSet();
		for (Project o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProject(Collection input) {
		List result = new ArrayList();
		for (Project o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProject convertToSObject(Project input) {
		if (input == null) {
			return null;
		}
		
		SProject result = new SProject();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setId(input.getId());
		result.setName(input.getName());
		result.setState(SObjectState.values()[input.getState().ordinal()]);
		result.setCreatedDate(input.getCreatedDate());
		result.setDescription(input.getDescription());
		result.setExportLengthMeasurePrefix(SSIPrefix.values()[input.getExportLengthMeasurePrefix().ordinal()]);
		result.setSchema(input.getSchema());
		result.setSendEmailOnNewRevision(input.isSendEmailOnNewRevision());
		List listhasAuthorizedUsers = new ArrayList();
		for (User v : input.getHasAuthorizedUsers()) {
			listhasAuthorizedUsers.add(v.getOid());
		}
		result.setHasAuthorizedUsers(listhasAuthorizedUsers);
		List listconcreteRevisions = new ArrayList();
		for (ConcreteRevision v : input.getConcreteRevisions()) {
			listconcreteRevisions.add(v.getOid());
		}
		result.setConcreteRevisions(listconcreteRevisions);
		List listrevisions = new ArrayList();
		for (Revision v : input.getRevisions()) {
			listrevisions.add(v.getOid());
		}
		result.setRevisions(listrevisions);
		ConcreteRevision lastConcreteRevisionVal = input.getLastConcreteRevision();
		result.setLastConcreteRevisionId(lastConcreteRevisionVal == null ? -1 : lastConcreteRevisionVal.getOid());
		Revision lastRevisionVal = input.getLastRevision();
		result.setLastRevisionId(lastRevisionVal == null ? -1 : lastRevisionVal.getOid());
		List listcheckouts = new ArrayList();
		for (Checkout v : input.getCheckouts()) {
			listcheckouts.add(v.getOid());
		}
		result.setCheckouts(listcheckouts);
		User createdByVal = input.getCreatedBy();
		result.setCreatedById(createdByVal == null ? -1 : createdByVal.getOid());
		GeoTag geoTagVal = input.getGeoTag();
		result.setGeoTagId(geoTagVal == null ? -1 : geoTagVal.getOid());
		List listsubProjects = new ArrayList();
		for (Project v : input.getSubProjects()) {
			listsubProjects.add(v.getOid());
		}
		result.setSubProjects(listsubProjects);
		Project parentVal = input.getParent();
		result.setParentId(parentVal == null ? -1 : parentVal.getOid());
		List listextendedData = new ArrayList();
		for (ExtendedData v : input.getExtendedData()) {
			listextendedData.add(v.getOid());
		}
		result.setExtendedData(listextendedData);
		List listservices = new ArrayList();
		for (Service v : input.getServices()) {
			listservices.add(v.getOid());
		}
		result.setServices(listservices);
		List listlogs = new ArrayList();
		for (ProjectRelated v : input.getLogs()) {
			listlogs.add(v.getOid());
		}
		result.setLogs(listlogs);
		List listmodelCheckers = new ArrayList();
		for (ModelCheckerInstance v : input.getModelCheckers()) {
			listmodelCheckers.add(v.getOid());
		}
		result.setModelCheckers(listmodelCheckers);
		return result;
	}
	public Project convertFromSObject(SProject input, DatabaseSession session) throws BimserverDatabaseException {
		Project result = convertFromSObject(input, StoreFactory.eINSTANCE.createProject(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Project convertFromSObject(SProject input, Project result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setId(input.getId());
		result.setName(input.getName());
		result.setState(ObjectState.values()[input.getState().ordinal()]);
		result.setCreatedDate(input.getCreatedDate());
		result.setDescription(input.getDescription());
		result.setExportLengthMeasurePrefix(SIPrefix.values()[input.getExportLengthMeasurePrefix().ordinal()]);
		result.setSchema(input.getSchema());
		result.setSendEmailOnNewRevision(input.isSendEmailOnNewRevision());
		List listhasAuthorizedUsers = result.getHasAuthorizedUsers();
		for (long oid : input.getHasAuthorizedUsers()) {
			listhasAuthorizedUsers.add((User)session.get(StorePackage.eINSTANCE.getUser(), oid, OldQuery.getDefault()));
		}
		List listconcreteRevisions = result.getConcreteRevisions();
		for (long oid : input.getConcreteRevisions()) {
			listconcreteRevisions.add((ConcreteRevision)session.get(StorePackage.eINSTANCE.getConcreteRevision(), oid, OldQuery.getDefault()));
		}
		List listrevisions = result.getRevisions();
		for (long oid : input.getRevisions()) {
			listrevisions.add((Revision)session.get(StorePackage.eINSTANCE.getRevision(), oid, OldQuery.getDefault()));
		}
		result.setLastConcreteRevision((ConcreteRevision)session.get(StorePackage.eINSTANCE.getConcreteRevision(), input.getLastConcreteRevisionId(), OldQuery.getDefault()));
		result.setLastRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getLastRevisionId(), OldQuery.getDefault()));
		List listcheckouts = result.getCheckouts();
		for (long oid : input.getCheckouts()) {
			listcheckouts.add((Checkout)session.get(StorePackage.eINSTANCE.getCheckout(), oid, OldQuery.getDefault()));
		}
		result.setCreatedBy((User)session.get(StorePackage.eINSTANCE.getUser(), input.getCreatedById(), OldQuery.getDefault()));
		result.setGeoTag((GeoTag)session.get(StorePackage.eINSTANCE.getGeoTag(), input.getGeoTagId(), OldQuery.getDefault()));
		List listsubProjects = result.getSubProjects();
		for (long oid : input.getSubProjects()) {
			listsubProjects.add((Project)session.get(StorePackage.eINSTANCE.getProject(), oid, OldQuery.getDefault()));
		}
		result.setParent((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getParentId(), OldQuery.getDefault()));
		List listextendedData = result.getExtendedData();
		for (long oid : input.getExtendedData()) {
			listextendedData.add((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), oid, OldQuery.getDefault()));
		}
		List listservices = result.getServices();
		for (long oid : input.getServices()) {
			listservices.add((Service)session.get(StorePackage.eINSTANCE.getService(), oid, OldQuery.getDefault()));
		}
		List listlogs = result.getLogs();
		for (long oid : input.getLogs()) {
			listlogs.add((ProjectRelated)session.get(LogPackage.eINSTANCE.getProjectRelated(), oid, OldQuery.getDefault()));
		}
		List listmodelCheckers = result.getModelCheckers();
		for (long oid : input.getModelCheckers()) {
			listmodelCheckers.add((ModelCheckerInstance)session.get(StorePackage.eINSTANCE.getModelCheckerInstance(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetUser(Collection input) {
		Set result = new HashSet();
		for (User o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUser(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUser o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUser(Collection input) {
		List result = new ArrayList();
		for (User o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUser(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUser o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUser convertToSObject(User input) {
		if (input == null) {
			return null;
		}
		
		SUser result = new SUser();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setPasswordHash(input.getPasswordHash());
		result.setPasswordSalt(input.getPasswordSalt());
		result.setState(SObjectState.values()[input.getState().ordinal()]);
		result.setCreatedOn(input.getCreatedOn());
		result.setUserType(SUserType.values()[input.getUserType().ordinal()]);
		result.setUsername(input.getUsername());
		result.setLastSeen(input.getLastSeen());
		result.setToken(input.getToken());
		result.setValidationToken(input.getValidationToken());
		result.setValidationTokenCreated(input.getValidationTokenCreated());
		List listhasRightsOn = new ArrayList();
		for (Project v : input.getHasRightsOn()) {
			listhasRightsOn.add(v.getOid());
		}
		result.setHasRightsOn(listhasRightsOn);
		List listrevisions = new ArrayList();
		for (Revision v : input.getRevisions()) {
			listrevisions.add(v.getOid());
		}
		result.setRevisions(listrevisions);
		User createdByVal = input.getCreatedBy();
		result.setCreatedById(createdByVal == null ? -1 : createdByVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		List listschemas = new ArrayList();
		for (ExtendedDataSchema v : input.getSchemas()) {
			listschemas.add(v.getOid());
		}
		result.setSchemas(listschemas);
		List listextendedData = new ArrayList();
		for (ExtendedData v : input.getExtendedData()) {
			listextendedData.add(v.getOid());
		}
		result.setExtendedData(listextendedData);
		List listservices = new ArrayList();
		for (Service v : input.getServices()) {
			listservices.add(v.getOid());
		}
		result.setServices(listservices);
		List listlogs = new ArrayList();
		for (UserRelated v : input.getLogs()) {
			listlogs.add(v.getOid());
		}
		result.setLogs(listlogs);
		return result;
	}
	public User convertFromSObject(SUser input, DatabaseSession session) throws BimserverDatabaseException {
		User result = convertFromSObject(input, StoreFactory.eINSTANCE.createUser(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public User convertFromSObject(SUser input, User result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setPasswordHash(input.getPasswordHash());
		result.setPasswordSalt(input.getPasswordSalt());
		result.setState(ObjectState.values()[input.getState().ordinal()]);
		result.setCreatedOn(input.getCreatedOn());
		result.setUserType(UserType.values()[input.getUserType().ordinal()]);
		result.setUsername(input.getUsername());
		result.setLastSeen(input.getLastSeen());
		result.setToken(input.getToken());
		result.setValidationToken(input.getValidationToken());
		result.setValidationTokenCreated(input.getValidationTokenCreated());
		List listhasRightsOn = result.getHasRightsOn();
		for (long oid : input.getHasRightsOn()) {
			listhasRightsOn.add((Project)session.get(StorePackage.eINSTANCE.getProject(), oid, OldQuery.getDefault()));
		}
		List listrevisions = result.getRevisions();
		for (long oid : input.getRevisions()) {
			listrevisions.add((Revision)session.get(StorePackage.eINSTANCE.getRevision(), oid, OldQuery.getDefault()));
		}
		result.setCreatedBy((User)session.get(StorePackage.eINSTANCE.getUser(), input.getCreatedById(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		List listschemas = result.getSchemas();
		for (long oid : input.getSchemas()) {
			listschemas.add((ExtendedDataSchema)session.get(StorePackage.eINSTANCE.getExtendedDataSchema(), oid, OldQuery.getDefault()));
		}
		List listextendedData = result.getExtendedData();
		for (long oid : input.getExtendedData()) {
			listextendedData.add((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), oid, OldQuery.getDefault()));
		}
		List listservices = result.getServices();
		for (long oid : input.getServices()) {
			listservices.add((Service)session.get(StorePackage.eINSTANCE.getService(), oid, OldQuery.getDefault()));
		}
		List listlogs = result.getLogs();
		for (long oid : input.getLogs()) {
			listlogs.add((UserRelated)session.get(LogPackage.eINSTANCE.getUserRelated(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetRevision(Collection input) {
		Set result = new HashSet();
		for (Revision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevision(Collection input) {
		List result = new ArrayList();
		for (Revision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevision convertToSObject(Revision input) {
		if (input == null) {
			return null;
		}
		
		SRevision result = new SRevision();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setId(input.getId());
		result.setDate(input.getDate());
		result.setComment(input.getComment());
		result.setSize(input.getSize());
		result.setTag(input.getTag());
		result.setLastError(input.getLastError());
		result.setBmi(input.getBmi());
		result.setHasGeometry(input.isHasGeometry());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		List listconcreteRevisions = new ArrayList();
		for (ConcreteRevision v : input.getConcreteRevisions()) {
			listconcreteRevisions.add(v.getOid());
		}
		result.setConcreteRevisions(listconcreteRevisions);
		ConcreteRevision lastConcreteRevisionVal = input.getLastConcreteRevision();
		result.setLastConcreteRevisionId(lastConcreteRevisionVal == null ? -1 : lastConcreteRevisionVal.getOid());
		List listcheckouts = new ArrayList();
		for (Checkout v : input.getCheckouts()) {
			listcheckouts.add(v.getOid());
		}
		result.setCheckouts(listcheckouts);
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		List listextendedData = new ArrayList();
		for (ExtendedData v : input.getExtendedData()) {
			listextendedData.add(v.getOid());
		}
		result.setExtendedData(listextendedData);
		List listlogs = new ArrayList();
		for (RevisionRelated v : input.getLogs()) {
			listlogs.add(v.getOid());
		}
		result.setLogs(listlogs);
		Service serviceVal = input.getService();
		result.setServiceId(serviceVal == null ? -1 : serviceVal.getOid());
		return result;
	}
	public Revision convertFromSObject(SRevision input, DatabaseSession session) throws BimserverDatabaseException {
		Revision result = convertFromSObject(input, StoreFactory.eINSTANCE.createRevision(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Revision convertFromSObject(SRevision input, Revision result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setId(input.getId());
		result.setDate(input.getDate());
		result.setComment(input.getComment());
		result.setSize(input.getSize());
		result.setTag(input.getTag());
		result.setLastError(input.getLastError());
		result.setBmi(input.getBmi());
		result.setHasGeometry(input.isHasGeometry());
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		List listconcreteRevisions = result.getConcreteRevisions();
		for (long oid : input.getConcreteRevisions()) {
			listconcreteRevisions.add((ConcreteRevision)session.get(StorePackage.eINSTANCE.getConcreteRevision(), oid, OldQuery.getDefault()));
		}
		result.setLastConcreteRevision((ConcreteRevision)session.get(StorePackage.eINSTANCE.getConcreteRevision(), input.getLastConcreteRevisionId(), OldQuery.getDefault()));
		List listcheckouts = result.getCheckouts();
		for (long oid : input.getCheckouts()) {
			listcheckouts.add((Checkout)session.get(StorePackage.eINSTANCE.getCheckout(), oid, OldQuery.getDefault()));
		}
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		List listextendedData = result.getExtendedData();
		for (long oid : input.getExtendedData()) {
			listextendedData.add((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), oid, OldQuery.getDefault()));
		}
		List listlogs = result.getLogs();
		for (long oid : input.getLogs()) {
			listlogs.add((RevisionRelated)session.get(LogPackage.eINSTANCE.getRevisionRelated(), oid, OldQuery.getDefault()));
		}
		result.setService((Service)session.get(StorePackage.eINSTANCE.getService(), input.getServiceId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetConcreteRevision(Collection input) {
		Set result = new HashSet();
		for (ConcreteRevision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetConcreteRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SConcreteRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListConcreteRevision(Collection input) {
		List result = new ArrayList();
		for (ConcreteRevision o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListConcreteRevision(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SConcreteRevision o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SConcreteRevision convertToSObject(ConcreteRevision input) {
		if (input == null) {
			return null;
		}
		
		SConcreteRevision result = new SConcreteRevision();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setId(input.getId());
		result.setChecksum(input.getChecksum());
		result.setSize(input.getSize());
		result.setDate(input.getDate());
		result.setLastError(input.getLastError());
		result.setClear(input.isClear());
		result.setOidCounters(input.getOidCounters());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		List listrevisions = new ArrayList();
		for (Revision v : input.getRevisions()) {
			listrevisions.add(v.getOid());
		}
		result.setRevisions(listrevisions);
		RevisionSummary summaryVal = input.getSummary();
		result.setSummaryId(summaryVal == null ? -1 : summaryVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		IfcHeader ifcHeaderVal = input.getIfcHeader();
		result.setIfcHeaderId(ifcHeaderVal == null ? -1 : ifcHeaderVal.getOid());
		Vector3f minBoundsVal = input.getMinBounds();
		result.setMinBounds(convertToSObject(minBoundsVal));
		Vector3f maxBoundsVal = input.getMaxBounds();
		result.setMaxBounds(convertToSObject(maxBoundsVal));
		return result;
	}
	public ConcreteRevision convertFromSObject(SConcreteRevision input, DatabaseSession session) throws BimserverDatabaseException {
		ConcreteRevision result = convertFromSObject(input, StoreFactory.eINSTANCE.createConcreteRevision(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ConcreteRevision convertFromSObject(SConcreteRevision input, ConcreteRevision result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setId(input.getId());
		result.setChecksum(input.getChecksum());
		result.setSize(input.getSize());
		result.setDate(input.getDate());
		result.setLastError(input.getLastError());
		result.setClear(input.isClear());
		result.setOidCounters(input.getOidCounters());
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		List listrevisions = result.getRevisions();
		for (long oid : input.getRevisions()) {
			listrevisions.add((Revision)session.get(StorePackage.eINSTANCE.getRevision(), oid, OldQuery.getDefault()));
		}
		result.setSummary((RevisionSummary)session.get(StorePackage.eINSTANCE.getRevisionSummary(), input.getSummaryId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setIfcHeader((IfcHeader)session.get(StorePackage.eINSTANCE.getIfcHeader(), input.getIfcHeaderId(), OldQuery.getDefault()));
		result.setMinBounds(convertFromSObject(input.getMinBounds(), session));
		result.setMaxBounds(convertFromSObject(input.getMaxBounds(), session));
		return result;
	}

	public Set convertToSSetGeoTag(Collection input) {
		Set result = new HashSet();
		for (GeoTag o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetGeoTag(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SGeoTag o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListGeoTag(Collection input) {
		List result = new ArrayList();
		for (GeoTag o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListGeoTag(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SGeoTag o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SGeoTag convertToSObject(GeoTag input) {
		if (input == null) {
			return null;
		}
		
		SGeoTag result = new SGeoTag();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setEnabled(input.getEnabled());
		result.setX(input.getX());
		result.setY(input.getY());
		result.setZ(input.getZ());
		result.setEpsg(input.getEpsg());
		result.setDirectionAngle(input.getDirectionAngle());
		List listprojects = new ArrayList();
		for (Project v : input.getProjects()) {
			listprojects.add(v.getOid());
		}
		result.setProjects(listprojects);
		return result;
	}
	public GeoTag convertFromSObject(SGeoTag input, DatabaseSession session) throws BimserverDatabaseException {
		GeoTag result = convertFromSObject(input, StoreFactory.eINSTANCE.createGeoTag(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public GeoTag convertFromSObject(SGeoTag input, GeoTag result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setEnabled(input.getEnabled());
		result.setX(input.getX());
		result.setY(input.getY());
		result.setZ(input.getZ());
		result.setEpsg(input.getEpsg());
		result.setDirectionAngle(input.getDirectionAngle());
		List listprojects = result.getProjects();
		for (long oid : input.getProjects()) {
			listprojects.add((Project)session.get(StorePackage.eINSTANCE.getProject(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetCheckout(Collection input) {
		Set result = new HashSet();
		for (Checkout o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCheckout(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCheckout o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCheckout(Collection input) {
		List result = new ArrayList();
		for (Checkout o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCheckout(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCheckout o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCheckout convertToSObject(Checkout input) {
		if (input == null) {
			return null;
		}
		
		SCheckout result = new SCheckout();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setDate(input.getDate());
		result.setActive(input.getActive());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevision(convertToSObject(revisionVal));
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		Revision checkinVal = input.getCheckin();
		result.setCheckin(convertToSObject(checkinVal));
		List listlogs = new ArrayList();
		for (CheckoutRelated v : input.getLogs()) {
			listlogs.add(v.getOid());
		}
		result.setLogs(listlogs);
		return result;
	}
	public Checkout convertFromSObject(SCheckout input, DatabaseSession session) throws BimserverDatabaseException {
		Checkout result = convertFromSObject(input, StoreFactory.eINSTANCE.createCheckout(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Checkout convertFromSObject(SCheckout input, Checkout result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDate(input.getDate());
		result.setActive(input.getActive());
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setRevision(convertFromSObject(input.getRevision(), session));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		result.setCheckin(convertFromSObject(input.getCheckin(), session));
		List listlogs = result.getLogs();
		for (long oid : input.getLogs()) {
			listlogs.add((CheckoutRelated)session.get(LogPackage.eINSTANCE.getCheckoutRelated(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetServerSettings(Collection input) {
		Set result = new HashSet();
		for (ServerSettings o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServerSettings(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServerSettings o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServerSettings(Collection input) {
		List result = new ArrayList();
		for (ServerSettings o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServerSettings(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServerSettings o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServerSettings convertToSObject(ServerSettings input) {
		if (input == null) {
			return null;
		}
		
		SServerSettings result = new SServerSettings();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSendConfirmationEmailAfterRegistration(input.isSendConfirmationEmailAfterRegistration());
		result.setAllowSelfRegistration(input.getAllowSelfRegistration());
		result.setAllowUsersToCreateTopLevelProjects(input.isAllowUsersToCreateTopLevelProjects());
		result.setCheckinMergingEnabled(input.getCheckinMergingEnabled());
		result.setSmtpServer(input.getSmtpServer());
		result.setEmailSenderAddress(input.getEmailSenderAddress());
		result.setEmailSenderName(input.getEmailSenderName());
		result.setSiteAddress(input.getSiteAddress());
		result.setGenerateGeometryOnCheckin(input.isGenerateGeometryOnCheckin());
		result.setAllowOnlyWhitelisted(input.isAllowOnlyWhitelisted());
		result.getWhitelistedDomains().addAll(input.getWhitelistedDomains());
		result.setHideUserListForNonAdmin(input.getHideUserListForNonAdmin());
		result.setProtocolBuffersPort(input.getProtocolBuffersPort());
		result.setCacheOutputFiles(input.getCacheOutputFiles());
		result.setServiceRepositoryUrl(input.getServiceRepositoryUrl());
		result.setSendEmailOnNewRevision(input.isSendEmailOnNewRevision());
		result.setSessionTimeOutSeconds(input.getSessionTimeOutSeconds());
		result.setSmtpUsername(input.getSmtpUsername());
		result.setSmtpPassword(input.getSmtpPassword());
		result.setSmtpPort(input.getSmtpPort());
		result.setSmtpProtocol(SSmtpProtocol.values()[input.getSmtpProtocol().ordinal()]);
		result.setReuseGeometry(input.isReuseGeometry());
		result.setAllowCreateValidatedUser(input.isAllowCreateValidatedUser());
		result.setRenderEngineProcesses(input.getRenderEngineProcesses());
		List listwebModules = new ArrayList();
		for (WebModulePluginConfiguration v : input.getWebModules()) {
			listwebModules.add(v.getOid());
		}
		result.setWebModules(listwebModules);
		WebModulePluginConfiguration webModuleVal = input.getWebModule();
		result.setWebModuleId(webModuleVal == null ? -1 : webModuleVal.getOid());
		return result;
	}
	public ServerSettings convertFromSObject(SServerSettings input, DatabaseSession session) throws BimserverDatabaseException {
		ServerSettings result = convertFromSObject(input, StoreFactory.eINSTANCE.createServerSettings(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServerSettings convertFromSObject(SServerSettings input, ServerSettings result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSendConfirmationEmailAfterRegistration(input.isSendConfirmationEmailAfterRegistration());
		result.setAllowSelfRegistration(input.getAllowSelfRegistration());
		result.setAllowUsersToCreateTopLevelProjects(input.isAllowUsersToCreateTopLevelProjects());
		result.setCheckinMergingEnabled(input.getCheckinMergingEnabled());
		result.setSmtpServer(input.getSmtpServer());
		result.setEmailSenderAddress(input.getEmailSenderAddress());
		result.setEmailSenderName(input.getEmailSenderName());
		result.setSiteAddress(input.getSiteAddress());
		result.setGenerateGeometryOnCheckin(input.isGenerateGeometryOnCheckin());
		result.setAllowOnlyWhitelisted(input.isAllowOnlyWhitelisted());
		result.getWhitelistedDomains().addAll(input.getWhitelistedDomains());
		result.setHideUserListForNonAdmin(input.getHideUserListForNonAdmin());
		result.setProtocolBuffersPort(input.getProtocolBuffersPort());
		result.setCacheOutputFiles(input.getCacheOutputFiles());
		result.setServiceRepositoryUrl(input.getServiceRepositoryUrl());
		result.setSendEmailOnNewRevision(input.isSendEmailOnNewRevision());
		result.setSessionTimeOutSeconds(input.getSessionTimeOutSeconds());
		result.setSmtpUsername(input.getSmtpUsername());
		result.setSmtpPassword(input.getSmtpPassword());
		result.setSmtpPort(input.getSmtpPort());
		result.setSmtpProtocol(SmtpProtocol.values()[input.getSmtpProtocol().ordinal()]);
		result.setReuseGeometry(input.isReuseGeometry());
		result.setAllowCreateValidatedUser(input.isAllowCreateValidatedUser());
		result.setRenderEngineProcesses(input.getRenderEngineProcesses());
		List listwebModules = result.getWebModules();
		for (long oid : input.getWebModules()) {
			listwebModules.add((WebModulePluginConfiguration)session.get(StorePackage.eINSTANCE.getWebModulePluginConfiguration(), oid, OldQuery.getDefault()));
		}
		result.setWebModule((WebModulePluginConfiguration)session.get(StorePackage.eINSTANCE.getWebModulePluginConfiguration(), input.getWebModuleId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetUserSettings(Collection input) {
		Set result = new HashSet();
		for (UserSettings o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserSettings(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserSettings o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserSettings(Collection input) {
		List result = new ArrayList();
		for (UserSettings o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserSettings(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserSettings o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserSettings convertToSObject(UserSettings input) {
		if (input == null) {
			return null;
		}
		
		SUserSettings result = new SUserSettings();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listserializers = new ArrayList();
		for (SerializerPluginConfiguration v : input.getSerializers()) {
			listserializers.add(v.getOid());
		}
		result.setSerializers(listserializers);
		List listobjectIDMs = new ArrayList();
		for (ObjectIDMPluginConfiguration v : input.getObjectIDMs()) {
			listobjectIDMs.add(v.getOid());
		}
		result.setObjectIDMs(listobjectIDMs);
		List listrenderEngines = new ArrayList();
		for (RenderEnginePluginConfiguration v : input.getRenderEngines()) {
			listrenderEngines.add(v.getOid());
		}
		result.setRenderEngines(listrenderEngines);
		List listdeserializers = new ArrayList();
		for (DeserializerPluginConfiguration v : input.getDeserializers()) {
			listdeserializers.add(v.getOid());
		}
		result.setDeserializers(listdeserializers);
		List listqueryengines = new ArrayList();
		for (QueryEnginePluginConfiguration v : input.getQueryengines()) {
			listqueryengines.add(v.getOid());
		}
		result.setQueryengines(listqueryengines);
		List listmodelmergers = new ArrayList();
		for (ModelMergerPluginConfiguration v : input.getModelmergers()) {
			listmodelmergers.add(v.getOid());
		}
		result.setModelmergers(listmodelmergers);
		List listmodelcompares = new ArrayList();
		for (ModelComparePluginConfiguration v : input.getModelcompares()) {
			listmodelcompares.add(v.getOid());
		}
		result.setModelcompares(listmodelcompares);
		ModelMergerPluginConfiguration defaultModelMergerVal = input.getDefaultModelMerger();
		result.setDefaultModelMergerId(defaultModelMergerVal == null ? -1 : defaultModelMergerVal.getOid());
		ModelComparePluginConfiguration defaultModelCompareVal = input.getDefaultModelCompare();
		result.setDefaultModelCompareId(defaultModelCompareVal == null ? -1 : defaultModelCompareVal.getOid());
		QueryEnginePluginConfiguration defaultQueryEngineVal = input.getDefaultQueryEngine();
		result.setDefaultQueryEngineId(defaultQueryEngineVal == null ? -1 : defaultQueryEngineVal.getOid());
		RenderEnginePluginConfiguration defaultRenderEngineVal = input.getDefaultRenderEngine();
		result.setDefaultRenderEngineId(defaultRenderEngineVal == null ? -1 : defaultRenderEngineVal.getOid());
		SerializerPluginConfiguration defaultSerializerVal = input.getDefaultSerializer();
		result.setDefaultSerializerId(defaultSerializerVal == null ? -1 : defaultSerializerVal.getOid());
		ObjectIDMPluginConfiguration defaultObjectIDMVal = input.getDefaultObjectIDM();
		result.setDefaultObjectIDMId(defaultObjectIDMVal == null ? -1 : defaultObjectIDMVal.getOid());
		List listservices = new ArrayList();
		for (InternalServicePluginConfiguration v : input.getServices()) {
			listservices.add(v.getOid());
		}
		result.setServices(listservices);
		List listmessagingSerializerPlugins = new ArrayList();
		for (MessagingSerializerPluginConfiguration v : input.getMessagingSerializerPlugins()) {
			listmessagingSerializerPlugins.add(v.getOid());
		}
		result.setMessagingSerializerPlugins(listmessagingSerializerPlugins);
		return result;
	}
	public UserSettings convertFromSObject(SUserSettings input, DatabaseSession session) throws BimserverDatabaseException {
		UserSettings result = convertFromSObject(input, StoreFactory.eINSTANCE.createUserSettings(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserSettings convertFromSObject(SUserSettings input, UserSettings result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listserializers = result.getSerializers();
		for (long oid : input.getSerializers()) {
			listserializers.add((SerializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listobjectIDMs = result.getObjectIDMs();
		for (long oid : input.getObjectIDMs()) {
			listobjectIDMs.add((ObjectIDMPluginConfiguration)session.get(StorePackage.eINSTANCE.getObjectIDMPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listrenderEngines = result.getRenderEngines();
		for (long oid : input.getRenderEngines()) {
			listrenderEngines.add((RenderEnginePluginConfiguration)session.get(StorePackage.eINSTANCE.getRenderEnginePluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listdeserializers = result.getDeserializers();
		for (long oid : input.getDeserializers()) {
			listdeserializers.add((DeserializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getDeserializerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listqueryengines = result.getQueryengines();
		for (long oid : input.getQueryengines()) {
			listqueryengines.add((QueryEnginePluginConfiguration)session.get(StorePackage.eINSTANCE.getQueryEnginePluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listmodelmergers = result.getModelmergers();
		for (long oid : input.getModelmergers()) {
			listmodelmergers.add((ModelMergerPluginConfiguration)session.get(StorePackage.eINSTANCE.getModelMergerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listmodelcompares = result.getModelcompares();
		for (long oid : input.getModelcompares()) {
			listmodelcompares.add((ModelComparePluginConfiguration)session.get(StorePackage.eINSTANCE.getModelComparePluginConfiguration(), oid, OldQuery.getDefault()));
		}
		result.setDefaultModelMerger((ModelMergerPluginConfiguration)session.get(StorePackage.eINSTANCE.getModelMergerPluginConfiguration(), input.getDefaultModelMergerId(), OldQuery.getDefault()));
		result.setDefaultModelCompare((ModelComparePluginConfiguration)session.get(StorePackage.eINSTANCE.getModelComparePluginConfiguration(), input.getDefaultModelCompareId(), OldQuery.getDefault()));
		result.setDefaultQueryEngine((QueryEnginePluginConfiguration)session.get(StorePackage.eINSTANCE.getQueryEnginePluginConfiguration(), input.getDefaultQueryEngineId(), OldQuery.getDefault()));
		result.setDefaultRenderEngine((RenderEnginePluginConfiguration)session.get(StorePackage.eINSTANCE.getRenderEnginePluginConfiguration(), input.getDefaultRenderEngineId(), OldQuery.getDefault()));
		result.setDefaultSerializer((SerializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), input.getDefaultSerializerId(), OldQuery.getDefault()));
		result.setDefaultObjectIDM((ObjectIDMPluginConfiguration)session.get(StorePackage.eINSTANCE.getObjectIDMPluginConfiguration(), input.getDefaultObjectIDMId(), OldQuery.getDefault()));
		List listservices = result.getServices();
		for (long oid : input.getServices()) {
			listservices.add((InternalServicePluginConfiguration)session.get(StorePackage.eINSTANCE.getInternalServicePluginConfiguration(), oid, OldQuery.getDefault()));
		}
		List listmessagingSerializerPlugins = result.getMessagingSerializerPlugins();
		for (long oid : input.getMessagingSerializerPlugins()) {
			listmessagingSerializerPlugins.add((MessagingSerializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getMessagingSerializerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (PluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (PluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPluginConfiguration convertToSObject(PluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof SerializerPluginConfiguration) {
			return convertToSObject((SerializerPluginConfiguration)input);
		}
		else if (input instanceof ObjectIDMPluginConfiguration) {
			return convertToSObject((ObjectIDMPluginConfiguration)input);
		}
		else if (input instanceof MessagingSerializerPluginConfiguration) {
			return convertToSObject((MessagingSerializerPluginConfiguration)input);
		}
		else if (input instanceof ModelMergerPluginConfiguration) {
			return convertToSObject((ModelMergerPluginConfiguration)input);
		}
		else if (input instanceof WebModulePluginConfiguration) {
			return convertToSObject((WebModulePluginConfiguration)input);
		}
		else if (input instanceof RenderEnginePluginConfiguration) {
			return convertToSObject((RenderEnginePluginConfiguration)input);
		}
		else if (input instanceof DeserializerPluginConfiguration) {
			return convertToSObject((DeserializerPluginConfiguration)input);
		}
		else if (input instanceof QueryEnginePluginConfiguration) {
			return convertToSObject((QueryEnginePluginConfiguration)input);
		}
		else if (input instanceof InternalServicePluginConfiguration) {
			return convertToSObject((InternalServicePluginConfiguration)input);
		}
		else if (input instanceof ModelComparePluginConfiguration) {
			return convertToSObject((ModelComparePluginConfiguration)input);
		}
		SPluginConfiguration result = new SPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		return result;
	}
	public PluginConfiguration convertFromSObject(SPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		PluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PluginConfiguration convertFromSObject(SPluginConfiguration input, PluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SSerializerPluginConfiguration) {
			return convertFromSObject((SSerializerPluginConfiguration)input, session);
		}
		else if (input instanceof SObjectIDMPluginConfiguration) {
			return convertFromSObject((SObjectIDMPluginConfiguration)input, session);
		}
		else if (input instanceof SMessagingSerializerPluginConfiguration) {
			return convertFromSObject((SMessagingSerializerPluginConfiguration)input, session);
		}
		else if (input instanceof SModelMergerPluginConfiguration) {
			return convertFromSObject((SModelMergerPluginConfiguration)input, session);
		}
		else if (input instanceof SWebModulePluginConfiguration) {
			return convertFromSObject((SWebModulePluginConfiguration)input, session);
		}
		else if (input instanceof SRenderEnginePluginConfiguration) {
			return convertFromSObject((SRenderEnginePluginConfiguration)input, session);
		}
		else if (input instanceof SDeserializerPluginConfiguration) {
			return convertFromSObject((SDeserializerPluginConfiguration)input, session);
		}
		else if (input instanceof SQueryEnginePluginConfiguration) {
			return convertFromSObject((SQueryEnginePluginConfiguration)input, session);
		}
		else if (input instanceof SInternalServicePluginConfiguration) {
			return convertFromSObject((SInternalServicePluginConfiguration)input, session);
		}
		else if (input instanceof SModelComparePluginConfiguration) {
			return convertFromSObject((SModelComparePluginConfiguration)input, session);
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetSerializerPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (SerializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetSerializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SSerializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListSerializerPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (SerializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListSerializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SSerializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SSerializerPluginConfiguration convertToSObject(SerializerPluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SSerializerPluginConfiguration result = new SSerializerPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setStreaming(input.isStreaming());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		ObjectIDMPluginConfiguration objectIDMVal = input.getObjectIDM();
		result.setObjectIDMId(objectIDMVal == null ? -1 : objectIDMVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		RenderEnginePluginConfiguration renderEngineVal = input.getRenderEngine();
		result.setRenderEngineId(renderEngineVal == null ? -1 : renderEngineVal.getOid());
		return result;
	}
	public SerializerPluginConfiguration convertFromSObject(SSerializerPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		SerializerPluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createSerializerPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public SerializerPluginConfiguration convertFromSObject(SSerializerPluginConfiguration input, SerializerPluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setStreaming(input.isStreaming());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setObjectIDM((ObjectIDMPluginConfiguration)session.get(StorePackage.eINSTANCE.getObjectIDMPluginConfiguration(), input.getObjectIDMId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		result.setRenderEngine((RenderEnginePluginConfiguration)session.get(StorePackage.eINSTANCE.getRenderEnginePluginConfiguration(), input.getRenderEngineId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetObjectIDMPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (ObjectIDMPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectIDMPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectIDMPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectIDMPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (ObjectIDMPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectIDMPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectIDMPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectIDMPluginConfiguration convertToSObject(ObjectIDMPluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SObjectIDMPluginConfiguration result = new SObjectIDMPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		List listserializers = new ArrayList();
		for (SerializerPluginConfiguration v : input.getSerializers()) {
			listserializers.add(v.getOid());
		}
		result.setSerializers(listserializers);
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public ObjectIDMPluginConfiguration convertFromSObject(SObjectIDMPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectIDMPluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectIDMPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectIDMPluginConfiguration convertFromSObject(SObjectIDMPluginConfiguration input, ObjectIDMPluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		List listserializers = result.getSerializers();
		for (long oid : input.getSerializers()) {
			listserializers.add((SerializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetRenderEnginePluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (RenderEnginePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRenderEnginePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRenderEnginePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRenderEnginePluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (RenderEnginePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRenderEnginePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRenderEnginePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRenderEnginePluginConfiguration convertToSObject(RenderEnginePluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SRenderEnginePluginConfiguration result = new SRenderEnginePluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		List listserializers = new ArrayList();
		for (SerializerPluginConfiguration v : input.getSerializers()) {
			listserializers.add(v.getOid());
		}
		result.setSerializers(listserializers);
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public RenderEnginePluginConfiguration convertFromSObject(SRenderEnginePluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		RenderEnginePluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createRenderEnginePluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RenderEnginePluginConfiguration convertFromSObject(SRenderEnginePluginConfiguration input, RenderEnginePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		List listserializers = result.getSerializers();
		for (long oid : input.getSerializers()) {
			listserializers.add((SerializerPluginConfiguration)session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetDeserializerPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (DeserializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDeserializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDeserializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDeserializerPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (DeserializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDeserializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDeserializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDeserializerPluginConfiguration convertToSObject(DeserializerPluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SDeserializerPluginConfiguration result = new SDeserializerPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public DeserializerPluginConfiguration convertFromSObject(SDeserializerPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		DeserializerPluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createDeserializerPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DeserializerPluginConfiguration convertFromSObject(SDeserializerPluginConfiguration input, DeserializerPluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetDownloadResult(Collection input) {
		Set result = new HashSet();
		for (DownloadResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDownloadResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDownloadResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDownloadResult(Collection input) {
		List result = new ArrayList();
		for (DownloadResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDownloadResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDownloadResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDownloadResult convertToSObject(DownloadResult input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof CheckoutResult) {
			return convertToSObject((CheckoutResult)input);
		}
		SDownloadResult result = new SDownloadResult();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setProjectName(input.getProjectName());
		result.setRevisionNr(input.getRevisionNr());
		result.setFile(input.getFile());
		return result;
	}
	public DownloadResult convertFromSObject(SDownloadResult input, DatabaseSession session) throws BimserverDatabaseException {
		DownloadResult result = convertFromSObject(input, StoreFactory.eINSTANCE.createDownloadResult(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DownloadResult convertFromSObject(SDownloadResult input, DownloadResult result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SCheckoutResult) {
			return convertFromSObject((SCheckoutResult)input, session);
		}
		result.setProjectName(input.getProjectName());
		result.setRevisionNr(input.getRevisionNr());
		result.setFile(input.getFile());
		return result;
	}

	public Set convertToSSetCheckoutResult(Collection input) {
		Set result = new HashSet();
		for (CheckoutResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCheckoutResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCheckoutResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCheckoutResult(Collection input) {
		List result = new ArrayList();
		for (CheckoutResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCheckoutResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCheckoutResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCheckoutResult convertToSObject(CheckoutResult input) {
		if (input == null) {
			return null;
		}
		
		SCheckoutResult result = new SCheckoutResult();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setProjectName(input.getProjectName());
		result.setRevisionNr(input.getRevisionNr());
		result.setFile(input.getFile());
		return result;
	}
	public CheckoutResult convertFromSObject(SCheckoutResult input, DatabaseSession session) throws BimserverDatabaseException {
		CheckoutResult result = convertFromSObject(input, StoreFactory.eINSTANCE.createCheckoutResult(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public CheckoutResult convertFromSObject(SCheckoutResult input, CheckoutResult result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setProjectName(input.getProjectName());
		result.setRevisionNr(input.getRevisionNr());
		result.setFile(input.getFile());
		return result;
	}

	public Set convertToSSetDataValue(Collection input) {
		Set result = new HashSet();
		for (DataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDataValue(Collection input) {
		List result = new ArrayList();
		for (DataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDataValue convertToSObject(DataValue input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ReferenceDataValue) {
			return convertToSObject((ReferenceDataValue)input);
		}
		else if (input instanceof ListDataValue) {
			return convertToSObject((ListDataValue)input);
		}
		else if (input instanceof SimpleDataValue) {
			return convertToSObject((SimpleDataValue)input);
		}
		SDataValue result = new SDataValue();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldName(input.getFieldName());
		return result;
	}
	public DataValue convertFromSObject(SDataValue input, DatabaseSession session) throws BimserverDatabaseException {
		DataValue result = convertFromSObject(input, StoreFactory.eINSTANCE.createDataValue(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DataValue convertFromSObject(SDataValue input, DataValue result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SReferenceDataValue) {
			return convertFromSObject((SReferenceDataValue)input, session);
		}
		else if (input instanceof SListDataValue) {
			return convertFromSObject((SListDataValue)input, session);
		}
		else if (input instanceof SSimpleDataValue) {
			return convertFromSObject((SSimpleDataValue)input, session);
		}
		result.setFieldName(input.getFieldName());
		return result;
	}

	public Set convertToSSetDataObject(Collection input) {
		Set result = new HashSet();
		for (DataObject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDataObject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDataObject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDataObject(Collection input) {
		List result = new ArrayList();
		for (DataObject o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDataObject(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDataObject o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDataObject convertToSObject(DataObject input) {
		if (input == null) {
			return null;
		}
		
		SDataObject result = new SDataObject();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setType(input.getType());
		result.setGuid(input.getGuid());
		result.setName(input.getName());
		List listvalues = new ArrayList();
		for (DataValue v : input.getValues()) {
			listvalues.add(convertToSObject(v));
		}
		result.setValues(listvalues);
		return result;
	}
	public DataObject convertFromSObject(SDataObject input, DatabaseSession session) throws BimserverDatabaseException {
		DataObject result = convertFromSObject(input, StoreFactory.eINSTANCE.createDataObject(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DataObject convertFromSObject(SDataObject input, DataObject result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setType(input.getType());
		result.setGuid(input.getGuid());
		result.setName(input.getName());
		List listvalues = result.getValues();
		for (SDataValue v : input.getValues()) {
			listvalues.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetUserSession(Collection input) {
		Set result = new HashSet();
		for (UserSession o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetUserSession(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SUserSession o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListUserSession(Collection input) {
		List result = new ArrayList();
		for (UserSession o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListUserSession(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SUserSession o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SUserSession convertToSObject(UserSession input) {
		if (input == null) {
			return null;
		}
		
		SUserSession result = new SUserSession();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setUsername(input.getUsername());
		result.setName(input.getName());
		result.setType(SUserType.values()[input.getType().ordinal()]);
		result.setRemoteAddress(input.getRemoteAddress());
		result.setActiveSince(input.getActiveSince());
		result.setLastActive(input.getLastActive());
		result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public UserSession convertFromSObject(SUserSession input, DatabaseSession session) throws BimserverDatabaseException {
		UserSession result = convertFromSObject(input, StoreFactory.eINSTANCE.createUserSession(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public UserSession convertFromSObject(SUserSession input, UserSession result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setUsername(input.getUsername());
		result.setName(input.getName());
		result.setType(UserType.values()[input.getType().ordinal()]);
		result.setRemoteAddress(input.getRemoteAddress());
		result.setActiveSince(input.getActiveSince());
		result.setLastActive(input.getLastActive());
		result.setAccessMethod(AccessMethod.values()[input.getAccessMethod().ordinal()]);
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetMigration(Collection input) {
		Set result = new HashSet();
		for (Migration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetMigration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SMigration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListMigration(Collection input) {
		List result = new ArrayList();
		for (Migration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListMigration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SMigration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SMigration convertToSObject(Migration input) {
		if (input == null) {
			return null;
		}
		
		SMigration result = new SMigration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setNumber(input.getNumber());
		result.setDescription(input.getDescription());
		result.setExecuted(input.getExecuted());
		return result;
	}
	public Migration convertFromSObject(SMigration input, DatabaseSession session) throws BimserverDatabaseException {
		Migration result = convertFromSObject(input, StoreFactory.eINSTANCE.createMigration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Migration convertFromSObject(SMigration input, Migration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setNumber(input.getNumber());
		result.setDescription(input.getDescription());
		result.setExecuted(input.getExecuted());
		return result;
	}

	public Set convertToSSetReferenceDataValue(Collection input) {
		Set result = new HashSet();
		for (ReferenceDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetReferenceDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SReferenceDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListReferenceDataValue(Collection input) {
		List result = new ArrayList();
		for (ReferenceDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListReferenceDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SReferenceDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SReferenceDataValue convertToSObject(ReferenceDataValue input) {
		if (input == null) {
			return null;
		}
		
		SReferenceDataValue result = new SReferenceDataValue();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldName(input.getFieldName());
		result.setTypeName(input.getTypeName());
		result.setGuid(input.getGuid());
		return result;
	}
	public ReferenceDataValue convertFromSObject(SReferenceDataValue input, DatabaseSession session) throws BimserverDatabaseException {
		ReferenceDataValue result = convertFromSObject(input, StoreFactory.eINSTANCE.createReferenceDataValue(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ReferenceDataValue convertFromSObject(SReferenceDataValue input, ReferenceDataValue result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setFieldName(input.getFieldName());
		result.setTypeName(input.getTypeName());
		result.setGuid(input.getGuid());
		return result;
	}

	public Set convertToSSetListDataValue(Collection input) {
		Set result = new HashSet();
		for (ListDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetListDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SListDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListListDataValue(Collection input) {
		List result = new ArrayList();
		for (ListDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListListDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SListDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SListDataValue convertToSObject(ListDataValue input) {
		if (input == null) {
			return null;
		}
		
		SListDataValue result = new SListDataValue();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldName(input.getFieldName());
		List listvalues = new ArrayList();
		for (DataValue v : input.getValues()) {
			listvalues.add(convertToSObject(v));
		}
		result.setValues(listvalues);
		return result;
	}
	public ListDataValue convertFromSObject(SListDataValue input, DatabaseSession session) throws BimserverDatabaseException {
		ListDataValue result = convertFromSObject(input, StoreFactory.eINSTANCE.createListDataValue(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ListDataValue convertFromSObject(SListDataValue input, ListDataValue result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setFieldName(input.getFieldName());
		List listvalues = result.getValues();
		for (SDataValue v : input.getValues()) {
			listvalues.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetSimpleDataValue(Collection input) {
		Set result = new HashSet();
		for (SimpleDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetSimpleDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SSimpleDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListSimpleDataValue(Collection input) {
		List result = new ArrayList();
		for (SimpleDataValue o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListSimpleDataValue(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SSimpleDataValue o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SSimpleDataValue convertToSObject(SimpleDataValue input) {
		if (input == null) {
			return null;
		}
		
		SSimpleDataValue result = new SSimpleDataValue();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldName(input.getFieldName());
		result.setStringValue(input.getStringValue());
		return result;
	}
	public SimpleDataValue convertFromSObject(SSimpleDataValue input, DatabaseSession session) throws BimserverDatabaseException {
		SimpleDataValue result = convertFromSObject(input, StoreFactory.eINSTANCE.createSimpleDataValue(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public SimpleDataValue convertFromSObject(SSimpleDataValue input, SimpleDataValue result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setFieldName(input.getFieldName());
		result.setStringValue(input.getStringValue());
		return result;
	}

	public Set convertToSSetDatabaseInformationItem(Collection input) {
		Set result = new HashSet();
		for (DatabaseInformationItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDatabaseInformationItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDatabaseInformationItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDatabaseInformationItem(Collection input) {
		List result = new ArrayList();
		for (DatabaseInformationItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDatabaseInformationItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDatabaseInformationItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDatabaseInformationItem convertToSObject(DatabaseInformationItem input) {
		if (input == null) {
			return null;
		}
		
		SDatabaseInformationItem result = new SDatabaseInformationItem();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setKey(input.getKey());
		result.setValue(input.getValue());
		return result;
	}
	public DatabaseInformationItem convertFromSObject(SDatabaseInformationItem input, DatabaseSession session) throws BimserverDatabaseException {
		DatabaseInformationItem result = convertFromSObject(input, StoreFactory.eINSTANCE.createDatabaseInformationItem(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DatabaseInformationItem convertFromSObject(SDatabaseInformationItem input, DatabaseInformationItem result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setKey(input.getKey());
		result.setValue(input.getValue());
		return result;
	}

	public Set convertToSSetDatabaseInformationCategory(Collection input) {
		Set result = new HashSet();
		for (DatabaseInformationCategory o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDatabaseInformationCategory(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDatabaseInformationCategory o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDatabaseInformationCategory(Collection input) {
		List result = new ArrayList();
		for (DatabaseInformationCategory o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDatabaseInformationCategory(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDatabaseInformationCategory o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDatabaseInformationCategory convertToSObject(DatabaseInformationCategory input) {
		if (input == null) {
			return null;
		}
		
		SDatabaseInformationCategory result = new SDatabaseInformationCategory();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setTitle(input.getTitle());
		List listitems = new ArrayList();
		for (DatabaseInformationItem v : input.getItems()) {
			listitems.add(convertToSObject(v));
		}
		result.setItems(listitems);
		return result;
	}
	public DatabaseInformationCategory convertFromSObject(SDatabaseInformationCategory input, DatabaseSession session) throws BimserverDatabaseException {
		DatabaseInformationCategory result = convertFromSObject(input, StoreFactory.eINSTANCE.createDatabaseInformationCategory(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DatabaseInformationCategory convertFromSObject(SDatabaseInformationCategory input, DatabaseInformationCategory result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setTitle(input.getTitle());
		List listitems = result.getItems();
		for (SDatabaseInformationItem v : input.getItems()) {
			listitems.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetDatabaseInformation(Collection input) {
		Set result = new HashSet();
		for (DatabaseInformation o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDatabaseInformation(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDatabaseInformation o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDatabaseInformation(Collection input) {
		List result = new ArrayList();
		for (DatabaseInformation o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDatabaseInformation(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDatabaseInformation o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDatabaseInformation convertToSObject(DatabaseInformation input) {
		if (input == null) {
			return null;
		}
		
		SDatabaseInformation result = new SDatabaseInformation();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setNumberOfProjects(input.getNumberOfProjects());
		result.setNumberOfUsers(input.getNumberOfUsers());
		result.setNumberOfRevisions(input.getNumberOfRevisions());
		result.setNumberOfCheckouts(input.getNumberOfCheckouts());
		result.setDatabaseSizeInBytes(input.getDatabaseSizeInBytes());
		result.setType(input.getType());
		result.setCreated(input.getCreated());
		result.setLocation(input.getLocation());
		result.setSchemaVersion(input.getSchemaVersion());
		List listcategories = new ArrayList();
		for (DatabaseInformationCategory v : input.getCategories()) {
			listcategories.add(convertToSObject(v));
		}
		result.setCategories(listcategories);
		return result;
	}
	public DatabaseInformation convertFromSObject(SDatabaseInformation input, DatabaseSession session) throws BimserverDatabaseException {
		DatabaseInformation result = convertFromSObject(input, StoreFactory.eINSTANCE.createDatabaseInformation(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DatabaseInformation convertFromSObject(SDatabaseInformation input, DatabaseInformation result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setNumberOfProjects(input.getNumberOfProjects());
		result.setNumberOfUsers(input.getNumberOfUsers());
		result.setNumberOfRevisions(input.getNumberOfRevisions());
		result.setNumberOfCheckouts(input.getNumberOfCheckouts());
		result.setDatabaseSizeInBytes(input.getDatabaseSizeInBytes());
		result.setType(input.getType());
		result.setCreated(input.getCreated());
		result.setLocation(input.getLocation());
		result.setSchemaVersion(input.getSchemaVersion());
		List listcategories = result.getCategories();
		for (SDatabaseInformationCategory v : input.getCategories()) {
			listcategories.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (PluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (PluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPluginDescriptor convertToSObject(PluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof WebModulePluginDescriptor) {
			return convertToSObject((WebModulePluginDescriptor)input);
		}
		else if (input instanceof ModelComparePluginDescriptor) {
			return convertToSObject((ModelComparePluginDescriptor)input);
		}
		else if (input instanceof RenderEnginePluginDescriptor) {
			return convertToSObject((RenderEnginePluginDescriptor)input);
		}
		else if (input instanceof SerializerPluginDescriptor) {
			return convertToSObject((SerializerPluginDescriptor)input);
		}
		else if (input instanceof DeserializerPluginDescriptor) {
			return convertToSObject((DeserializerPluginDescriptor)input);
		}
		else if (input instanceof ModelMergerPluginDescriptor) {
			return convertToSObject((ModelMergerPluginDescriptor)input);
		}
		else if (input instanceof ServicePluginDescriptor) {
			return convertToSObject((ServicePluginDescriptor)input);
		}
		else if (input instanceof QueryEnginePluginDescriptor) {
			return convertToSObject((QueryEnginePluginDescriptor)input);
		}
		else if (input instanceof ModelCheckerPluginDescriptor) {
			return convertToSObject((ModelCheckerPluginDescriptor)input);
		}
		SPluginDescriptor result = new SPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public PluginDescriptor convertFromSObject(SPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		PluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PluginDescriptor convertFromSObject(SPluginDescriptor input, PluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SWebModulePluginDescriptor) {
			return convertFromSObject((SWebModulePluginDescriptor)input, session);
		}
		else if (input instanceof SModelComparePluginDescriptor) {
			return convertFromSObject((SModelComparePluginDescriptor)input, session);
		}
		else if (input instanceof SRenderEnginePluginDescriptor) {
			return convertFromSObject((SRenderEnginePluginDescriptor)input, session);
		}
		else if (input instanceof SSerializerPluginDescriptor) {
			return convertFromSObject((SSerializerPluginDescriptor)input, session);
		}
		else if (input instanceof SDeserializerPluginDescriptor) {
			return convertFromSObject((SDeserializerPluginDescriptor)input, session);
		}
		else if (input instanceof SModelMergerPluginDescriptor) {
			return convertFromSObject((SModelMergerPluginDescriptor)input, session);
		}
		else if (input instanceof SServicePluginDescriptor) {
			return convertFromSObject((SServicePluginDescriptor)input, session);
		}
		else if (input instanceof SQueryEnginePluginDescriptor) {
			return convertFromSObject((SQueryEnginePluginDescriptor)input, session);
		}
		else if (input instanceof SModelCheckerPluginDescriptor) {
			return convertFromSObject((SModelCheckerPluginDescriptor)input, session);
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetSerializerPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (SerializerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetSerializerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SSerializerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListSerializerPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (SerializerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListSerializerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SSerializerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SSerializerPluginDescriptor convertToSObject(SerializerPluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SSerializerPluginDescriptor result = new SSerializerPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public SerializerPluginDescriptor convertFromSObject(SSerializerPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		SerializerPluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createSerializerPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public SerializerPluginDescriptor convertFromSObject(SSerializerPluginDescriptor input, SerializerPluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetDeserializerPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (DeserializerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDeserializerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDeserializerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDeserializerPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (DeserializerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDeserializerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDeserializerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDeserializerPluginDescriptor convertToSObject(DeserializerPluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SDeserializerPluginDescriptor result = new SDeserializerPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public DeserializerPluginDescriptor convertFromSObject(SDeserializerPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		DeserializerPluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createDeserializerPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DeserializerPluginDescriptor convertFromSObject(SDeserializerPluginDescriptor input, DeserializerPluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetRevisionSummaryType(Collection input) {
		Set result = new HashSet();
		for (RevisionSummaryType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionSummaryType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionSummaryType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionSummaryType(Collection input) {
		List result = new ArrayList();
		for (RevisionSummaryType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionSummaryType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionSummaryType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionSummaryType convertToSObject(RevisionSummaryType input) {
		if (input == null) {
			return null;
		}
		
		SRevisionSummaryType result = new SRevisionSummaryType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setCount(input.getCount());
		result.setSchema(input.getSchema());
		return result;
	}
	public RevisionSummaryType convertFromSObject(SRevisionSummaryType input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionSummaryType result = convertFromSObject(input, StoreFactory.eINSTANCE.createRevisionSummaryType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionSummaryType convertFromSObject(SRevisionSummaryType input, RevisionSummaryType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setCount(input.getCount());
		result.setSchema(input.getSchema());
		return result;
	}

	public Set convertToSSetRevisionSummaryContainer(Collection input) {
		Set result = new HashSet();
		for (RevisionSummaryContainer o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionSummaryContainer(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionSummaryContainer o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionSummaryContainer(Collection input) {
		List result = new ArrayList();
		for (RevisionSummaryContainer o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionSummaryContainer(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionSummaryContainer o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionSummaryContainer convertToSObject(RevisionSummaryContainer input) {
		if (input == null) {
			return null;
		}
		
		SRevisionSummaryContainer result = new SRevisionSummaryContainer();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		List listtypes = new ArrayList();
		for (RevisionSummaryType v : input.getTypes()) {
			listtypes.add(convertToSObject(v));
		}
		result.setTypes(listtypes);
		return result;
	}
	public RevisionSummaryContainer convertFromSObject(SRevisionSummaryContainer input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionSummaryContainer result = convertFromSObject(input, StoreFactory.eINSTANCE.createRevisionSummaryContainer(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionSummaryContainer convertFromSObject(SRevisionSummaryContainer input, RevisionSummaryContainer result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		List listtypes = result.getTypes();
		for (SRevisionSummaryType v : input.getTypes()) {
			listtypes.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetRevisionSummary(Collection input) {
		Set result = new HashSet();
		for (RevisionSummary o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRevisionSummary(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRevisionSummary o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRevisionSummary(Collection input) {
		List result = new ArrayList();
		for (RevisionSummary o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRevisionSummary(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRevisionSummary o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRevisionSummary convertToSObject(RevisionSummary input) {
		if (input == null) {
			return null;
		}
		
		SRevisionSummary result = new SRevisionSummary();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listlist = new ArrayList();
		for (RevisionSummaryContainer v : input.getList()) {
			listlist.add(convertToSObject(v));
		}
		result.setList(listlist);
		return result;
	}
	public RevisionSummary convertFromSObject(SRevisionSummary input, DatabaseSession session) throws BimserverDatabaseException {
		RevisionSummary result = convertFromSObject(input, StoreFactory.eINSTANCE.createRevisionSummary(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RevisionSummary convertFromSObject(SRevisionSummary input, RevisionSummary result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listlist = result.getList();
		for (SRevisionSummaryContainer v : input.getList()) {
			listlist.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetLongAction(Collection input) {
		Set result = new HashSet();
		for (LongAction o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetLongAction(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SLongAction o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListLongAction(Collection input) {
		List result = new ArrayList();
		for (LongAction o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListLongAction(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SLongAction o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SLongAction convertToSObject(LongAction input) {
		if (input == null) {
			return null;
		}
		
		SLongAction result = new SLongAction();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setIdentification(input.getIdentification());
		result.setStart(input.getStart());
		result.setUsername(input.getUsername());
		result.setName(input.getName());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		return result;
	}
	public LongAction convertFromSObject(SLongAction input, DatabaseSession session) throws BimserverDatabaseException {
		LongAction result = convertFromSObject(input, StoreFactory.eINSTANCE.createLongAction(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public LongAction convertFromSObject(SLongAction input, LongAction result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setIdentification(input.getIdentification());
		result.setStart(input.getStart());
		result.setUsername(input.getUsername());
		result.setName(input.getName());
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetObjectIDMPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (ObjectIDMPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectIDMPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectIDMPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectIDMPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (ObjectIDMPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectIDMPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectIDMPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectIDMPluginDescriptor convertToSObject(ObjectIDMPluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SObjectIDMPluginDescriptor result = new SObjectIDMPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setClassName(input.getClassName());
		return result;
	}
	public ObjectIDMPluginDescriptor convertFromSObject(SObjectIDMPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectIDMPluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectIDMPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectIDMPluginDescriptor convertFromSObject(SObjectIDMPluginDescriptor input, ObjectIDMPluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setClassName(input.getClassName());
		return result;
	}
		public SCompareType convertToSObject(CompareType input) {
			return SCompareType.values()[input.ordinal()];
		}
		
		public CompareType convertFromSObject(SCompareType input) {
			return CompareType.values()[input.ordinal()];
		}

	public Set convertToSSetCompareItem(Collection input) {
		Set result = new HashSet();
		for (CompareItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCompareItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCompareItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCompareItem(Collection input) {
		List result = new ArrayList();
		for (CompareItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCompareItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCompareItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCompareItem convertToSObject(CompareItem input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ObjectRemoved) {
			return convertToSObject((ObjectRemoved)input);
		}
		else if (input instanceof ObjectAdded) {
			return convertToSObject((ObjectAdded)input);
		}
		else if (input instanceof ObjectModified) {
			return convertToSObject((ObjectModified)input);
		}
		SCompareItem result = new SCompareItem();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		DataObject dataObjectVal = input.getDataObject();
		result.setDataObject(convertToSObject(dataObjectVal));
		return result;
	}
	public CompareItem convertFromSObject(SCompareItem input, DatabaseSession session) throws BimserverDatabaseException {
		CompareItem result = convertFromSObject(input, StoreFactory.eINSTANCE.createCompareItem(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public CompareItem convertFromSObject(SCompareItem input, CompareItem result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SObjectRemoved) {
			return convertFromSObject((SObjectRemoved)input, session);
		}
		else if (input instanceof SObjectAdded) {
			return convertFromSObject((SObjectAdded)input, session);
		}
		else if (input instanceof SObjectModified) {
			return convertFromSObject((SObjectModified)input, session);
		}
		result.setDataObject(convertFromSObject(input.getDataObject(), session));
		return result;
	}

	public Set convertToSSetObjectAdded(Collection input) {
		Set result = new HashSet();
		for (ObjectAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectAdded(Collection input) {
		List result = new ArrayList();
		for (ObjectAdded o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectAdded(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectAdded o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectAdded convertToSObject(ObjectAdded input) {
		if (input == null) {
			return null;
		}
		
		SObjectAdded result = new SObjectAdded();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		DataObject dataObjectVal = input.getDataObject();
		result.setDataObject(convertToSObject(dataObjectVal));
		return result;
	}
	public ObjectAdded convertFromSObject(SObjectAdded input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectAdded result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectAdded(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectAdded convertFromSObject(SObjectAdded input, ObjectAdded result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDataObject(convertFromSObject(input.getDataObject(), session));
		return result;
	}

	public Set convertToSSetObjectRemoved(Collection input) {
		Set result = new HashSet();
		for (ObjectRemoved o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectRemoved(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectRemoved o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectRemoved(Collection input) {
		List result = new ArrayList();
		for (ObjectRemoved o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectRemoved(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectRemoved o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectRemoved convertToSObject(ObjectRemoved input) {
		if (input == null) {
			return null;
		}
		
		SObjectRemoved result = new SObjectRemoved();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		DataObject dataObjectVal = input.getDataObject();
		result.setDataObject(convertToSObject(dataObjectVal));
		return result;
	}
	public ObjectRemoved convertFromSObject(SObjectRemoved input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectRemoved result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectRemoved(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectRemoved convertFromSObject(SObjectRemoved input, ObjectRemoved result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setDataObject(convertFromSObject(input.getDataObject(), session));
		return result;
	}

	public Set convertToSSetObjectModified(Collection input) {
		Set result = new HashSet();
		for (ObjectModified o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectModified(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectModified o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectModified(Collection input) {
		List result = new ArrayList();
		for (ObjectModified o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectModified(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectModified o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectModified convertToSObject(ObjectModified input) {
		if (input == null) {
			return null;
		}
		
		SObjectModified result = new SObjectModified();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldName(input.getFieldName());
		result.setOldValue(input.getOldValue());
		result.setNewValue(input.getNewValue());
		DataObject dataObjectVal = input.getDataObject();
		result.setDataObject(convertToSObject(dataObjectVal));
		return result;
	}
	public ObjectModified convertFromSObject(SObjectModified input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectModified result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectModified(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectModified convertFromSObject(SObjectModified input, ObjectModified result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setFieldName(input.getFieldName());
		result.setOldValue(input.getOldValue());
		result.setNewValue(input.getNewValue());
		result.setDataObject(convertFromSObject(input.getDataObject(), session));
		return result;
	}

	public Set convertToSSetCompareContainer(Collection input) {
		Set result = new HashSet();
		for (CompareContainer o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCompareContainer(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCompareContainer o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCompareContainer(Collection input) {
		List result = new ArrayList();
		for (CompareContainer o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCompareContainer(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCompareContainer o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCompareContainer convertToSObject(CompareContainer input) {
		if (input == null) {
			return null;
		}
		
		SCompareContainer result = new SCompareContainer();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setType(input.getType());
		List listitems = new ArrayList();
		for (CompareItem v : input.getItems()) {
			listitems.add(convertToSObject(v));
		}
		result.setItems(listitems);
		return result;
	}
	public CompareContainer convertFromSObject(SCompareContainer input, DatabaseSession session) throws BimserverDatabaseException {
		CompareContainer result = convertFromSObject(input, StoreFactory.eINSTANCE.createCompareContainer(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public CompareContainer convertFromSObject(SCompareContainer input, CompareContainer result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setType(input.getType());
		List listitems = result.getItems();
		for (SCompareItem v : input.getItems()) {
			listitems.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetCompareResult(Collection input) {
		Set result = new HashSet();
		for (CompareResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetCompareResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SCompareResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListCompareResult(Collection input) {
		List result = new ArrayList();
		for (CompareResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListCompareResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SCompareResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SCompareResult convertToSObject(CompareResult input) {
		if (input == null) {
			return null;
		}
		
		SCompareResult result = new SCompareResult();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listitems = new ArrayList();
		for (CompareContainer v : input.getItems()) {
			listitems.add(convertToSObject(v));
		}
		result.setItems(listitems);
		return result;
	}
	public CompareResult convertFromSObject(SCompareResult input, DatabaseSession session) throws BimserverDatabaseException {
		CompareResult result = convertFromSObject(input, StoreFactory.eINSTANCE.createCompareResult(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public CompareResult convertFromSObject(SCompareResult input, CompareResult result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listitems = result.getItems();
		for (SCompareContainer v : input.getItems()) {
			listitems.add(convertFromSObject(v, session));
		}
		return result;
	}
		public SActionState convertToSObject(ActionState input) {
			return SActionState.values()[input.ordinal()];
		}
		
		public ActionState convertFromSObject(SActionState input) {
			return ActionState.values()[input.ordinal()];
		}

	public Set convertToSSetLongActionState(Collection input) {
		Set result = new HashSet();
		for (LongActionState o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetLongActionState(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SLongActionState o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListLongActionState(Collection input) {
		List result = new ArrayList();
		for (LongActionState o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListLongActionState(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SLongActionState o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SLongActionState convertToSObject(LongActionState input) {
		if (input == null) {
			return null;
		}
		
		SLongActionState result = new SLongActionState();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setStart(input.getStart());
		result.setEnd(input.getEnd());
		result.setProgress(input.getProgress());
		result.setState(SActionState.values()[input.getState().ordinal()]);
		result.setTitle(input.getTitle());
		result.setStage(input.getStage());
		result.getErrors().addAll(input.getErrors());
		result.getWarnings().addAll(input.getWarnings());
		result.getInfos().addAll(input.getInfos());
		return result;
	}
	public LongActionState convertFromSObject(SLongActionState input, DatabaseSession session) throws BimserverDatabaseException {
		LongActionState result = convertFromSObject(input, StoreFactory.eINSTANCE.createLongActionState(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public LongActionState convertFromSObject(SLongActionState input, LongActionState result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setStart(input.getStart());
		result.setEnd(input.getEnd());
		result.setProgress(input.getProgress());
		result.setState(ActionState.values()[input.getState().ordinal()]);
		result.setTitle(input.getTitle());
		result.setStage(input.getStage());
		result.getErrors().addAll(input.getErrors());
		result.getWarnings().addAll(input.getWarnings());
		result.getInfos().addAll(input.getInfos());
		return result;
	}
		public SServerState convertToSObject(ServerState input) {
			return SServerState.values()[input.ordinal()];
		}
		
		public ServerState convertFromSObject(SServerState input) {
			return ServerState.values()[input.ordinal()];
		}

	public Set convertToSSetServerInfo(Collection input) {
		Set result = new HashSet();
		for (ServerInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServerInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServerInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServerInfo(Collection input) {
		List result = new ArrayList();
		for (ServerInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServerInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServerInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServerInfo convertToSObject(ServerInfo input) {
		if (input == null) {
			return null;
		}
		
		SServerInfo result = new SServerInfo();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setServerState(SServerState.values()[input.getServerState().ordinal()]);
		result.setErrorMessage(input.getErrorMessage());
		Version versionVal = input.getVersion();
		result.setVersion(convertToSObject(versionVal));
		return result;
	}
	public ServerInfo convertFromSObject(SServerInfo input, DatabaseSession session) throws BimserverDatabaseException {
		ServerInfo result = convertFromSObject(input, StoreFactory.eINSTANCE.createServerInfo(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServerInfo convertFromSObject(SServerInfo input, ServerInfo result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setServerState(ServerState.values()[input.getServerState().ordinal()]);
		result.setErrorMessage(input.getErrorMessage());
		result.setVersion(convertFromSObject(input.getVersion(), session));
		return result;
	}

	public Set convertToSSetVersion(Collection input) {
		Set result = new HashSet();
		for (Version o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetVersion(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SVersion o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListVersion(Collection input) {
		List result = new ArrayList();
		for (Version o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListVersion(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SVersion o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SVersion convertToSObject(Version input) {
		if (input == null) {
			return null;
		}
		
		SVersion result = new SVersion();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setMajor(input.getMajor());
		result.setMinor(input.getMinor());
		result.setRevision(input.getRevision());
		result.setDate(input.getDate());
		result.setDownloadUrl(input.getDownloadUrl());
		result.setSupportUrl(input.getSupportUrl());
		result.setSupportEmail(input.getSupportEmail());
		return result;
	}
	public Version convertFromSObject(SVersion input, DatabaseSession session) throws BimserverDatabaseException {
		Version result = convertFromSObject(input, StoreFactory.eINSTANCE.createVersion(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Version convertFromSObject(SVersion input, Version result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setMajor(input.getMajor());
		result.setMinor(input.getMinor());
		result.setRevision(input.getRevision());
		result.setDate(input.getDate());
		result.setDownloadUrl(input.getDownloadUrl());
		result.setSupportUrl(input.getSupportUrl());
		result.setSupportEmail(input.getSupportEmail());
		return result;
	}

	public Set convertToSSetRenderEnginePluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (RenderEnginePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRenderEnginePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRenderEnginePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRenderEnginePluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (RenderEnginePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRenderEnginePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRenderEnginePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRenderEnginePluginDescriptor convertToSObject(RenderEnginePluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SRenderEnginePluginDescriptor result = new SRenderEnginePluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public RenderEnginePluginDescriptor convertFromSObject(SRenderEnginePluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		RenderEnginePluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createRenderEnginePluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RenderEnginePluginDescriptor convertFromSObject(SRenderEnginePluginDescriptor input, RenderEnginePluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}
		public SExtendedDataSchemaType convertToSObject(ExtendedDataSchemaType input) {
			return SExtendedDataSchemaType.values()[input.ordinal()];
		}
		
		public ExtendedDataSchemaType convertFromSObject(SExtendedDataSchemaType input) {
			return ExtendedDataSchemaType.values()[input.ordinal()];
		}

	public Set convertToSSetFile(Collection input) {
		Set result = new HashSet();
		for (File o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetFile(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SFile o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListFile(Collection input) {
		List result = new ArrayList();
		for (File o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListFile(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SFile o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SFile convertToSObject(File input) {
		if (input == null) {
			return null;
		}
		
		SFile result = new SFile();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setData(input.getData());
		result.setFilename(input.getFilename());
		result.setMime(input.getMime());
		return result;
	}
	public File convertFromSObject(SFile input, DatabaseSession session) throws BimserverDatabaseException {
		File result = convertFromSObject(input, StoreFactory.eINSTANCE.createFile(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public File convertFromSObject(SFile input, File result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setData(input.getData());
		result.setFilename(input.getFilename());
		result.setMime(input.getMime());
		return result;
	}

	public Set convertToSSetExtendedDataSchema(Collection input) {
		Set result = new HashSet();
		for (ExtendedDataSchema o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetExtendedDataSchema(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SExtendedDataSchema o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListExtendedDataSchema(Collection input) {
		List result = new ArrayList();
		for (ExtendedDataSchema o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListExtendedDataSchema(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SExtendedDataSchema o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SExtendedDataSchema convertToSObject(ExtendedDataSchema input) {
		if (input == null) {
			return null;
		}
		
		SExtendedDataSchema result = new SExtendedDataSchema();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setUrl(input.getUrl());
		result.setNamespace(input.getNamespace());
		result.setDescription(input.getDescription());
		result.setSize(input.getSize());
		result.setValidate(input.isValidate());
		result.setType(SExtendedDataSchemaType.values()[input.getType().ordinal()]);
		File fileVal = input.getFile();
		result.setFileId(fileVal == null ? -1 : fileVal.getOid());
		List listusers = new ArrayList();
		for (User v : input.getUsers()) {
			listusers.add(v.getOid());
		}
		result.setUsers(listusers);
		List listextendedData = new ArrayList();
		for (ExtendedData v : input.getExtendedData()) {
			listextendedData.add(v.getOid());
		}
		result.setExtendedData(listextendedData);
		return result;
	}
	public ExtendedDataSchema convertFromSObject(SExtendedDataSchema input, DatabaseSession session) throws BimserverDatabaseException {
		ExtendedDataSchema result = convertFromSObject(input, StoreFactory.eINSTANCE.createExtendedDataSchema(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ExtendedDataSchema convertFromSObject(SExtendedDataSchema input, ExtendedDataSchema result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setUrl(input.getUrl());
		result.setNamespace(input.getNamespace());
		result.setDescription(input.getDescription());
		result.setSize(input.getSize());
		result.setValidate(input.isValidate());
		result.setType(ExtendedDataSchemaType.values()[input.getType().ordinal()]);
		result.setFile((File)session.get(StorePackage.eINSTANCE.getFile(), input.getFileId(), OldQuery.getDefault()));
		List listusers = result.getUsers();
		for (long oid : input.getUsers()) {
			listusers.add((User)session.get(StorePackage.eINSTANCE.getUser(), oid, OldQuery.getDefault()));
		}
		List listextendedData = result.getExtendedData();
		for (long oid : input.getExtendedData()) {
			listextendedData.add((ExtendedData)session.get(StorePackage.eINSTANCE.getExtendedData(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetExtendedData(Collection input) {
		Set result = new HashSet();
		for (ExtendedData o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetExtendedData(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SExtendedData o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListExtendedData(Collection input) {
		List result = new ArrayList();
		for (ExtendedData o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListExtendedData(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SExtendedData o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SExtendedData convertToSObject(ExtendedData input) {
		if (input == null) {
			return null;
		}
		
		SExtendedData result = new SExtendedData();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setUrl(input.getUrl());
		result.setSize(input.getSize());
		result.setTitle(input.getTitle());
		result.setAdded(input.getAdded());
		File fileVal = input.getFile();
		result.setFileId(fileVal == null ? -1 : fileVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		ExtendedDataSchema schemaVal = input.getSchema();
		result.setSchemaId(schemaVal == null ? -1 : schemaVal.getOid());
		Revision revisionVal = input.getRevision();
		result.setRevisionId(revisionVal == null ? -1 : revisionVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		return result;
	}
	public ExtendedData convertFromSObject(SExtendedData input, DatabaseSession session) throws BimserverDatabaseException {
		ExtendedData result = convertFromSObject(input, StoreFactory.eINSTANCE.createExtendedData(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ExtendedData convertFromSObject(SExtendedData input, ExtendedData result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setUrl(input.getUrl());
		result.setSize(input.getSize());
		result.setTitle(input.getTitle());
		result.setAdded(input.getAdded());
		result.setFile((File)session.get(StorePackage.eINSTANCE.getFile(), input.getFileId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setSchema((ExtendedDataSchema)session.get(StorePackage.eINSTANCE.getExtendedDataSchema(), input.getSchemaId(), OldQuery.getDefault()));
		result.setRevision((Revision)session.get(StorePackage.eINSTANCE.getRevision(), input.getRevisionId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetQueryEnginePluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (QueryEnginePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetQueryEnginePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SQueryEnginePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListQueryEnginePluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (QueryEnginePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListQueryEnginePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SQueryEnginePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SQueryEnginePluginDescriptor convertToSObject(QueryEnginePluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SQueryEnginePluginDescriptor result = new SQueryEnginePluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public QueryEnginePluginDescriptor convertFromSObject(SQueryEnginePluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		QueryEnginePluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createQueryEnginePluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public QueryEnginePluginDescriptor convertFromSObject(SQueryEnginePluginDescriptor input, QueryEnginePluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetQueryEnginePluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (QueryEnginePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetQueryEnginePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SQueryEnginePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListQueryEnginePluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (QueryEnginePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListQueryEnginePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SQueryEnginePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SQueryEnginePluginConfiguration convertToSObject(QueryEnginePluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SQueryEnginePluginConfiguration result = new SQueryEnginePluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public QueryEnginePluginConfiguration convertFromSObject(SQueryEnginePluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		QueryEnginePluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createQueryEnginePluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public QueryEnginePluginConfiguration convertFromSObject(SQueryEnginePluginConfiguration input, QueryEnginePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetWebModulePluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (WebModulePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetWebModulePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SWebModulePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListWebModulePluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (WebModulePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListWebModulePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SWebModulePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SWebModulePluginDescriptor convertToSObject(WebModulePluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SWebModulePluginDescriptor result = new SWebModulePluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public WebModulePluginDescriptor convertFromSObject(SWebModulePluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		WebModulePluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createWebModulePluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public WebModulePluginDescriptor convertFromSObject(SWebModulePluginDescriptor input, WebModulePluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetWebModulePluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (WebModulePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetWebModulePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SWebModulePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListWebModulePluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (WebModulePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListWebModulePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SWebModulePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SWebModulePluginConfiguration convertToSObject(WebModulePluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SWebModulePluginConfiguration result = new SWebModulePluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		ServerSettings serverSettingsVal = input.getServerSettings();
		result.setServerSettingsId(serverSettingsVal == null ? -1 : serverSettingsVal.getOid());
		return result;
	}
	public WebModulePluginConfiguration convertFromSObject(SWebModulePluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		WebModulePluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createWebModulePluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public WebModulePluginConfiguration convertFromSObject(SWebModulePluginConfiguration input, WebModulePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setServerSettings((ServerSettings)session.get(StorePackage.eINSTANCE.getServerSettings(), input.getServerSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetModelMergerPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (ModelMergerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelMergerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelMergerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelMergerPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (ModelMergerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelMergerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelMergerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelMergerPluginDescriptor convertToSObject(ModelMergerPluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SModelMergerPluginDescriptor result = new SModelMergerPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public ModelMergerPluginDescriptor convertFromSObject(SModelMergerPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ModelMergerPluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelMergerPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelMergerPluginDescriptor convertFromSObject(SModelMergerPluginDescriptor input, ModelMergerPluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetModelMergerPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (ModelMergerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelMergerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelMergerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelMergerPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (ModelMergerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelMergerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelMergerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelMergerPluginConfiguration convertToSObject(ModelMergerPluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SModelMergerPluginConfiguration result = new SModelMergerPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public ModelMergerPluginConfiguration convertFromSObject(SModelMergerPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		ModelMergerPluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelMergerPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelMergerPluginConfiguration convertFromSObject(SModelMergerPluginConfiguration input, ModelMergerPluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetModelComparePluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (ModelComparePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelComparePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelComparePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelComparePluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (ModelComparePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelComparePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelComparePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelComparePluginDescriptor convertToSObject(ModelComparePluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SModelComparePluginDescriptor result = new SModelComparePluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public ModelComparePluginDescriptor convertFromSObject(SModelComparePluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ModelComparePluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelComparePluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelComparePluginDescriptor convertFromSObject(SModelComparePluginDescriptor input, ModelComparePluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetModelComparePluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (ModelComparePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelComparePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelComparePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelComparePluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (ModelComparePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelComparePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelComparePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelComparePluginConfiguration convertToSObject(ModelComparePluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SModelComparePluginConfiguration result = new SModelComparePluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public ModelComparePluginConfiguration convertFromSObject(SModelComparePluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		ModelComparePluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelComparePluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelComparePluginConfiguration convertFromSObject(SModelComparePluginConfiguration input, ModelComparePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}
		public STrigger convertToSObject(Trigger input) {
			return STrigger.values()[input.ordinal()];
		}
		
		public Trigger convertFromSObject(STrigger input) {
			return Trigger.values()[input.ordinal()];
		}

	public Set convertToSSetProfileDescriptor(Collection input) {
		Set result = new HashSet();
		for (ProfileDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProfileDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProfileDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProfileDescriptor(Collection input) {
		List result = new ArrayList();
		for (ProfileDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProfileDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProfileDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProfileDescriptor convertToSObject(ProfileDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SProfileDescriptor result = new SProfileDescriptor();
		result.setName(input.getName());
		result.setDescription(input.getDescription());
		result.setPublicProfile(input.isPublicProfile());
		result.setIdentifier(input.getIdentifier());
		return result;
	}
	public ProfileDescriptor convertFromSObject(SProfileDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ProfileDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createProfileDescriptor(), session);
		
		return result;
	}

	public ProfileDescriptor convertFromSObject(SProfileDescriptor input, ProfileDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setDescription(input.getDescription());
		result.setPublicProfile(input.isPublicProfile());
		result.setIdentifier(input.getIdentifier());
		return result;
	}

	public Set convertToSSetServiceDescriptor(Collection input) {
		Set result = new HashSet();
		for (ServiceDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceDescriptor(Collection input) {
		List result = new ArrayList();
		for (ServiceDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceDescriptor convertToSObject(ServiceDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SServiceDescriptor result = new SServiceDescriptor();
		result.setName(input.getName());
		result.setUrl(input.getUrl());
		result.setToken(input.getToken());
		result.setIdentifier(input.getIdentifier());
		result.setNotificationProtocol(SAccessMethod.values()[input.getNotificationProtocol().ordinal()]);
		result.setDescription(input.getDescription());
		result.setTrigger(STrigger.values()[input.getTrigger().ordinal()]);
		result.setReadRevision(input.isReadRevision());
		result.setReadExtendedData(input.getReadExtendedData());
		result.setWriteRevision(input.isWriteRevision());
		result.setWriteExtendedData(input.getWriteExtendedData());
		result.setProviderName(input.getProviderName());
		result.setCompanyUrl(input.getCompanyUrl());
		result.setTokenUrl(input.getTokenUrl());
		result.setNewProfileUrl(input.getNewProfileUrl());
		return result;
	}
	public ServiceDescriptor convertFromSObject(SServiceDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceDescriptor(), session);
		
		return result;
	}

	public ServiceDescriptor convertFromSObject(SServiceDescriptor input, ServiceDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setUrl(input.getUrl());
		result.setToken(input.getToken());
		result.setIdentifier(input.getIdentifier());
		result.setNotificationProtocol(AccessMethod.values()[input.getNotificationProtocol().ordinal()]);
		result.setDescription(input.getDescription());
		result.setTrigger(Trigger.values()[input.getTrigger().ordinal()]);
		result.setReadRevision(input.isReadRevision());
		result.setReadExtendedData(input.getReadExtendedData());
		result.setWriteRevision(input.isWriteRevision());
		result.setWriteExtendedData(input.getWriteExtendedData());
		result.setProviderName(input.getProviderName());
		result.setCompanyUrl(input.getCompanyUrl());
		result.setTokenUrl(input.getTokenUrl());
		result.setNewProfileUrl(input.getNewProfileUrl());
		return result;
	}

	public Set convertToSSetService(Collection input) {
		Set result = new HashSet();
		for (Service o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetService(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SService o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListService(Collection input) {
		List result = new ArrayList();
		for (Service o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListService(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SService o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SService convertToSObject(Service input) {
		if (input == null) {
			return null;
		}
		
		SService result = new SService();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setServiceName(input.getServiceName());
		result.setServiceIdentifier(input.getServiceIdentifier());
		result.setProviderName(input.getProviderName());
		result.setUrl(input.getUrl());
		result.setToken(input.getToken());
		result.setNotificationProtocol(SAccessMethod.values()[input.getNotificationProtocol().ordinal()]);
		result.setDescription(input.getDescription());
		result.setTrigger(STrigger.values()[input.getTrigger().ordinal()]);
		result.setReadRevision(input.isReadRevision());
		result.setProfileIdentifier(input.getProfileIdentifier());
		result.setProfileName(input.getProfileName());
		result.setProfileDescription(input.getProfileDescription());
		result.setProfilePublic(input.isProfilePublic());
		ExtendedDataSchema readExtendedDataVal = input.getReadExtendedData();
		result.setReadExtendedDataId(readExtendedDataVal == null ? -1 : readExtendedDataVal.getOid());
		Project writeRevisionVal = input.getWriteRevision();
		result.setWriteRevisionId(writeRevisionVal == null ? -1 : writeRevisionVal.getOid());
		ExtendedDataSchema writeExtendedDataVal = input.getWriteExtendedData();
		result.setWriteExtendedDataId(writeExtendedDataVal == null ? -1 : writeExtendedDataVal.getOid());
		Project projectVal = input.getProject();
		result.setProjectId(projectVal == null ? -1 : projectVal.getOid());
		User userVal = input.getUser();
		result.setUserId(userVal == null ? -1 : userVal.getOid());
		InternalServicePluginConfiguration internalServiceVal = input.getInternalService();
		result.setInternalServiceId(internalServiceVal == null ? -1 : internalServiceVal.getOid());
		List listmodelCheckers = new ArrayList();
		for (ModelCheckerInstance v : input.getModelCheckers()) {
			listmodelCheckers.add(v.getOid());
		}
		result.setModelCheckers(listmodelCheckers);
		return result;
	}
	public Service convertFromSObject(SService input, DatabaseSession session) throws BimserverDatabaseException {
		Service result = convertFromSObject(input, StoreFactory.eINSTANCE.createService(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Service convertFromSObject(SService input, Service result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setServiceName(input.getServiceName());
		result.setServiceIdentifier(input.getServiceIdentifier());
		result.setProviderName(input.getProviderName());
		result.setUrl(input.getUrl());
		result.setToken(input.getToken());
		result.setNotificationProtocol(AccessMethod.values()[input.getNotificationProtocol().ordinal()]);
		result.setDescription(input.getDescription());
		result.setTrigger(Trigger.values()[input.getTrigger().ordinal()]);
		result.setReadRevision(input.isReadRevision());
		result.setProfileIdentifier(input.getProfileIdentifier());
		result.setProfileName(input.getProfileName());
		result.setProfileDescription(input.getProfileDescription());
		result.setProfilePublic(input.isProfilePublic());
		result.setReadExtendedData((ExtendedDataSchema)session.get(StorePackage.eINSTANCE.getExtendedDataSchema(), input.getReadExtendedDataId(), OldQuery.getDefault()));
		result.setWriteRevision((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getWriteRevisionId(), OldQuery.getDefault()));
		result.setWriteExtendedData((ExtendedDataSchema)session.get(StorePackage.eINSTANCE.getExtendedDataSchema(), input.getWriteExtendedDataId(), OldQuery.getDefault()));
		result.setProject((Project)session.get(StorePackage.eINSTANCE.getProject(), input.getProjectId(), OldQuery.getDefault()));
		result.setUser((User)session.get(StorePackage.eINSTANCE.getUser(), input.getUserId(), OldQuery.getDefault()));
		result.setInternalService((InternalServicePluginConfiguration)session.get(StorePackage.eINSTANCE.getInternalServicePluginConfiguration(), input.getInternalServiceId(), OldQuery.getDefault()));
		List listmodelCheckers = result.getModelCheckers();
		for (long oid : input.getModelCheckers()) {
			listmodelCheckers.add((ModelCheckerInstance)session.get(StorePackage.eINSTANCE.getModelCheckerInstance(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetToken(Collection input) {
		Set result = new HashSet();
		for (Token o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetToken(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SToken o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListToken(Collection input) {
		List result = new ArrayList();
		for (Token o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListToken(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SToken o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SToken convertToSObject(Token input) {
		if (input == null) {
			return null;
		}
		
		SToken result = new SToken();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setTokenString(input.getTokenString());
		result.setExpires(input.getExpires());
		return result;
	}
	public Token convertFromSObject(SToken input, DatabaseSession session) throws BimserverDatabaseException {
		Token result = convertFromSObject(input, StoreFactory.eINSTANCE.createToken(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Token convertFromSObject(SToken input, Token result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setTokenString(input.getTokenString());
		result.setExpires(input.getExpires());
		return result;
	}

	public Set convertToSSetServicePluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (ServicePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServicePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServicePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServicePluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (ServicePluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServicePluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServicePluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServicePluginDescriptor convertToSObject(ServicePluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SServicePluginDescriptor result = new SServicePluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public ServicePluginDescriptor convertFromSObject(SServicePluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ServicePluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createServicePluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServicePluginDescriptor convertFromSObject(SServicePluginDescriptor input, ServicePluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetInternalServicePluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (InternalServicePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetInternalServicePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SInternalServicePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListInternalServicePluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (InternalServicePluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListInternalServicePluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SInternalServicePluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SInternalServicePluginConfiguration convertToSObject(InternalServicePluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SInternalServicePluginConfiguration result = new SInternalServicePluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setRemoteAccessible(input.isRemoteAccessible());
		result.setPublicProfile(input.isPublicProfile());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public InternalServicePluginConfiguration convertFromSObject(SInternalServicePluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		InternalServicePluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createInternalServicePluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public InternalServicePluginConfiguration convertFromSObject(SInternalServicePluginConfiguration input, InternalServicePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setRemoteAccessible(input.isRemoteAccessible());
		result.setPublicProfile(input.isPublicProfile());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetServiceInterface(Collection input) {
		Set result = new HashSet();
		for (ServiceInterface o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceInterface(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceInterface o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceInterface(Collection input) {
		List result = new ArrayList();
		for (ServiceInterface o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceInterface(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceInterface o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceInterface convertToSObject(ServiceInterface input) {
		if (input == null) {
			return null;
		}
		
		SServiceInterface result = new SServiceInterface();
		result.setName(input.getName());
		result.setNameSpace(input.getNameSpace());
		result.setSimpleName(input.getSimpleName());
		return result;
	}
	public ServiceInterface convertFromSObject(SServiceInterface input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceInterface result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceInterface(), session);
		
		return result;
	}

	public ServiceInterface convertFromSObject(SServiceInterface input, ServiceInterface result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setNameSpace(input.getNameSpace());
		result.setSimpleName(input.getSimpleName());
		return result;
	}

	public Set convertToSSetServiceMethod(Collection input) {
		Set result = new HashSet();
		for (ServiceMethod o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceMethod(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceMethod o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceMethod(Collection input) {
		List result = new ArrayList();
		for (ServiceMethod o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceMethod(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceMethod o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceMethod convertToSObject(ServiceMethod input) {
		if (input == null) {
			return null;
		}
		
		SServiceMethod result = new SServiceMethod();
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		result.setReturnDoc(input.getReturnDoc());
		return result;
	}
	public ServiceMethod convertFromSObject(SServiceMethod input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceMethod result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceMethod(), session);
		
		return result;
	}

	public ServiceMethod convertFromSObject(SServiceMethod input, ServiceMethod result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		result.setReturnDoc(input.getReturnDoc());
		return result;
	}
		public SServiceSimpleType convertToSObject(ServiceSimpleType input) {
			return SServiceSimpleType.values()[input.ordinal()];
		}
		
		public ServiceSimpleType convertFromSObject(SServiceSimpleType input) {
			return ServiceSimpleType.values()[input.ordinal()];
		}

	public Set convertToSSetServiceField(Collection input) {
		Set result = new HashSet();
		for (ServiceField o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceField(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceField o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceField(Collection input) {
		List result = new ArrayList();
		for (ServiceField o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceField(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceField o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceField convertToSObject(ServiceField input) {
		if (input == null) {
			return null;
		}
		
		SServiceField result = new SServiceField();
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		ServiceType typeVal = input.getType();
		result.setType(convertToSObject(typeVal));
		ServiceType genericTypeVal = input.getGenericType();
		result.setGenericType(convertToSObject(genericTypeVal));
		return result;
	}
	public ServiceField convertFromSObject(SServiceField input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceField result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceField(), session);
		
		return result;
	}

	public ServiceField convertFromSObject(SServiceField input, ServiceField result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		result.setType(convertFromSObject(input.getType(), session));
		result.setGenericType(convertFromSObject(input.getGenericType(), session));
		return result;
	}

	public Set convertToSSetServiceType(Collection input) {
		Set result = new HashSet();
		for (ServiceType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceType(Collection input) {
		List result = new ArrayList();
		for (ServiceType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceType convertToSObject(ServiceType input) {
		if (input == null) {
			return null;
		}
		
		SServiceType result = new SServiceType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setSimpleName(input.getSimpleName());
		result.setSimpleType(SServiceSimpleType.values()[input.getSimpleType().ordinal()]);
		List listfields = new ArrayList();
		for (ServiceField v : input.getFields()) {
			listfields.add(convertToSObject(v));
		}
		result.setFields(listfields);
		return result;
	}
	public ServiceType convertFromSObject(SServiceType input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceType result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ServiceType convertFromSObject(SServiceType input, ServiceType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setSimpleName(input.getSimpleName());
		result.setSimpleType(ServiceSimpleType.values()[input.getSimpleType().ordinal()]);
		List listfields = result.getFields();
		for (SServiceField v : input.getFields()) {
			listfields.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetServiceParameter(Collection input) {
		Set result = new HashSet();
		for (ServiceParameter o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetServiceParameter(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SServiceParameter o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListServiceParameter(Collection input) {
		List result = new ArrayList();
		for (ServiceParameter o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListServiceParameter(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SServiceParameter o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SServiceParameter convertToSObject(ServiceParameter input) {
		if (input == null) {
			return null;
		}
		
		SServiceParameter result = new SServiceParameter();
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		ServiceType typeVal = input.getType();
		result.setType(convertToSObject(typeVal));
		ServiceType genericTypeVal = input.getGenericType();
		result.setGenericType(convertToSObject(genericTypeVal));
		return result;
	}
	public ServiceParameter convertFromSObject(SServiceParameter input, DatabaseSession session) throws BimserverDatabaseException {
		ServiceParameter result = convertFromSObject(input, StoreFactory.eINSTANCE.createServiceParameter(), session);
		
		return result;
	}

	public ServiceParameter convertFromSObject(SServiceParameter input, ServiceParameter result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setDoc(input.getDoc());
		result.setType(convertFromSObject(input.getType(), session));
		result.setGenericType(convertFromSObject(input.getGenericType(), session));
		return result;
	}
		public SPrimitiveEnum convertToSObject(PrimitiveEnum input) {
			return SPrimitiveEnum.values()[input.ordinal()];
		}
		
		public PrimitiveEnum convertFromSObject(SPrimitiveEnum input) {
			return PrimitiveEnum.values()[input.ordinal()];
		}

	public Set convertToSSetTypeDefinition(Collection input) {
		Set result = new HashSet();
		for (TypeDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetTypeDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (STypeDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListTypeDefinition(Collection input) {
		List result = new ArrayList();
		for (TypeDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListTypeDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (STypeDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public STypeDefinition convertToSObject(TypeDefinition input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ArrayDefinition) {
			return convertToSObject((ArrayDefinition)input);
		}
		else if (input instanceof ObjectDefinition) {
			return convertToSObject((ObjectDefinition)input);
		}
		else if (input instanceof PrimitiveDefinition) {
			return convertToSObject((PrimitiveDefinition)input);
		}
		STypeDefinition result = new STypeDefinition();
		return result;
	}
	public TypeDefinition convertFromSObject(STypeDefinition input, DatabaseSession session) throws BimserverDatabaseException {
		TypeDefinition result = convertFromSObject(input, StoreFactory.eINSTANCE.createTypeDefinition(), session);
		
		return result;
	}

	public TypeDefinition convertFromSObject(STypeDefinition input, TypeDefinition result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SArrayDefinition) {
			return convertFromSObject((SArrayDefinition)input, session);
		}
		else if (input instanceof SObjectDefinition) {
			return convertFromSObject((SObjectDefinition)input, session);
		}
		else if (input instanceof SPrimitiveDefinition) {
			return convertFromSObject((SPrimitiveDefinition)input, session);
		}
		return result;
	}

	public Set convertToSSetObjectDefinition(Collection input) {
		Set result = new HashSet();
		for (ObjectDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectDefinition(Collection input) {
		List result = new ArrayList();
		for (ObjectDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectDefinition convertToSObject(ObjectDefinition input) {
		if (input == null) {
			return null;
		}
		
		SObjectDefinition result = new SObjectDefinition();
		List listparameters = new ArrayList();
		for (ParameterDefinition v : input.getParameters()) {
			listparameters.add(convertToSObject(v));
		}
		result.setParameters(listparameters);
		return result;
	}
	public ObjectDefinition convertFromSObject(SObjectDefinition input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectDefinition result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectDefinition(), session);
		
		return result;
	}

	public ObjectDefinition convertFromSObject(SObjectDefinition input, ObjectDefinition result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listparameters = result.getParameters();
		for (SParameterDefinition v : input.getParameters()) {
			listparameters.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetPrimitiveDefinition(Collection input) {
		Set result = new HashSet();
		for (PrimitiveDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPrimitiveDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPrimitiveDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPrimitiveDefinition(Collection input) {
		List result = new ArrayList();
		for (PrimitiveDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPrimitiveDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPrimitiveDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPrimitiveDefinition convertToSObject(PrimitiveDefinition input) {
		if (input == null) {
			return null;
		}
		
		SPrimitiveDefinition result = new SPrimitiveDefinition();
		result.setType(SPrimitiveEnum.values()[input.getType().ordinal()]);
		return result;
	}
	public PrimitiveDefinition convertFromSObject(SPrimitiveDefinition input, DatabaseSession session) throws BimserverDatabaseException {
		PrimitiveDefinition result = convertFromSObject(input, StoreFactory.eINSTANCE.createPrimitiveDefinition(), session);
		
		return result;
	}

	public PrimitiveDefinition convertFromSObject(SPrimitiveDefinition input, PrimitiveDefinition result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setType(PrimitiveEnum.values()[input.getType().ordinal()]);
		return result;
	}

	public Set convertToSSetArrayDefinition(Collection input) {
		Set result = new HashSet();
		for (ArrayDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetArrayDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SArrayDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListArrayDefinition(Collection input) {
		List result = new ArrayList();
		for (ArrayDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListArrayDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SArrayDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SArrayDefinition convertToSObject(ArrayDefinition input) {
		if (input == null) {
			return null;
		}
		
		SArrayDefinition result = new SArrayDefinition();
		TypeDefinition typeVal = input.getType();
		result.setType(convertToSObject(typeVal));
		return result;
	}
	public ArrayDefinition convertFromSObject(SArrayDefinition input, DatabaseSession session) throws BimserverDatabaseException {
		ArrayDefinition result = convertFromSObject(input, StoreFactory.eINSTANCE.createArrayDefinition(), session);
		
		return result;
	}

	public ArrayDefinition convertFromSObject(SArrayDefinition input, ArrayDefinition result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setType(convertFromSObject(input.getType(), session));
		return result;
	}

	public Set convertToSSetParameterDefinition(Collection input) {
		Set result = new HashSet();
		for (ParameterDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetParameterDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SParameterDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListParameterDefinition(Collection input) {
		List result = new ArrayList();
		for (ParameterDefinition o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListParameterDefinition(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SParameterDefinition o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SParameterDefinition convertToSObject(ParameterDefinition input) {
		if (input == null) {
			return null;
		}
		
		SParameterDefinition result = new SParameterDefinition();
		result.setName(input.getName());
		result.setRequired(input.isRequired());
		result.setDescription(input.getDescription());
		TypeDefinition typeVal = input.getType();
		result.setType(convertToSObject(typeVal));
		Type defaultValueVal = input.getDefaultValue();
		result.setDefaultValueId(defaultValueVal == null ? -1 : defaultValueVal.getOid());
		return result;
	}
	public ParameterDefinition convertFromSObject(SParameterDefinition input, DatabaseSession session) throws BimserverDatabaseException {
		ParameterDefinition result = convertFromSObject(input, StoreFactory.eINSTANCE.createParameterDefinition(), session);
		
		return result;
	}

	public ParameterDefinition convertFromSObject(SParameterDefinition input, ParameterDefinition result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setRequired(input.isRequired());
		result.setDescription(input.getDescription());
		result.setType(convertFromSObject(input.getType(), session));
		result.setDefaultValue((Type)session.get(StorePackage.eINSTANCE.getType(), input.getDefaultValueId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetType(Collection input) {
		Set result = new HashSet();
		for (Type o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListType(Collection input) {
		List result = new ArrayList();
		for (Type o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SType convertToSObject(Type input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof PrimitiveType) {
			return convertToSObject((PrimitiveType)input);
		}
		else if (input instanceof ArrayType) {
			return convertToSObject((ArrayType)input);
		}
		else if (input instanceof ObjectType) {
			return convertToSObject((ObjectType)input);
		}
		SType result = new SType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		return result;
	}
	public Type convertFromSObject(SType input, DatabaseSession session) throws BimserverDatabaseException {
		Type result = convertFromSObject(input, StoreFactory.eINSTANCE.createType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Type convertFromSObject(SType input, Type result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SPrimitiveType) {
			return convertFromSObject((SPrimitiveType)input, session);
		}
		else if (input instanceof SArrayType) {
			return convertFromSObject((SArrayType)input, session);
		}
		else if (input instanceof SObjectType) {
			return convertFromSObject((SObjectType)input, session);
		}
		return result;
	}

	public Set convertToSSetObjectType(Collection input) {
		Set result = new HashSet();
		for (ObjectType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetObjectType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SObjectType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListObjectType(Collection input) {
		List result = new ArrayList();
		for (ObjectType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListObjectType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SObjectType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SObjectType convertToSObject(ObjectType input) {
		if (input == null) {
			return null;
		}
		
		SObjectType result = new SObjectType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		List listparameters = new ArrayList();
		for (Parameter v : input.getParameters()) {
			listparameters.add(convertToSObject(v));
		}
		result.setParameters(listparameters);
		return result;
	}
	public ObjectType convertFromSObject(SObjectType input, DatabaseSession session) throws BimserverDatabaseException {
		ObjectType result = convertFromSObject(input, StoreFactory.eINSTANCE.createObjectType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ObjectType convertFromSObject(SObjectType input, ObjectType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		List listparameters = result.getParameters();
		for (SParameter v : input.getParameters()) {
			listparameters.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetPrimitiveType(Collection input) {
		Set result = new HashSet();
		for (PrimitiveType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPrimitiveType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPrimitiveType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPrimitiveType(Collection input) {
		List result = new ArrayList();
		for (PrimitiveType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPrimitiveType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPrimitiveType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPrimitiveType convertToSObject(PrimitiveType input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof DoubleType) {
			return convertToSObject((DoubleType)input);
		}
		else if (input instanceof ByteArrayType) {
			return convertToSObject((ByteArrayType)input);
		}
		else if (input instanceof LongType) {
			return convertToSObject((LongType)input);
		}
		else if (input instanceof BooleanType) {
			return convertToSObject((BooleanType)input);
		}
		else if (input instanceof StringType) {
			return convertToSObject((StringType)input);
		}
		SPrimitiveType result = new SPrimitiveType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		return result;
	}
	public PrimitiveType convertFromSObject(SPrimitiveType input, DatabaseSession session) throws BimserverDatabaseException {
		PrimitiveType result = convertFromSObject(input, StoreFactory.eINSTANCE.createPrimitiveType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PrimitiveType convertFromSObject(SPrimitiveType input, PrimitiveType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SDoubleType) {
			return convertFromSObject((SDoubleType)input, session);
		}
		else if (input instanceof SByteArrayType) {
			return convertFromSObject((SByteArrayType)input, session);
		}
		else if (input instanceof SLongType) {
			return convertFromSObject((SLongType)input, session);
		}
		else if (input instanceof SBooleanType) {
			return convertFromSObject((SBooleanType)input, session);
		}
		else if (input instanceof SStringType) {
			return convertFromSObject((SStringType)input, session);
		}
		return result;
	}

	public Set convertToSSetLongType(Collection input) {
		Set result = new HashSet();
		for (LongType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetLongType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SLongType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListLongType(Collection input) {
		List result = new ArrayList();
		for (LongType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListLongType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SLongType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SLongType convertToSObject(LongType input) {
		if (input == null) {
			return null;
		}
		
		SLongType result = new SLongType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValue(input.getValue());
		return result;
	}
	public LongType convertFromSObject(SLongType input, DatabaseSession session) throws BimserverDatabaseException {
		LongType result = convertFromSObject(input, StoreFactory.eINSTANCE.createLongType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public LongType convertFromSObject(SLongType input, LongType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValue(input.getValue());
		return result;
	}

	public Set convertToSSetByteArrayType(Collection input) {
		Set result = new HashSet();
		for (ByteArrayType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetByteArrayType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SByteArrayType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListByteArrayType(Collection input) {
		List result = new ArrayList();
		for (ByteArrayType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListByteArrayType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SByteArrayType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SByteArrayType convertToSObject(ByteArrayType input) {
		if (input == null) {
			return null;
		}
		
		SByteArrayType result = new SByteArrayType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValue(input.getValue());
		return result;
	}
	public ByteArrayType convertFromSObject(SByteArrayType input, DatabaseSession session) throws BimserverDatabaseException {
		ByteArrayType result = convertFromSObject(input, StoreFactory.eINSTANCE.createByteArrayType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ByteArrayType convertFromSObject(SByteArrayType input, ByteArrayType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValue(input.getValue());
		return result;
	}

	public Set convertToSSetDoubleType(Collection input) {
		Set result = new HashSet();
		for (DoubleType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetDoubleType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SDoubleType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListDoubleType(Collection input) {
		List result = new ArrayList();
		for (DoubleType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListDoubleType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SDoubleType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SDoubleType convertToSObject(DoubleType input) {
		if (input == null) {
			return null;
		}
		
		SDoubleType result = new SDoubleType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValue(input.getValue());
		return result;
	}
	public DoubleType convertFromSObject(SDoubleType input, DatabaseSession session) throws BimserverDatabaseException {
		DoubleType result = convertFromSObject(input, StoreFactory.eINSTANCE.createDoubleType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public DoubleType convertFromSObject(SDoubleType input, DoubleType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValue(input.getValue());
		return result;
	}

	public Set convertToSSetStringType(Collection input) {
		Set result = new HashSet();
		for (StringType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetStringType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SStringType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListStringType(Collection input) {
		List result = new ArrayList();
		for (StringType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListStringType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SStringType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SStringType convertToSObject(StringType input) {
		if (input == null) {
			return null;
		}
		
		SStringType result = new SStringType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValue(input.getValue());
		return result;
	}
	public StringType convertFromSObject(SStringType input, DatabaseSession session) throws BimserverDatabaseException {
		StringType result = convertFromSObject(input, StoreFactory.eINSTANCE.createStringType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public StringType convertFromSObject(SStringType input, StringType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValue(input.getValue());
		return result;
	}

	public Set convertToSSetBooleanType(Collection input) {
		Set result = new HashSet();
		for (BooleanType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetBooleanType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SBooleanType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListBooleanType(Collection input) {
		List result = new ArrayList();
		for (BooleanType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListBooleanType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SBooleanType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SBooleanType convertToSObject(BooleanType input) {
		if (input == null) {
			return null;
		}
		
		SBooleanType result = new SBooleanType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValue(input.isValue());
		return result;
	}
	public BooleanType convertFromSObject(SBooleanType input, DatabaseSession session) throws BimserverDatabaseException {
		BooleanType result = convertFromSObject(input, StoreFactory.eINSTANCE.createBooleanType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public BooleanType convertFromSObject(SBooleanType input, BooleanType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValue(input.isValue());
		return result;
	}

	public Set convertToSSetArrayType(Collection input) {
		Set result = new HashSet();
		for (ArrayType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetArrayType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SArrayType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListArrayType(Collection input) {
		List result = new ArrayList();
		for (ArrayType o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListArrayType(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SArrayType o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SArrayType convertToSObject(ArrayType input) {
		if (input == null) {
			return null;
		}
		
		SArrayType result = new SArrayType();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listvalues = new ArrayList();
		for (Type v : input.getValues()) {
			listvalues.add(convertToSObject(v));
		}
		result.setValues(listvalues);
		return result;
	}
	public ArrayType convertFromSObject(SArrayType input, DatabaseSession session) throws BimserverDatabaseException {
		ArrayType result = convertFromSObject(input, StoreFactory.eINSTANCE.createArrayType(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ArrayType convertFromSObject(SArrayType input, ArrayType result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listvalues = result.getValues();
		for (SType v : input.getValues()) {
			listvalues.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetParameter(Collection input) {
		Set result = new HashSet();
		for (Parameter o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetParameter(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SParameter o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListParameter(Collection input) {
		List result = new ArrayList();
		for (Parameter o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListParameter(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SParameter o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SParameter convertToSObject(Parameter input) {
		if (input == null) {
			return null;
		}
		
		SParameter result = new SParameter();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		Type valueVal = input.getValue();
		result.setValue(convertToSObject(valueVal));
		return result;
	}
	public Parameter convertFromSObject(SParameter input, DatabaseSession session) throws BimserverDatabaseException {
		Parameter result = convertFromSObject(input, StoreFactory.eINSTANCE.createParameter(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Parameter convertFromSObject(SParameter input, Parameter result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setValue(convertFromSObject(input.getValue(), session));
		return result;
	}
		public SNotifictionResultEnum convertToSObject(NotifictionResultEnum input) {
			return SNotifictionResultEnum.values()[input.ordinal()];
		}
		
		public NotifictionResultEnum convertFromSObject(SNotifictionResultEnum input) {
			return NotifictionResultEnum.values()[input.ordinal()];
		}

	public Set convertToSSetImmediateNotificationResult(Collection input) {
		Set result = new HashSet();
		for (ImmediateNotificationResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetImmediateNotificationResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SImmediateNotificationResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListImmediateNotificationResult(Collection input) {
		List result = new ArrayList();
		for (ImmediateNotificationResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListImmediateNotificationResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SImmediateNotificationResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SImmediateNotificationResult convertToSObject(ImmediateNotificationResult input) {
		if (input == null) {
			return null;
		}
		
		SImmediateNotificationResult result = new SImmediateNotificationResult();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setResult(SNotifictionResultEnum.values()[input.getResult().ordinal()]);
		result.setDescription(input.getDescription());
		return result;
	}
	public ImmediateNotificationResult convertFromSObject(SImmediateNotificationResult input, DatabaseSession session) throws BimserverDatabaseException {
		ImmediateNotificationResult result = convertFromSObject(input, StoreFactory.eINSTANCE.createImmediateNotificationResult(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ImmediateNotificationResult convertFromSObject(SImmediateNotificationResult input, ImmediateNotificationResult result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setResult(NotifictionResultEnum.values()[input.getResult().ordinal()]);
		result.setDescription(input.getDescription());
		return result;
	}

	public Set convertToSSetRemoteServiceUpdate(Collection input) {
		Set result = new HashSet();
		for (RemoteServiceUpdate o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetRemoteServiceUpdate(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SRemoteServiceUpdate o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListRemoteServiceUpdate(Collection input) {
		List result = new ArrayList();
		for (RemoteServiceUpdate o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListRemoteServiceUpdate(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SRemoteServiceUpdate o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SRemoteServiceUpdate convertToSObject(RemoteServiceUpdate input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof PercentageChange) {
			return convertToSObject((PercentageChange)input);
		}
		SRemoteServiceUpdate result = new SRemoteServiceUpdate();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		return result;
	}
	public RemoteServiceUpdate convertFromSObject(SRemoteServiceUpdate input, DatabaseSession session) throws BimserverDatabaseException {
		RemoteServiceUpdate result = convertFromSObject(input, StoreFactory.eINSTANCE.createRemoteServiceUpdate(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public RemoteServiceUpdate convertFromSObject(SRemoteServiceUpdate input, RemoteServiceUpdate result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SPercentageChange) {
			return convertFromSObject((SPercentageChange)input, session);
		}
		return result;
	}

	public Set convertToSSetPercentageChange(Collection input) {
		Set result = new HashSet();
		for (PercentageChange o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetPercentageChange(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SPercentageChange o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListPercentageChange(Collection input) {
		List result = new ArrayList();
		for (PercentageChange o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListPercentageChange(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SPercentageChange o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SPercentageChange convertToSObject(PercentageChange input) {
		if (input == null) {
			return null;
		}
		
		SPercentageChange result = new SPercentageChange();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setPercentage(input.getPercentage());
		return result;
	}
	public PercentageChange convertFromSObject(SPercentageChange input, DatabaseSession session) throws BimserverDatabaseException {
		PercentageChange result = convertFromSObject(input, StoreFactory.eINSTANCE.createPercentageChange(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public PercentageChange convertFromSObject(SPercentageChange input, PercentageChange result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setPercentage(input.getPercentage());
		return result;
	}

	public Set convertToSSetSystemInfo(Collection input) {
		Set result = new HashSet();
		for (SystemInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetSystemInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SSystemInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListSystemInfo(Collection input) {
		List result = new ArrayList();
		for (SystemInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListSystemInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SSystemInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SSystemInfo convertToSObject(SystemInfo input) {
		if (input == null) {
			return null;
		}
		
		SSystemInfo result = new SSystemInfo();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setCpucores(input.getCpucores());
		result.setDatetime(input.getDatetime());
		result.setOsname(input.getOsname());
		result.setOsversion(input.getOsversion());
		result.setUserName(input.getUserName());
		result.setUserHome(input.getUserHome());
		result.setUserDir(input.getUserDir());
		return result;
	}
	public SystemInfo convertFromSObject(SSystemInfo input, DatabaseSession session) throws BimserverDatabaseException {
		SystemInfo result = convertFromSObject(input, StoreFactory.eINSTANCE.createSystemInfo(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public SystemInfo convertFromSObject(SSystemInfo input, SystemInfo result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setCpucores(input.getCpucores());
		result.setDatetime(input.getDatetime());
		result.setOsname(input.getOsname());
		result.setOsversion(input.getOsversion());
		result.setUserName(input.getUserName());
		result.setUserHome(input.getUserHome());
		result.setUserDir(input.getUserDir());
		return result;
	}

	public Set convertToSSetJavaInfo(Collection input) {
		Set result = new HashSet();
		for (JavaInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetJavaInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SJavaInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListJavaInfo(Collection input) {
		List result = new ArrayList();
		for (JavaInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListJavaInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SJavaInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SJavaInfo convertToSObject(JavaInfo input) {
		if (input == null) {
			return null;
		}
		
		SJavaInfo result = new SJavaInfo();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setHeapTotal(input.getHeapTotal());
		result.setHeapUsed(input.getHeapUsed());
		result.setHeapFree(input.getHeapFree());
		result.setHeapMax(input.getHeapMax());
		result.setThreads(input.getThreads());
		result.setJavaHome(input.getJavaHome());
		result.setJavaVersion(input.getJavaVersion());
		result.setJavaVendor(input.getJavaVendor());
		result.setJavaVendorurl(input.getJavaVendorurl());
		result.setJavavmVersion(input.getJavavmVersion());
		result.setJavavmVendor(input.getJavavmVendor());
		result.setJavavmName(input.getJavavmName());
		result.setJavaspecVersion(input.getJavaspecVersion());
		result.setJavaspecVendor(input.getJavaspecVendor());
		result.setJavaspecName(input.getJavaspecName());
		result.setJavaClassVersion(input.getJavaClassVersion());
		result.getJavaClasspath().addAll(input.getJavaClasspath());
		result.getJavaLibrarypath().addAll(input.getJavaLibrarypath());
		result.setJavaIoTmp(input.getJavaIoTmp());
		result.setJavaExtdir(input.getJavaExtdir());
		result.setJavaFileSeparator(input.getJavaFileSeparator());
		result.setJavaPathSeparator(input.getJavaPathSeparator());
		result.setJavaLineSeparator(input.getJavaLineSeparator());
		return result;
	}
	public JavaInfo convertFromSObject(SJavaInfo input, DatabaseSession session) throws BimserverDatabaseException {
		JavaInfo result = convertFromSObject(input, StoreFactory.eINSTANCE.createJavaInfo(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public JavaInfo convertFromSObject(SJavaInfo input, JavaInfo result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setHeapTotal(input.getHeapTotal());
		result.setHeapUsed(input.getHeapUsed());
		result.setHeapFree(input.getHeapFree());
		result.setHeapMax(input.getHeapMax());
		result.setThreads(input.getThreads());
		result.setJavaHome(input.getJavaHome());
		result.setJavaVersion(input.getJavaVersion());
		result.setJavaVendor(input.getJavaVendor());
		result.setJavaVendorurl(input.getJavaVendorurl());
		result.setJavavmVersion(input.getJavavmVersion());
		result.setJavavmVendor(input.getJavavmVendor());
		result.setJavavmName(input.getJavavmName());
		result.setJavaspecVersion(input.getJavaspecVersion());
		result.setJavaspecVendor(input.getJavaspecVendor());
		result.setJavaspecName(input.getJavaspecName());
		result.setJavaClassVersion(input.getJavaClassVersion());
		result.getJavaClasspath().addAll(input.getJavaClasspath());
		result.getJavaLibrarypath().addAll(input.getJavaLibrarypath());
		result.setJavaIoTmp(input.getJavaIoTmp());
		result.setJavaExtdir(input.getJavaExtdir());
		result.setJavaFileSeparator(input.getJavaFileSeparator());
		result.setJavaPathSeparator(input.getJavaPathSeparator());
		result.setJavaLineSeparator(input.getJavaLineSeparator());
		return result;
	}

	public Set convertToSSetBimServerInfo(Collection input) {
		Set result = new HashSet();
		for (BimServerInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetBimServerInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SBimServerInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListBimServerInfo(Collection input) {
		List result = new ArrayList();
		for (BimServerInfo o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListBimServerInfo(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SBimServerInfo o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SBimServerInfo convertToSObject(BimServerInfo input) {
		if (input == null) {
			return null;
		}
		
		SBimServerInfo result = new SBimServerInfo();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setCurrentVersion(input.getCurrentVersion());
		result.setCurrentDate(input.getCurrentDate());
		result.setSchemaVersion(input.getSchemaVersion());
		result.setLatestDate(input.getLatestDate());
		result.setLatestVersion(input.getLatestVersion());
		result.setProjects(input.getProjects());
		result.setRevisions(input.getRevisions());
		result.setUsers(input.getUsers());
		result.setCheckouts(input.getCheckouts());
		result.setServerLogUrl(input.getServerLogUrl());
		result.setStarted(input.getStarted());
		return result;
	}
	public BimServerInfo convertFromSObject(SBimServerInfo input, DatabaseSession session) throws BimserverDatabaseException {
		BimServerInfo result = convertFromSObject(input, StoreFactory.eINSTANCE.createBimServerInfo(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public BimServerInfo convertFromSObject(SBimServerInfo input, BimServerInfo result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setCurrentVersion(input.getCurrentVersion());
		result.setCurrentDate(input.getCurrentDate());
		result.setSchemaVersion(input.getSchemaVersion());
		result.setLatestDate(input.getLatestDate());
		result.setLatestVersion(input.getLatestVersion());
		result.setProjects(input.getProjects());
		result.setRevisions(input.getRevisions());
		result.setUsers(input.getUsers());
		result.setCheckouts(input.getCheckouts());
		result.setServerLogUrl(input.getServerLogUrl());
		result.setStarted(input.getStarted());
		return result;
	}
		public SProgressTopicType convertToSObject(ProgressTopicType input) {
			return SProgressTopicType.values()[input.ordinal()];
		}
		
		public ProgressTopicType convertFromSObject(SProgressTopicType input) {
			return ProgressTopicType.values()[input.ordinal()];
		}

	public Set convertToSSetProjectSmall(Collection input) {
		Set result = new HashSet();
		for (ProjectSmall o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetProjectSmall(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SProjectSmall o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListProjectSmall(Collection input) {
		List result = new ArrayList();
		for (ProjectSmall o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListProjectSmall(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SProjectSmall o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SProjectSmall convertToSObject(ProjectSmall input) {
		if (input == null) {
			return null;
		}
		
		SProjectSmall result = new SProjectSmall();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setParentId(input.getParentId());
		result.setState(SObjectState.values()[input.getState().ordinal()]);
		result.setNrRevisions(input.getNrRevisions());
		result.setNrSubProjects(input.getNrSubProjects());
		result.setHasCheckinRights(input.isHasCheckinRights());
		result.setLastRevisionId(input.getLastRevisionId());
		result.setSchema(input.getSchema());
		return result;
	}
	public ProjectSmall convertFromSObject(SProjectSmall input, DatabaseSession session) throws BimserverDatabaseException {
		ProjectSmall result = convertFromSObject(input, StoreFactory.eINSTANCE.createProjectSmall(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ProjectSmall convertFromSObject(SProjectSmall input, ProjectSmall result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setParentId(input.getParentId());
		result.setState(ObjectState.values()[input.getState().ordinal()]);
		result.setNrRevisions(input.getNrRevisions());
		result.setNrSubProjects(input.getNrSubProjects());
		result.setHasCheckinRights(input.isHasCheckinRights());
		result.setLastRevisionId(input.getLastRevisionId());
		result.setSchema(input.getSchema());
		return result;
	}

	public Set convertToSSetIfcHeader(Collection input) {
		Set result = new HashSet();
		for (IfcHeader o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetIfcHeader(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SIfcHeader o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListIfcHeader(Collection input) {
		List result = new ArrayList();
		for (IfcHeader o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListIfcHeader(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SIfcHeader o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SIfcHeader convertToSObject(IfcHeader input) {
		if (input == null) {
			return null;
		}
		
		SIfcHeader result = new SIfcHeader();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.getDescription().addAll(input.getDescription());
		result.setImplementationLevel(input.getImplementationLevel());
		result.setFilename(input.getFilename());
		result.setTimeStamp(input.getTimeStamp());
		result.getAuthor().addAll(input.getAuthor());
		result.getOrganization().addAll(input.getOrganization());
		result.setPreProcessorVersion(input.getPreProcessorVersion());
		result.setOriginatingSystem(input.getOriginatingSystem());
		result.setIfcSchemaVersion(input.getIfcSchemaVersion());
		result.setAuthorization(input.getAuthorization());
		return result;
	}
	public IfcHeader convertFromSObject(SIfcHeader input, DatabaseSession session) throws BimserverDatabaseException {
		IfcHeader result = convertFromSObject(input, StoreFactory.eINSTANCE.createIfcHeader(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public IfcHeader convertFromSObject(SIfcHeader input, IfcHeader result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.getDescription().addAll(input.getDescription());
		result.setImplementationLevel(input.getImplementationLevel());
		result.setFilename(input.getFilename());
		result.setTimeStamp(input.getTimeStamp());
		result.getAuthor().addAll(input.getAuthor());
		result.getOrganization().addAll(input.getOrganization());
		result.setPreProcessorVersion(input.getPreProcessorVersion());
		result.setOriginatingSystem(input.getOriginatingSystem());
		result.setIfcSchemaVersion(input.getIfcSchemaVersion());
		result.setAuthorization(input.getAuthorization());
		return result;
	}

	public Set convertToSSetModelCheckerResultItem(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerResultItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerResultItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerResultItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerResultItem(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerResultItem o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerResultItem(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerResultItem o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerResultItem convertToSObject(ModelCheckerResultItem input) {
		if (input == null) {
			return null;
		}
		
		if (input instanceof ModelCheckerResultHeader) {
			return convertToSObject((ModelCheckerResultHeader)input);
		}
		else if (input instanceof ModelCheckerResultLine) {
			return convertToSObject((ModelCheckerResultLine)input);
		}
		SModelCheckerResultItem result = new SModelCheckerResultItem();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		return result;
	}
	public ModelCheckerResultItem convertFromSObject(SModelCheckerResultItem input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerResultItem result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerResultItem(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerResultItem convertFromSObject(SModelCheckerResultItem input, ModelCheckerResultItem result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		if (input instanceof SModelCheckerResultHeader) {
			return convertFromSObject((SModelCheckerResultHeader)input, session);
		}
		else if (input instanceof SModelCheckerResultLine) {
			return convertFromSObject((SModelCheckerResultLine)input, session);
		}
		return result;
	}

	public Set convertToSSetModelCheckerResultHeader(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerResultHeader o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerResultHeader(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerResultHeader o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerResultHeader(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerResultHeader o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerResultHeader(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerResultHeader o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerResultHeader convertToSObject(ModelCheckerResultHeader input) {
		if (input == null) {
			return null;
		}
		
		SModelCheckerResultHeader result = new SModelCheckerResultHeader();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setText(input.getText());
		return result;
	}
	public ModelCheckerResultHeader convertFromSObject(SModelCheckerResultHeader input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerResultHeader result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerResultHeader(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerResultHeader convertFromSObject(SModelCheckerResultHeader input, ModelCheckerResultHeader result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setText(input.getText());
		return result;
	}
		public SModelCheckerResultType convertToSObject(ModelCheckerResultType input) {
			return SModelCheckerResultType.values()[input.ordinal()];
		}
		
		public ModelCheckerResultType convertFromSObject(SModelCheckerResultType input) {
			return ModelCheckerResultType.values()[input.ordinal()];
		}

	public Set convertToSSetModelCheckerResultLine(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerResultLine o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerResultLine(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerResultLine o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerResultLine(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerResultLine o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerResultLine(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerResultLine o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerResultLine convertToSObject(ModelCheckerResultLine input) {
		if (input == null) {
			return null;
		}
		
		SModelCheckerResultLine result = new SModelCheckerResultLine();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setFieldOrClass(input.getFieldOrClass());
		result.setValue(input.getValue());
		result.setShouldBe(input.getShouldBe());
		result.setType(SModelCheckerResultType.values()[input.getType().ordinal()]);
		result.setObjectId(input.getObjectId());
		return result;
	}
	public ModelCheckerResultLine convertFromSObject(SModelCheckerResultLine input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerResultLine result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerResultLine(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerResultLine convertFromSObject(SModelCheckerResultLine input, ModelCheckerResultLine result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setFieldOrClass(input.getFieldOrClass());
		result.setValue(input.getValue());
		result.setShouldBe(input.getShouldBe());
		result.setType(ModelCheckerResultType.values()[input.getType().ordinal()]);
		result.setObjectId(input.getObjectId());
		return result;
	}

	public Set convertToSSetModelCheckerResult(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerResult(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerResult o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerResult(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerResult o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerResult convertToSObject(ModelCheckerResult input) {
		if (input == null) {
			return null;
		}
		
		SModelCheckerResult result = new SModelCheckerResult();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setValid(input.isValid());
		List listitems = new ArrayList();
		for (ModelCheckerResultItem v : input.getItems()) {
			listitems.add(v.getOid());
		}
		result.setItems(listitems);
		return result;
	}
	public ModelCheckerResult convertFromSObject(SModelCheckerResult input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerResult result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerResult(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerResult convertFromSObject(SModelCheckerResult input, ModelCheckerResult result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setValid(input.isValid());
		List listitems = result.getItems();
		for (long oid : input.getItems()) {
			listitems.add((ModelCheckerResultItem)session.get(StorePackage.eINSTANCE.getModelCheckerResultItem(), oid, OldQuery.getDefault()));
		}
		return result;
	}

	public Set convertToSSetModelCheckerInstance(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerInstance o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerInstance(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerInstance o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerInstance(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerInstance o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerInstance(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerInstance o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerInstance convertToSObject(ModelCheckerInstance input) {
		if (input == null) {
			return null;
		}
		
		SModelCheckerInstance result = new SModelCheckerInstance();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setDescription(input.getDescription());
		result.setCode(input.getCode());
		result.setCompiled(input.getCompiled());
		result.setValid(input.isValid());
		result.setModelCheckerPluginClassName(input.getModelCheckerPluginClassName());
		return result;
	}
	public ModelCheckerInstance convertFromSObject(SModelCheckerInstance input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerInstance result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerInstance(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerInstance convertFromSObject(SModelCheckerInstance input, ModelCheckerInstance result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setDescription(input.getDescription());
		result.setCode(input.getCode());
		result.setCompiled(input.getCompiled());
		result.setValid(input.isValid());
		result.setModelCheckerPluginClassName(input.getModelCheckerPluginClassName());
		return result;
	}

	public Set convertToSSetModelCheckerPluginDescriptor(Collection input) {
		Set result = new HashSet();
		for (ModelCheckerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetModelCheckerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SModelCheckerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListModelCheckerPluginDescriptor(Collection input) {
		List result = new ArrayList();
		for (ModelCheckerPluginDescriptor o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListModelCheckerPluginDescriptor(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SModelCheckerPluginDescriptor o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SModelCheckerPluginDescriptor convertToSObject(ModelCheckerPluginDescriptor input) {
		if (input == null) {
			return null;
		}
		
		SModelCheckerPluginDescriptor result = new SModelCheckerPluginDescriptor();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = new ArrayList();
		for (PluginConfiguration v : input.getConfigurations()) {
			listconfigurations.add(v.getOid());
		}
		result.setConfigurations(listconfigurations);
		return result;
	}
	public ModelCheckerPluginDescriptor convertFromSObject(SModelCheckerPluginDescriptor input, DatabaseSession session) throws BimserverDatabaseException {
		ModelCheckerPluginDescriptor result = convertFromSObject(input, StoreFactory.eINSTANCE.createModelCheckerPluginDescriptor(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public ModelCheckerPluginDescriptor convertFromSObject(SModelCheckerPluginDescriptor input, ModelCheckerPluginDescriptor result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setSimpleName(input.getSimpleName());
		result.setDefaultName(input.getDefaultName());
		result.setPluginClassName(input.getPluginClassName());
		result.setDescription(input.getDescription());
		result.setLocation(input.getLocation());
		result.setEnabled(input.getEnabled());
		result.setPluginInterfaceClassName(input.getPluginInterfaceClassName());
		List listconfigurations = result.getConfigurations();
		for (long oid : input.getConfigurations()) {
			listconfigurations.add((PluginConfiguration)session.get(StorePackage.eINSTANCE.getPluginConfiguration(), oid, OldQuery.getDefault()));
		}
		return result;
	}
		public SSmtpProtocol convertToSObject(SmtpProtocol input) {
			return SSmtpProtocol.values()[input.ordinal()];
		}
		
		public SmtpProtocol convertFromSObject(SSmtpProtocol input) {
			return SmtpProtocol.values()[input.ordinal()];
		}

	public Set convertToSSetMessagingSerializerPluginConfiguration(Collection input) {
		Set result = new HashSet();
		for (MessagingSerializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetMessagingSerializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SMessagingSerializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListMessagingSerializerPluginConfiguration(Collection input) {
		List result = new ArrayList();
		for (MessagingSerializerPluginConfiguration o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListMessagingSerializerPluginConfiguration(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SMessagingSerializerPluginConfiguration o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SMessagingSerializerPluginConfiguration convertToSObject(MessagingSerializerPluginConfiguration input) {
		if (input == null) {
			return null;
		}
		
		SMessagingSerializerPluginConfiguration result = new SMessagingSerializerPluginConfiguration();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		PluginDescriptor pluginDescriptorVal = input.getPluginDescriptor();
		result.setPluginDescriptorId(pluginDescriptorVal == null ? -1 : pluginDescriptorVal.getOid());
		ObjectType settingsVal = input.getSettings();
		result.setSettingsId(settingsVal == null ? -1 : settingsVal.getOid());
		UserSettings userSettingsVal = input.getUserSettings();
		result.setUserSettingsId(userSettingsVal == null ? -1 : userSettingsVal.getOid());
		return result;
	}
	public MessagingSerializerPluginConfiguration convertFromSObject(SMessagingSerializerPluginConfiguration input, DatabaseSession session) throws BimserverDatabaseException {
		MessagingSerializerPluginConfiguration result = convertFromSObject(input, StoreFactory.eINSTANCE.createMessagingSerializerPluginConfiguration(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public MessagingSerializerPluginConfiguration convertFromSObject(SMessagingSerializerPluginConfiguration input, MessagingSerializerPluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setEnabled(input.getEnabled());
		result.setDescription(input.getDescription());
		result.setPluginDescriptor((PluginDescriptor)session.get(StorePackage.eINSTANCE.getPluginDescriptor(), input.getPluginDescriptorId(), OldQuery.getDefault()));
		result.setSettings((ObjectType)session.get(StorePackage.eINSTANCE.getObjectType(), input.getSettingsId(), OldQuery.getDefault()));
		result.setUserSettings((UserSettings)session.get(StorePackage.eINSTANCE.getUserSettings(), input.getUserSettingsId(), OldQuery.getDefault()));
		return result;
	}

	public Set convertToSSetMetrics(Collection input) {
		Set result = new HashSet();
		for (Metrics o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetMetrics(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SMetrics o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListMetrics(Collection input) {
		List result = new ArrayList();
		for (Metrics o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListMetrics(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SMetrics o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SMetrics convertToSObject(Metrics input) {
		if (input == null) {
			return null;
		}
		
		SMetrics result = new SMetrics();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		List listinterfaces = new ArrayList();
		for (InterfaceMetric v : input.getInterfaces()) {
			listinterfaces.add(convertToSObject(v));
		}
		result.setInterfaces(listinterfaces);
		return result;
	}
	public Metrics convertFromSObject(SMetrics input, DatabaseSession session) throws BimserverDatabaseException {
		Metrics result = convertFromSObject(input, StoreFactory.eINSTANCE.createMetrics(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public Metrics convertFromSObject(SMetrics input, Metrics result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		List listinterfaces = result.getInterfaces();
		for (SInterfaceMetric v : input.getInterfaces()) {
			listinterfaces.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetInterfaceMetric(Collection input) {
		Set result = new HashSet();
		for (InterfaceMetric o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetInterfaceMetric(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SInterfaceMetric o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListInterfaceMetric(Collection input) {
		List result = new ArrayList();
		for (InterfaceMetric o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListInterfaceMetric(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SInterfaceMetric o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SInterfaceMetric convertToSObject(InterfaceMetric input) {
		if (input == null) {
			return null;
		}
		
		SInterfaceMetric result = new SInterfaceMetric();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		List listmethods = new ArrayList();
		for (MethodMetric v : input.getMethods()) {
			listmethods.add(convertToSObject(v));
		}
		result.setMethods(listmethods);
		return result;
	}
	public InterfaceMetric convertFromSObject(SInterfaceMetric input, DatabaseSession session) throws BimserverDatabaseException {
		InterfaceMetric result = convertFromSObject(input, StoreFactory.eINSTANCE.createInterfaceMetric(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public InterfaceMetric convertFromSObject(SInterfaceMetric input, InterfaceMetric result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		List listmethods = result.getMethods();
		for (SMethodMetric v : input.getMethods()) {
			listmethods.add(convertFromSObject(v, session));
		}
		return result;
	}

	public Set convertToSSetMethodMetric(Collection input) {
		Set result = new HashSet();
		for (MethodMetric o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public Set convertFromSSetMethodMetric(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		Set result = new HashSet();
		for (SMethodMetric o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public List convertToSListMethodMetric(Collection input) {
		List result = new ArrayList();
		for (MethodMetric o : input) {
			result.add(convertToSObject(o));
		}
		return result;
	}

	public List convertFromSListMethodMetric(Collection input, DatabaseSession session) throws BimserverDatabaseException {
		List result = new ArrayList();
		for (SMethodMetric o : input) {
			result.add(convertFromSObject(o, session));
		}
		return result;
	}

	public SMethodMetric convertToSObject(MethodMetric input) {
		if (input == null) {
			return null;
		}
		
		SMethodMetric result = new SMethodMetric();
		result.setOid(input.getOid());
		result.setRid(input.getRid());
		result.setName(input.getName());
		result.setNrCalls(input.getNrCalls());
		result.setLastCall(input.getLastCall());
		result.setAverageMs(input.getAverageMs());
		result.setShortestMs(input.getShortestMs());
		result.setLongestMs(input.getLongestMs());
		return result;
	}
	public MethodMetric convertFromSObject(SMethodMetric input, DatabaseSession session) throws BimserverDatabaseException {
		MethodMetric result = convertFromSObject(input, StoreFactory.eINSTANCE.createMethodMetric(), session);
		
		((IdEObjectImpl)result).setOid(input.getOid());
		((IdEObjectImpl)result).setRid(input.getRid());
		
		return result;
	}

	public MethodMetric convertFromSObject(SMethodMetric input, MethodMetric result, DatabaseSession session) throws BimserverDatabaseException {
		if (input == null) {
			return null;
		}
		result.setName(input.getName());
		result.setNrCalls(input.getNrCalls());
		result.setLastCall(input.getLastCall());
		result.setAverageMs(input.getAverageMs());
		result.setShortestMs(input.getShortestMs());
		result.setLongestMs(input.getLongestMs());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy