Class TreeNodeService<E extends TreeNode,​D extends TreeNodeDao<E>>

    • Constructor Detail

      • TreeNodeService

        public TreeNodeService()
        Default constructor, which calls the type-constructor
      • TreeNodeService

        protected TreeNodeService​(Class<E> entityClass)
        Constructor that sets the concrete entity class for the service. Subclasses MUST call this constructor.
    • Method Detail

      • cloneAndPersistTreeNode

        public E cloneAndPersistTreeNode​(E node)
                                  throws Exception
        This unproxies and eagerly fetches the whole node/tree and detaches it from the hibernate session before persisting a new "clone" instance in the database. In case of a TreeFolder, each child node will also be re-persisted (as a new database entry).
        Parameters:
        node -
        Returns:
        Throws:
        IllegalAccessException
        NoSuchFieldException
        Exception
      • setDao

        @Autowired
        @Qualifier("treeNodeDao")
        public void setDao​(D dao)
        We have to use Qualifier to define the correct dao here. Otherwise, spring can not decide which dao has to be autowired here as there are multiple candidates.
        Overrides:
        setDao in class PermissionAwareCrudService<E extends TreeNode,​D extends TreeNodeDao<E>>
        Parameters:
        dao - the dao to set