Example: UserProfileExtended.java
package com.ibm.servlet.personalization.userprofile;
/* -----------------------------------------------------------------
** Copyright 1997-99 IBM Corporation. All rights reserved.
**
** -----------------------------------------------------------------
*/
import java.util.*;
import com.ibm.servlet.personalization.userprofile.UserProfile;
import com.ibm.websphere.userprofile.UserProfileExtender;
import com.ibm.websphere.userprofile.UserProfileProperties;
public class UserProfileExtended extends UserProfile implements UserProfileExtender,
UserProfileProperties {
//New column that is being added by this
//derived class.
public Hashtable properties;
static String propCol ="properties";
//Manager Class will call this method to append new Column types
//to SQL Strings. If UserProfile class is extended to append new columns
//it should implement UserProfileExtender.
//COLUMNS: Base Class columns + columns returned by this class
public String[] getNewColumns() {
//if variable name is properties, you need to
//return "properties" . JDBC equivalent will be
//generated automatically.
String[] newCol={propCol};
return newCol;
}
public Object getValue(String key) {
// Need to call this method to
// get the things from persistent store
properties = (Hashtable) getByType(propCol);
if(properties != null)
return properties.get(key);
else return null;
}
public void putValue(String key, Object value) {
properties =(Hashtable) getByType(propCol);
if(properties == null)
properties = new Hashtable();
properties.put(key,value);
//store in persistent store
setByType(propCol, properties);
}
public void removeValue(String key) {
properties = (Hashtable) getByType(propCol);
if(properties == null)
return;
properties.remove(key);
//store in persistent store
setByType(propCol, properties);
}
}

Using user profiles

User profile development options
Searchable topic ID:
UserProfileExtended_java
Last updated: Jun 21, 2007 8:07:48 PM CDT
WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/ae/rprs_user_profile_extended_java.html