com.sun.electric.database.id
Class PortProtoId

java.lang.Object
  extended by com.sun.electric.database.id.PortProtoId
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExportId, PrimitivePortId

public abstract class PortProtoId
extends java.lang.Object
implements java.io.Serializable

The PortProtoId class identifies a type of PortInst . It can be implemented as PrimitiveNodeId (for primitives from Technologies) or as ExportId (for cells in Libraries).

The PortProtoId is immutable and identifies PortProto independently of threads. It differs from PortProto objects, which are owned by threads in transactional database.

See Also:
Serialized Form

Field Summary
 int chronIndex
          chronological index of this PortProtoId in parent.
 java.lang.String externalId
          representation of PortProtoId in disk files.
 NodeProtoId parentId
          Parent NodeProtoId of this PortProtoId
 
Method Summary
 int getChronIndex()
          Method to return chronological index of this PortProtoId in parent.
 java.lang.String getExternalId()
          Method to return the representation of this PortProtoId in disk files.
abstract  java.lang.String getName(Snapshot snapshot)
          Method to return the name of this PortProtoId in a specified Snapshot.
 NodeProtoId getParentId()
          Method to return the parent NodeProtoId of this PortProtoId.
 int hashCode()
           
abstract  PortProto inDatabase(EDatabase database)
          Method to return the PortProto representing PortProtoId in the specified EDatabase.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parentId

public final NodeProtoId parentId
Parent NodeProtoId of this PortProtoId


chronIndex

public final int chronIndex
chronological index of this PortProtoId in parent.


externalId

public final java.lang.String externalId
representation of PortProtoId in disk files. This name isn't chaged when Export is renamed.

Method Detail

getParentId

public NodeProtoId getParentId()
Method to return the parent NodeProtoId of this PortProtoId.

Returns:
the parent NodeProtoId of this PortProtoId.

getChronIndex

public int getChronIndex()
Method to return chronological index of this PortProtoId in parent.

Returns:
chronological index of this PortProtoId in parent.

getExternalId

public java.lang.String getExternalId()
Method to return the representation of this PortProtoId in disk files.


getName

public abstract java.lang.String getName(Snapshot snapshot)
Method to return the name of this PortProtoId in a specified Snapshot.

Parameters:
snapshot - snapshot for name search.
Returns:
the name of this PortProtoId.

inDatabase

public abstract PortProto inDatabase(EDatabase database)
Method to return the PortProto representing PortProtoId in the specified EDatabase.

Parameters:
database - EDatabase where to get from.
Returns:
the PortProto representing PortProtoId in the specified database. This method is not properly synchronized.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object