Class Entity

  • All Implemented Interfaces:
    IBaseEntity, IEntity, IEntityOrBuilder, org.symphonyoss.s2.common.dom.json.IJsonDomNodeProvider

    public class Entity
    extends BaseEntity
    implements IEntity
    Base class for all generated object classes in a Canon model.
    Author:
    Bruce Skingle
    • Constructor Detail

      • Entity

        public Entity​(org.symphonyoss.s2.common.dom.json.ImmutableJsonObject jsonObject,
                      IModelRegistry modelRegistry)
        Constructor from serialized form.
        Parameters:
        jsonObject - A parse tree of the serialized form.
        modelRegistry - A model registry to use to deserialize any nested objects.
      • Entity

        public Entity​(IEntity canonOther)
        Constructor from another instance, usually a Builder.
        Parameters:
        canonOther - Another entity containing all values for the required object. This is usually a Builder.
      • Entity

        public Entity​(IEntityBuilder canonOther)
        Constructor from another instance, usually a Builder.
        Parameters:
        canonOther - Another entity containing all values for the required object. This is usually a Builder.
    • Method Detail

      • getJsonObject

        public org.symphonyoss.s2.common.dom.json.ImmutableJsonObject getJsonObject()
        Description copied from interface: IEntityOrBuilder
        Return the JSON object from which this entity was created.
        Specified by:
        getJsonObject in interface IEntityOrBuilder
        Returns:
        the JSON object from which this entity was created.
      • getCanonUnknownKeys

        public com.google.common.collect.ImmutableSet<String> getCanonUnknownKeys()
        Description copied from interface: IEntity
        The set of keys present in the JSON from which this object was deserialized which are not defined by the schema. In the case where an object extends some other object the super-class unknown keys will include all keys defined by the current class.
        Specified by:
        getCanonUnknownKeys in interface IEntity
        Returns:
        The set of unknown keys in the JSON from which this object was deserialized;