Class DefaultGlobalDescriptionDao

    • Constructor Detail

      • DefaultGlobalDescriptionDao

        public DefaultGlobalDescriptionDao()
    • Method Detail

      • getByClassId

        protected GlobalDescription getByClassId​(long id)
        Description copied from class: HibernateObjectDao
        Retrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.
        Overrides:
        getByClassId in class HibernateObjectDao<GlobalDescription>
        Parameters:
        id - the id of the object to look up
        Returns:
        the corresponding object, or null if the object does not exist with the appropriate class and id.
      • getGlobalDescription

        public GlobalDescription getGlobalDescription()
        Description copied from interface: GlobalDescriptionDao
        Find the global description by content type. Would be extremely slow operation when it is called on a cold instance because it has to scan the entire CONTENT table.
        Specified by:
        getGlobalDescription in interface GlobalDescriptionDao
        Returns:
        global description record if found or null if not found
      • getGlobalDescriptionById

        public GlobalDescription getGlobalDescriptionById​(long recordId)
        Description copied from interface: GlobalDescriptionDao
        Returns the global description record by id. It assumes that the caller knows ID of the global description record (for example, it was stored/cached somewhere else). Note that this method never returns invalid or wrong record. For example, if a record was not found, or a record with a wrong content type is found, this method will return null.
        Specified by:
        getGlobalDescriptionById in interface GlobalDescriptionDao
        Parameters:
        recordId - record id
        Returns:
        global description record if found or null if not found