Package ome.model

Interface IObject

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Set fields()
      returns a Set of field names that belong to this class
      Details getDetails()
      Value (i.e.
      GraphHolder getGraphHolder()
      retrieves the GraphHolder for this entity.
      java.lang.Long getId()
      primary key of this object.
      boolean isLoaded()
      transient field (not stored in the DB) which specifies whether this object has been loaded from the DB or is only a wrapper around the ID.
      boolean isValid()
      calls the class-specific validator for this instance and returns the value from Validation.isValid()
      void putAt​(java.lang.String field, java.lang.Object value)
      stores a value in this instance.
      java.lang.Object retrieve​(java.lang.String field)
      retrieves a value from this instance.
      void setId​(java.lang.Long id)
      usually unneeded.
      void unload()
      set the loaded field to false, and set all non-ID fields to null.
      Validation validate()
      calls the class-specific validator for this instance and returns the Validation object.
    • Method Detail

      • getId

        java.lang.Long getId()
        primary key of this object. Before the session is flushed, this value may be null.
        Returns:
        Long primary key. May be null.
      • setId

        void setId​(java.lang.Long id)
        usually unneeded. Ids are managed by the backend.
        Parameters:
        id - Long value for this id.
      • getDetails

        Details getDetails()
        Value (i.e. not entity) which is available on all rows in the database. Low-level "details" such as security, ownership, auditing are managed here. When setting values on Details, it is important to realize that most of the values are managed by the backend and may be replaced. For example, a user does not have permission to change the owner of an object, not even when owned by that user. To replace all of the values from an existing Details instance, use Details.copy(Details) or Details.shallowCopy(Details)
      • isLoaded

        boolean isLoaded()
        transient field (not stored in the DB) which specifies whether this object has been loaded from the DB or is only a wrapper around the ID.
      • unload

        void unload()
             throws ApiUsageException
        set the loaded field to false, and set all non-ID fields to null. Subsequent calls to all accessors other than getId/setId will throw an ApiUsageException
        Throws:
        ApiUsageException
      • isValid

        boolean isValid()
        calls the class-specific validator for this instance and returns the value from Validation.isValid()
      • validate

        Validation validate()
        calls the class-specific validator for this instance and returns the Validation object.
        Returns:
        Validation collecting parameter.
      • retrieve

        java.lang.Object retrieve​(java.lang.String field)
        retrieves a value from this instance. Values for field which match a field of this instance will be delegated to the accessors. Otherwise, values will be retrieved from a lazy-loaded map filled by calls to putAt(String, Object)
      • putAt

        void putAt​(java.lang.String field,
                   java.lang.Object value)
        stores a value in this instance. Values for field which match a field of this instance will be delegated to the accessors. Otherwise, values will be stored in a lazy-loaded map.
        Parameters:
        field - Field name
        value - Any object to be stored.
      • fields

        java.util.Set fields()
        returns a Set of field names that belong to this class
      • getGraphHolder

        GraphHolder getGraphHolder()
        retrieves the GraphHolder for this entity. If the GraphHolder has not been actively set, a new one will be instatiated.
        Returns:
        Non-null GraphHolder