Class AbstractIdentifiableObject

  • Direct Known Subclasses:
    AbstractOrganizableObject, AbstractUser

    public class AbstractIdentifiableObject
    extends Object
    This class is the parent class of all objects that have to be identified uniquely for persistence purposes for instance
    • Constructor Detail

      • AbstractIdentifiableObject

        public AbstractIdentifiableObject()
    • Method Detail

      • getId

        public org.bson.types.ObjectId getId()
        Returns:
        the unique ID of this object
      • setId

        public void setId​(org.bson.types.ObjectId _id)
        Parameters:
        _id - the unique ID of this object
      • setCustomFields

        public void setCustomFields​(Map<String,​Object> customFields)
      • getCustomField

        public Object getCustomField​(String key)
      • computeCustomFieldIfAbsent

        public <T> T computeCustomFieldIfAbsent​(String key,
                                                Function<? super String,​T> mappingFunction)
      • getCustomField

        public <T> T getCustomField​(String key,
                                    Class<T> valueClass)
      • addCustomField

        public void addCustomField​(String key,
                                   Object value)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object