1 25 29 package org.jresearch.gossip.tags.userstatus; 30 31 import java.sql.SQLException ; 32 import java.util.ArrayList ; 33 34 import org.jresearch.gossip.dao.ForumDAO; 35 import org.jresearch.gossip.exception.SystemException; 36 37 41 public class Ranks { 42 private static ArrayList ranks = new ArrayList (); 43 44 private static Ranks instance; 45 46 private Ranks() { 47 48 } 49 50 53 public static synchronized Ranks getInstance() { 54 if (instance == null) { 55 synchronized (ranks) { 56 if (instance == null) { 57 instance = new Ranks(); 58 } 59 } 60 } 61 return instance; 62 } 63 64 67 public void load() throws SystemException { 68 ForumDAO dao = ForumDAO.getInstance(); 69 try { 70 ranks = (ArrayList ) dao.getRankList(); 71 } catch (SQLException e) { 72 throw new SystemException(e); 73 } 74 } 75 76 79 public ArrayList getRanks() { 80 return ranks; 81 } 82 } | Popular Tags |