Interface Resolvable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Object getEntity​(EntityReference ref)
      Allows this entity to be fetched based on the ref (prefix and local id), also used to determine the class type of these entities by requesting an entity without specifying an id (id = null)
      WARNING: this method should not return null, throw the appropriate exception if the entity data cannot be found Note: The entity class type needs to be able to be resolved from the ClassLoader of the EntityBrokerManager (currently this means deployed into shared)

      The entity object does not have to be a model object itself and may simply be something created (Map, String, EntityData, etc.) to give to anyone calling this method.
    • Method Detail

      • getEntity

        Object getEntity​(EntityReference ref)
        Allows this entity to be fetched based on the ref (prefix and local id), also used to determine the class type of these entities by requesting an entity without specifying an id (id = null)
        WARNING: this method should not return null, throw the appropriate exception if the entity data cannot be found Note: The entity class type needs to be able to be resolved from the ClassLoader of the EntityBrokerManager (currently this means deployed into shared)

        The entity object does not have to be a model object itself and may simply be something created (Map, String, EntityData, etc.) to give to anyone calling this method.
        Parameters:
        ref - the parsed reference object which uniquely represents an entity OR only a prefix (indicating you should return a default constructed object with no properties set)
        Returns:
        an entity object for the prefix and id in the provided ref OR an empty entity object if only the prefix is supplied (should NOT return null), this return could be an EntityData object, Map, your own POJO, etc.
        Throws:
        IllegalArgumentException - if the id is invalid for this type of entity, NOTE: a null id means you should return a default constructed object)
        SecurityException - if access to this entity is not allowed
        IllegalStateException - for all other errors