1 package org.tigris.scarab.om; 2 3 48 49 import org.apache.torque.TorqueException; 50 51 57 public class UserPreferenceManager 58 extends BaseUserPreferenceManager 59 { 60 65 public UserPreferenceManager() 66 throws TorqueException 67 { 68 super(); 69 setRegion(getClassName().replace('.', '_')); 70 } 71 72 76 public static UserPreference getInstance(Integer userid) 77 throws TorqueException 78 { 79 if (userid == null) 80 { 81 throw new IllegalArgumentException ("User ID cannot be null"); } 83 84 UserPreference up = null; 85 try 86 { 87 up = BaseUserPreferenceManager.getInstance(userid); 88 } 89 catch (TorqueException te) 90 { 91 } 93 if (up == null) 94 { 95 up = UserPreferenceManager.getInstance(); 96 up.setUserId(userid); 97 } 98 return up; 99 } 100 } 101 | Popular Tags |