com.ptc.netmarkets.model
Class NmOid

java.lang.Object
  extended by com.ptc.netmarkets.model.NmOid
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
NmSimpleOid

public class NmOid
extends Object
implements Externalizable



Supported API: true

Extendable: true

See Also:
Serialized Form

Constructor Summary
NmOid()
          

Supported API: true
NmOid(ObjectIdentifier oid)
          

Supported API: true
NmOid(Persistable p)
          

Supported API: true
NmOid(String nmOidStr)
          Deprecated. Use NmOid.newNmOid( String ) instead
NmOid(String type, ObjectIdentifier oid)
          

Supported API: true
NmOid(wt.vc.VersionForeignKey verId)
          

Supported API: true
 
Method Summary
 HashMap getAdditionalInfo()
          Gets the value of the attribute: additionalInfo.
 WTContainer getContainer()
          gets the parent container of the object

Supported API: true
 WTContainerRef getContainerRef()
          gets the parent containerRef of the object

Supported API: true
 Object getLatestIteration()
          Get object associated with the NmOid ObjectIdentifier.
 ObjectIdentifier getOid()
          Gets the ObjectIdentifier that this NmOid represents.
 Object getRef()
          Inflates the refereneced object (typically from the database)

Supported API: true
 Class getReferencedClass()
          

Supported API: true
 String getReferencedClassString()
          

Supported API: true
 Object getReferencedIteration()
          Get object associated with the NmOid ObjectIdentifier.
 String getReferenceString()
          

Supported API: true
 wt.inf.sharing.SharedContainerMap getSCM()
          

Supported API: true
 NmOid getSharedContainer()
          Gets the value of the attribute: sharedContainer.
 String getType()
          Gets the value of the attribute: type.
 wt.vc.VersionForeignKey getVerId()
          Gets the VersionForeignKey that this NmOid represents.
 WTReference getWtRef()
          Gets the value of the attribute: wtRef.
 boolean isA(Class aClass)
          Determines if the object references is an instance of the class provided
static boolean isA(NmOid nmOid, Class aclass)
          Static version of isA Determines if the object references is an instance of the class provided
 boolean isRefInflated()
          

Supported API: true
 boolean isShared()
          

Supported API: true
 boolean isSharedFrom()
          Gets the value of the attribute: sharedFrom.
 boolean isSharedTo()
          Gets the value of the attribute: sharedTo.
 boolean isVerOid()
          return boolean of if this NmOid object represents a Version ref or a specific Instance ref.
static NmOid newNmOid(ObjectIdentifier oi)
          Constructs an NmOid from a ObjectIdentifier

Supported API: true
static NmOid newNmOid(String oidStr)
          Constructs an NmOid from a string

Supported API: true
 void setAdditionalInfo(HashMap a_AdditionalInfo)
          Sets the value of the attribute: additionalInfo.
 void setContainerRef(WTContainerRef aref)
          Sets the parent containerRef of the object does not persist the change, just aviods a db hit next time this oid is asked for its containerref

Supported API: true
 void setOid(ObjectIdentifier objId)
          Sets the ObjectIdentifier that this NmOid represents.
 void setRef(Object a_Ref)
          Sets the value of the attribute: ref.
 void setSCM(wt.inf.sharing.SharedContainerMap ascm)
          

Supported API: true
 void setSharedContainer(NmOid a_SharedContainer)
          Sets the value of the attribute: sharedContainer.
 void setSharedFrom(boolean a_SharedFrom)
          Sets the value of the attribute: sharedFrom.
 void setSharedTo(boolean a_SharedTo)
          Sets the value of the attribute: sharedTo.
 void setType(String a_Type)
          Sets the value of the attribute: type.
 void setVerId(wt.vc.VersionForeignKey verId)
          Sets the VersionForeignKey that this NmOid represents.
 void setWtRef(WTReference a_WtRef)
          Sets the value of the attribute: wtRef.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NmOid

public NmOid()


Supported API: true


NmOid

public NmOid(String type,
             ObjectIdentifier oid)
      throws WTException


Supported API: true

Parameters:
type -
oid -
Throws:
WTException

NmOid

public NmOid(String nmOidStr)
      throws WTException
Deprecated. Use NmOid.newNmOid( String ) instead



Supported API: true

Parameters:
nmOidStr -
Throws:
WTException

NmOid

public NmOid(ObjectIdentifier oid)
      throws WTException


Supported API: true

Throws:
WTException

NmOid

public NmOid(wt.vc.VersionForeignKey verId)
      throws WTException


Supported API: true

Throws:
WTException

NmOid

public NmOid(Persistable p)
      throws WTException


Supported API: true

Throws:
WTException
Method Detail

getType

public String getType()
Gets the value of the attribute: type. Use with caution. Don't use type to figure out which type of object is acted upon, instead is .isA( class )

Supported API: true

Returns:
String

setType

public void setType(String a_Type)
Sets the value of the attribute: type.

Supported API: true

Parameters:
a_Type -

getRef

public Object getRef()
              throws WTException
Inflates the refereneced object (typically from the database)

Supported API: true

Returns:
Object
Throws:
WTException

setRef

public void setRef(Object a_Ref)
            throws WTException
Sets the value of the attribute: ref. Avoid db hit on the next getRef() if the object is in hand already

Supported API: true

Parameters:
a_Ref -
Throws:
WTException

getAdditionalInfo

public HashMap getAdditionalInfo()
Gets the value of the attribute: additionalInfo. Generic map of additional attributes

Supported API: true

Returns:
HashMap

setAdditionalInfo

public void setAdditionalInfo(HashMap a_AdditionalInfo)
Sets the value of the attribute: additionalInfo.

Supported API: true

Parameters:
a_AdditionalInfo -

isSharedFrom

public boolean isSharedFrom()
Gets the value of the attribute: sharedFrom.

Supported API: true

Returns:
boolean

setSharedFrom

public void setSharedFrom(boolean a_SharedFrom)
Sets the value of the attribute: sharedFrom.

Supported API: true

Parameters:
a_SharedFrom -

isSharedTo

public boolean isSharedTo()
Gets the value of the attribute: sharedTo.

Supported API: true

Returns:
boolean

setSharedTo

public void setSharedTo(boolean a_SharedTo)
Sets the value of the attribute: sharedTo.

Supported API: true

Parameters:
a_SharedTo -

getSharedContainer

public NmOid getSharedContainer()
Gets the value of the attribute: sharedContainer.

Supported API: true

Returns:
NmOid

setSharedContainer

public void setSharedContainer(NmOid a_SharedContainer)
Sets the value of the attribute: sharedContainer.

Supported API: true

Parameters:
a_SharedContainer -

getWtRef

public WTReference getWtRef()
Gets the value of the attribute: wtRef.

Supported API: true

Returns:
WTReference

setWtRef

public void setWtRef(WTReference a_WtRef)
              throws WTException
Sets the value of the attribute: wtRef.

Supported API: true

Parameters:
a_WtRef -
Throws:
WTException

getOid

public ObjectIdentifier getOid()
Gets the ObjectIdentifier that this NmOid represents.

Supported API: true

Returns:
ObjectIdentifier

setOid

public void setOid(ObjectIdentifier objId)
            throws WTException
Sets the ObjectIdentifier that this NmOid represents.

Supported API: true

Parameters:
objId -
Throws:
WTException

getVerId

public wt.vc.VersionForeignKey getVerId()
Gets the VersionForeignKey that this NmOid represents.

Supported API: true

Returns:
VersionForeignKey

setVerId

public void setVerId(wt.vc.VersionForeignKey verId)
              throws WTException
Sets the VersionForeignKey that this NmOid represents.

Supported API: true

Parameters:
verId -
Throws:
WTException

isShared

public boolean isShared()


Supported API: true

Returns:
boolean

newNmOid

public static NmOid newNmOid(String oidStr)
                      throws WTException
Constructs an NmOid from a string

Supported API: true

Throws:
WTException

newNmOid

public static NmOid newNmOid(ObjectIdentifier oi)
                      throws WTException
Constructs an NmOid from a ObjectIdentifier

Supported API: true

Throws:
WTException

getContainer

public WTContainer getContainer()
                         throws WTException
gets the parent container of the object

Supported API: true

Throws:
WTException

getContainerRef

public WTContainerRef getContainerRef()
                               throws WTException
gets the parent containerRef of the object

Supported API: true

Throws:
WTException

setContainerRef

public void setContainerRef(WTContainerRef aref)
Sets the parent containerRef of the object does not persist the change, just aviods a db hit next time this oid is asked for its containerref

Supported API: true


setSCM

public void setSCM(wt.inf.sharing.SharedContainerMap ascm)


Supported API: true


getSCM

public wt.inf.sharing.SharedContainerMap getSCM()


Supported API: true


isRefInflated

public boolean isRefInflated()
                      throws WTException


Supported API: true

Throws:
WTException

getLatestIteration

public Object getLatestIteration()
                          throws WTException
Get object associated with the NmOid ObjectIdentifier. Differs from getRef in that it does not return the latest iteration

Supported API: true

Throws:
WTException

getReferencedIteration

public Object getReferencedIteration()
                              throws WTException
Get object associated with the NmOid ObjectIdentifier. Differs from getRef in that it does not return the latest iteration

Supported API: true

Throws:
WTException

isVerOid

public boolean isVerOid()
return boolean of if this NmOid object represents a Version ref or a specific Instance ref. Using the getRef() method on a Version Ref will return latest.

Supported API: true


getReferencedClass

public Class getReferencedClass()


Supported API: true


getReferencedClassString

public String getReferencedClassString()


Supported API: true


isA

public boolean isA(Class aClass)
Determines if the object references is an instance of the class provided

Parameters:
aClass - - class to check

Supported API: true

getReferenceString

public String getReferenceString()
                          throws WTException


Supported API: true

Throws:
WTException

isA

public static boolean isA(NmOid nmOid,
                          Class aclass)
Static version of isA Determines if the object references is an instance of the class provided

Parameters:
aClass - - class to check
nmOid - - the oid to check the class of

Supported API: true