Class DivisionManager

    • Method Detail

      • getDivisionByName

        public Division getDivisionByName​(java.lang.String name)
        Parameters:
        name - The string name of the Division to get.
        Returns:
        requested Division object or null if none exists
      • newDivision

        public Division newDivision​(java.lang.String name)
        Finds an existing Division or creates a new Division if needed requires Division's name creates a unique id for this Division
        Parameters:
        name - The string name for a new Division.
        Returns:
        new Division or existing Division
      • register

        public void register​(Division division)
        Remember a NamedBean Object created outside the manager.
        Parameters:
        division - The Division to add.
      • deregister

        public void deregister​(Division division)
        Forget a NamedBean Object created outside the manager.
        Parameters:
        division - The Division to delete.
      • getDivisionsByIdList

        public java.util.List<DivisiongetDivisionsByIdList()
        Sort by Division id
        Returns:
        list of divisions ordered by id numbers
      • getList

        public java.util.List<DivisiongetList()
        Gets an unsorted list of all divisions.
        Returns:
        All divisions.
      • getComboBox

        public javax.swing.JComboBox<DivisiongetComboBox()
        Returns:
        ComboBox with divisions for this railroad
      • load

        public void load​(org.jdom2.Element root)
      • store

        public void store​(org.jdom2.Element root)
      • setDirtyAndFirePropertyChange

        protected void setDirtyAndFirePropertyChange​(java.lang.String p,
                                                     java.lang.Object old,
                                                     java.lang.Object n)