Class NmOid

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

public class NmOid extends Object implements Externalizable, Cloneable


Supported API: true

Extendable: true
See Also:
  • Constructor Details

    • NmOid

      public NmOid()


      Supported API: true
    • NmOid

      public NmOid(String type, ObjectIdentifier oid) throws WTException


      Supported API: true
      Parameters:
      type -
      oid -
      Throws:
      WTException
    • NmOid

      @Deprecated 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
      Create an NmOid from an ObjectIdentifier.

      Supported API: true
      Parameters:
      oid - object identifier
      Throws:
      WTException - if oid is invalid
    • NmOid

      public NmOid(VersionForeignKey verId) throws WTException
      Create an NmOid from a VersionForeignKey.

      Supported API: true
      Parameters:
      verId - version foreign key
      Throws:
      WTException - if version foreign key is invalid
    • NmOid

      public NmOid(Persistable p) throws WTException
      Create an NmOid from a Persistable.

      Supported API: true
      Parameters:
      p - the persistable
      Throws:
      WTException - if the persistable is invalid
  • Method Details

    • getType

      @Deprecated public String getType()
      Deprecated.
      Gets the value of the attribute: type.

      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 -
    • getRefObject

      public Object getRefObject() throws WTException
      Inflates the referenced object (typically from the database) Supported API: true
      Returns:
      Object
      Throws:
      WTException
    • setRef

      public void setRef(Object a_Ref) throws WTException
      Sets the object or reference to the object on the NmOid

      Supported API: true
      Parameters:
      a_Ref -
      Throws:
      WTException
    • getAdditionalInfo

      @Deprecated public HashMap getAdditionalInfo()
      Deprecated.
      since 10.1 M010
      Gets the value of the attribute: additionalInfo. Generic map of additional attributes

      Supported API: true
      Returns:
      HashMap
    • setAdditionalInfo

      @Deprecated public void setAdditionalInfo(HashMap a_AdditionalInfo)
      Deprecated.
      since 10.1 M010
      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

      @Deprecated public ObjectIdentifier getOid()
      Deprecated.
      This api has been deprecated as it squashes the NotAutorizedException. Use getOidObject() instead.
      Gets the ObjectIdentifier that this NmOid represents.

      Supported API: true
      Returns:
      ObjectIdentifier
    • getOidObject

      public ObjectIdentifier getOidObject()
      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 VersionForeignKey getVerId()
      Gets the VersionForeignKey that this NmOid represents.

      Supported API: true
      Returns:
      VersionForeignKey
    • setVerId

      public void setVerId(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
      Parameters:
      oidStr - oid string
      Returns:
      oid
      Throws:
      WTException - should never be thrown
    • newNmOid

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

      Supported API: true
      Parameters:
      oi - object identifier
      Returns:
      the object oid
      Throws:
      WTException - if oid can not be constructed from the provided identifier
    • getContainer

      @Deprecated public WTContainer getContainer() throws WTException
      Deprecated.
      This api has been deprecated as it squashes the NotAutorizedException. Use getContainerObject() instead.
      Gets the parent container of the object.

      Supported API: true
      Returns:
      the container
      Throws:
      WTException - should not be thrown as exceptions get squashed
    • getContainerObject

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

      Supported API: true
      Returns:
      the container
      Throws:
      WTException - if an exception occurs getting the container reference
    • getContainerRef

      @Deprecated public WTContainerRef getContainerRef() throws WTException
      Deprecated.
      This api has been deprecated as it squashes the NotAutorizedException and returns null in case of that exception. Use getContainerReference() instead.
      Gets the parent containerRef of the object.

      Supported API: true
      Returns:
      Throws:
      WTException
    • getContainerReference

      public WTContainerRef getContainerReference() throws WTException
      Gets the parent containerRef of the object.
      Supported API: true
      Returns:
      WTContainerRef object
      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
      Parameters:
      aref - the container ref
    • setSCM

      public void setSCM(SharedContainerMap ascm)
      Sets the shared container map.

      Supported API: true
      Parameters:
      ascm - the shared container map
    • getSCM

      public SharedContainerMap getSCM()
      Gets the shared container map.

      Supported API: true
      Returns:
      the shared container map
    • isRefInflated

      public boolean isRefInflated() throws WTException
      Whether or not the object reference is inflated.

      Supported API: true
      Returns:
      true if the object is inflated, false it if is not
      Throws:
      WTException - should not be thrown
    • getLatestIteration

      @Deprecated public Object getLatestIteration() throws WTException
      Deprecated.
      This api has been deprecated as it squashes the NotAutorizedException and returns null in case of that exception. Use getLatestIterationObject() instead.
      Get object associated with the NmOid ObjectIdentifier. Differs from getRef in that getRef does not return the latest iteration.

      Supported API: true
      Returns:
      the latest iteration of the object
      Throws:
      WTException - should not be thrown as this squashes exceptions
    • getLatestIterationObject

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

      Supported API: true
      Returns:
      Object the latest iteration of the object
      Throws:
      WTException - if the object can not be retrieved
    • getReferencedIteration

      @Deprecated public Object getReferencedIteration() throws WTException
      Deprecated.
      This api has been deprecated as it squashes the NotAutorizedException and returns null in case of that exception. Use getReferencedIterationObject() instead.
      Get object associated with the NmOid ObjectIdentifier. Differs from getRef in that getRef does not return the latest iteration.

      Supported API: true
      Returns:
      the referenced iteration of the object
      Throws:
      WTException - should not be thrown as this squashes exceptions
    • getReferencedIterationObject

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

      Supported API: true
      Returns:
      Object
      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
      Returns:
      true is the backing object reference is a version reference, false otherwise
    • getReferencedClass

      public Class<?> getReferencedClass()
      Get the class referenced by this oid.

      Supported API: true
      Returns:
      the class referenced by this oid
    • getReferencedClassString

      public String getReferencedClassString()
      The name of the class referenced by this oid.

      Supported API: true
      Returns:
      the name of the class referenced by this oid
    • isA

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

      Supported API: true
      Parameters:
      aClass - class to check
      Returns:
      true if the object references is an instance of the class provided, false otherwise
    • getReferenceString

      public String getReferenceString() throws WTException
      Gets the object reference as a String.

      Supported API: true
      Returns:
      the object reference as a String
      Throws:
      WTException - if there is a problem getting the reference string
    • isA

      public static boolean isA(NmOid nmOid, Class<?> aClass)
      Determines if the object references an instance of the class provided. Static version of isA(Class).

      Supported API: true
      Parameters:
      aClass - class to check
      nmOid - the oid to check the class of
      Returns: