Class TorqueAbstractRoleManager

    • Field Detail

      • lazyLoading

        protected Boolean lazyLoading
    • Constructor Detail

      • TorqueAbstractRoleManager

        public TorqueAbstractRoleManager()
    • Method Detail

      • configure

        public void configure​(org.apache.avalon.framework.configuration.Configuration conf)
                       throws org.apache.avalon.framework.configuration.ConfigurationException
        Avalon Service lifecycle method
        Specified by:
        configure in interface org.apache.avalon.framework.configuration.Configurable
        Overrides:
        configure in class AbstractEntityManager
        Throws:
        org.apache.avalon.framework.configuration.ConfigurationException
      • doSelectAllRoles

        protected abstract <T extends RoleList<T> doSelectAllRoles​(Connection con)
                                                              throws org.apache.torque.TorqueException
        Get all specialized Roles
        Parameters:
        con - a database connection
        Returns:
        a List of Role instances
        Throws:
        org.apache.torque.TorqueException - if any database error occurs
      • doSelectByName

        protected abstract <T extends Role> T doSelectByName​(String name,
                                                             Connection con)
                                                      throws org.apache.torque.NoRowsException,
                                                             org.apache.torque.TooManyRowsException,
                                                             org.apache.torque.TorqueException
        Get a specialized Role by name
        Parameters:
        name - the name of the group
        con - a database connection
        Returns:
        a Role instance
        Throws:
        org.apache.torque.NoRowsException - if no such group exists
        org.apache.torque.TooManyRowsException - if multiple groups with the given name exist
        org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
      • doSelectById

        protected abstract <T extends Role> T doSelectById​(Integer id,
                                                           Connection con)
                                                    throws org.apache.torque.NoRowsException,
                                                           org.apache.torque.TooManyRowsException,
                                                           org.apache.torque.TorqueException
        Get a specialized Role by id
        Parameters:
        id - the id of the group
        con - a database connection
        Returns:
        a Role instance
        Throws:
        org.apache.torque.NoRowsException - if no such group exists
        org.apache.torque.TooManyRowsException - if multiple groups with the given id exist
        org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
      • persistNewRole

        protected <T extends Role> T persistNewRole​(T role)
                                             throws DataBackendException
        Creates a new role with specified attributes.
        Specified by:
        persistNewRole in class AbstractRoleManager
        Parameters:
        role - the object describing the role to be created.
        Returns:
        a new Role object that has id set up properly.
        Throws:
        DataBackendException - if there was an error accessing the data backend.
      • checkExists

        public boolean checkExists​(String roleName)
                            throws DataBackendException
        Determines if the Role exists in the security system.
        Specified by:
        checkExists in interface RoleManager
        Parameters:
        roleName - a Role value
        Returns:
        true if the role name exists in the system, false otherwise
        Throws:
        DataBackendException - when more than one Role with the same name exists.