Class ProxyReference

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<? extends FastPathObject> getElementType​(java.lang.String fieldName)
      Returns the element type of a collection by name.
      java.lang.Object getFieldProxy​(java.lang.String fieldName)
      Returns the value of a field without dereferencing any ProxyReference objects.
      java.lang.Class<?> getFieldType​(java.lang.String fieldName)
      Returns the type of a field by name.
      java.lang.Object getFieldValue​(java.lang.String fieldName)
      Returns the value of a field by name.
      java.lang.Integer getId()
      Gets the ID value
      StringConstructor getoBJECT()
      Returns the NotXml serialised version of this object.
      InterMineObject getObject()
      Gets the real object from the database.
      ObjectStore getObjectStore()
      Returns the ObjectStore that this proxy will use
      void setFieldValue​(java.lang.String fieldName, java.lang.Object value)
      Sets the value of a field by name.
      void setId​(java.lang.Integer id)
      Sets the ID value
      void setoBJECT​(java.lang.String[] notXml, ObjectStore os)
      Sets the values of the fields to the values in the given split NotXml.
      void setoBJECT​(java.lang.String notXml, ObjectStore os)
      Sets the values of the fields to the values in the given NotXml.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProxyReference

        public ProxyReference​(ObjectStore os,
                              java.lang.Integer id,
                              java.lang.Class<? extends InterMineObject> clazz)
        Construct a ProxyReference object.
        Parameters:
        os - the ObjectStore to retrieve the object from
        id - the internal id of the real object
        clazz - a hint of the class that this object is - use InterMineObject if unsure
    • Method Detail

      • getObject

        public InterMineObject getObject()
        Gets the real object from the database.
        Returns:
        a InterMineObject
      • getObjectStore

        public ObjectStore getObjectStore()
        Returns the ObjectStore that this proxy will use
        Specified by:
        getObjectStore in interface Lazy
        Returns:
        an ObjectStore
      • toString

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

        public void setoBJECT​(java.lang.String notXml,
                              ObjectStore os)
        Sets the values of the fields to the values in the given NotXml.
        Specified by:
        setoBJECT in interface InterMineObject
        Parameters:
        notXml - a String containing NotXml for this class
        os - an ObjectStore from which to create proxies
      • setoBJECT

        public void setoBJECT​(java.lang.String[] notXml,
                              ObjectStore os)
        Sets the values of the fields to the values in the given split NotXml.
        Specified by:
        setoBJECT in interface InterMineObject
        Parameters:
        notXml - a String array containing the NotXml split with the delimiter
        os - an ObjectStore from which to create proxies
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName)
        Returns the value of a field by name.
        Specified by:
        getFieldValue in interface FastPathObject
        Parameters:
        fieldName - the name of the field
        Returns:
        the value of the field
      • getFieldProxy

        public java.lang.Object getFieldProxy​(java.lang.String fieldName)
        Returns the value of a field without dereferencing any ProxyReference objects.
        Specified by:
        getFieldProxy in interface FastPathObject
        Parameters:
        fieldName - the name of the field
        Returns:
        the value of the field, or a ProxyReference representing it
      • setFieldValue

        public void setFieldValue​(java.lang.String fieldName,
                                  java.lang.Object value)
        Sets the value of a field by name.
        Specified by:
        setFieldValue in interface FastPathObject
        Parameters:
        fieldName - the name of the field
        value - the value of the field, or a ProxyReference representing it
      • getFieldType

        public java.lang.Class<?> getFieldType​(java.lang.String fieldName)
        Returns the type of a field by name.
        Specified by:
        getFieldType in interface FastPathObject
        Parameters:
        fieldName - the name of the field
        Returns:
        the type of the field