com.sun.electric.database
Class IdMapper

java.lang.Object
  extended by com.sun.electric.database.IdMapper
All Implemented Interfaces:
java.io.Serializable

public class IdMapper
extends java.lang.Object
implements java.io.Serializable

Class to describe mapping of Electric database Ids (LibIds, CellIds, ExportIds).

See Also:
Serialized Form

Constructor Summary
IdMapper()
          Creates a new instance of IdMapper
 
Method Summary
static IdMapper consolidateExportIds(Snapshot snapshot)
           
 CellId get(CellId key)
          Get mappinmg of CellId.
 ExportId get(ExportId key)
          Get mapping of ExportId.
 LibId get(LibId key)
          Get mappinmg of LibId.
 java.util.Collection<CellId> getNewCellIds()
           
 void moveCell(CellBackup cellBackup, CellId newCellId)
          Add to this idMapper mapping from old cellBackup to new cellId together with all exports.
static IdMapper renameCell(Snapshot snapshot, CellId oldCellId, CellId newCellId)
           
static IdMapper renameLibrary(Snapshot snapshot, LibId oldLibId, LibId newLibId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdMapper

public IdMapper()
Creates a new instance of IdMapper

Method Detail

renameLibrary

public static IdMapper renameLibrary(Snapshot snapshot,
                                     LibId oldLibId,
                                     LibId newLibId)

renameCell

public static IdMapper renameCell(Snapshot snapshot,
                                  CellId oldCellId,
                                  CellId newCellId)

consolidateExportIds

public static IdMapper consolidateExportIds(Snapshot snapshot)

moveCell

public void moveCell(CellBackup cellBackup,
                     CellId newCellId)
Add to this idMapper mapping from old cellBackup to new cellId together with all exports.

Parameters:
cellBackup - old cellBackup
newCellId - new CellId.

get

public LibId get(LibId key)
Get mappinmg of LibId.

Parameters:
key - key LibId.
Returns:
LibId which is the mapping of the key.

get

public CellId get(CellId key)
Get mappinmg of CellId.

Parameters:
key - key CellId.
Returns:
CellId which is the mapping of the key.

get

public ExportId get(ExportId key)
Get mapping of ExportId.

Parameters:
key - key ExportId.
Returns:
ExportId which is the mapping of the key.

getNewCellIds

public java.util.Collection<CellId> getNewCellIds()