org.tigris.scarab.om
Class UserPreference

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseUserPreference
          extended byorg.tigris.scarab.om.UserPreference
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable

public class UserPreference
extends BaseUserPreference

This class is the home of where we store user preferences right now the design is based on adding columns to the database for each thing you want to store. Eventually, we will want to come up with a real system for dealing with this.

Version:
$Id: UserPreference.java 10275 2006-08-31 14:43:23Z jorgeuriarte $
Author:
Jon S. Stevens
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
UserPreference()
           
 
Method Summary
 void save()
          Makes sure only non-anonymous users will upgrade their configuration.
 void setLocale(java.lang.String locale)
          This method truncates the preference length at 255 characters, as the database column is onl 255 characters.
 
Methods inherited from class org.tigris.scarab.om.BaseUserPreference
copy, copyInto, getByName, getByPeerName, getByPosition, getEnterIssueRedirect, getFieldNames, getHomePage, getLocale, getPasswordExpire, getPeer, getPrimaryKey, getQueryKey, getScarabUser, getScarabUser, getUserId, isCacheOnSave, save, save, setEnterIssueRedirect, setHomePage, setPasswordExpire, setPrimaryKey, setPrimaryKey, setQueryKey, setScarabUser, setScarabUserKey, setUserId, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserPreference

public UserPreference()
Method Detail

setLocale

public void setLocale(java.lang.String locale)
This method truncates the preference length at 255 characters, as the database column is onl 255 characters. This should not have an adverse affect because the Accept-Language header parser generally only needs the first few characters.

Overrides:
setLocale in class BaseUserPreference
Parameters:
locale - The Locale information.

save

public void save()
          throws org.apache.torque.TorqueException
Makes sure only non-anonymous users will upgrade their configuration.

Specified by:
save in interface org.apache.torque.om.Persistent
Overrides:
save in class BaseUserPreference
Throws:
org.apache.torque.TorqueException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.