Class ProjectTagDao

All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<ProjectTag,Long,IEntityContext>, IGenericDao<ProjectTag>, IProjectTagDao, IProjektDependentBaseDao<ProjectTag>

public class ProjectTagDao extends ProjektDependentBaseDao<ProjectTag> implements IProjectTagDao
The default implementation of IProjectTagDao that can be accessed via DaoProvider.
Since:
8.0.0
Author:
XIMA MEDIA GmbH
  • Field Summary

    Fields inherited from class de.xima.cmn.dao.AbstractDao

    entityClass
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of this DAO.
  • Method Summary

    Modifier and Type
    Method
    Description
    Fetches all IDs of all projects that have at least one tag which starts with one of the given tags.
    getTags(IEntityContext ec, Iterable<Long> projectIds)
    Fetches all tags for the given projects.
    void
    Updates the given project with the tags.

    Methods inherited from class de.xima.fc.dao.impl.GenericDao

    getEntityRefs, getPostActionHook, getPreActionHook, read

    Methods inherited from class de.xima.cmn.dao.AbstractDao

    all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao

    all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update

    Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao

    count, findAll, findSingle, getEntityRefs, read
  • Constructor Details

    • ProjectTagDao

      public ProjectTagDao()
      Creates a new instance of this DAO. Normally you should use the singleton instance provided by DaoProvider.PROJECTTAG_DAO.
  • Method Details

    • updateTags

      public void updateTags(IEntityContext ec, Projekt project, Iterable<String> tags)
      Description copied from interface: IProjectTagDao
      Updates the given project with the tags. All existing tags are replaced with the given tags. Note that this modifies the project. You should read the project again after this operation.
      Specified by:
      updateTags in interface IProjectTagDao
      Parameters:
      ec - Entity context for accessing the database.
      project - Project to update.
      tags - New tags for the project.
    • getTags

      public Map<Long,List<String>> getTags(IEntityContext ec, Iterable<Long> projectIds)
      Description copied from interface: IProjectTagDao
      Fetches all tags for the given projects.
      Specified by:
      getTags in interface IProjectTagDao
      Parameters:
      ec - Entity context for accessing the database.
      projectIds - IDs of the projects for which to fetch the tags.
      Returns:
      Map with they key being the project ID, mapped to the tags for that project.
    • getProjectIdsHavingTagsStartingWith

      public List<Long> getProjectIdsHavingTagsStartingWith(IEntityContext ec, Iterable<String> tags)
      Description copied from interface: IProjectTagDao
      Fetches all IDs of all projects that have at least one tag which starts with one of the given tags.
      Specified by:
      getProjectIdsHavingTagsStartingWith in interface IProjectTagDao
      Parameters:
      ec - Entity context for accessing the database.
      tags - Tags to search for.
      Returns:
      All project IDs that have at least one tag starting with one of the given tags.