return Integer.valueOf(id);
}
/** Method that returns the UserDataSource data and updates it if necessary. */
private BaseUserDataSource getUserDataSource(UserDataSourceData udsData) {
BaseUserDataSource userdatasource = udsData.getCachedUserDataSource();
if (userdatasource == null) {
java.beans.XMLDecoder decoder;
try {
decoder = new java.beans.XMLDecoder(new java.io.ByteArrayInputStream(udsData.getData().getBytes("UTF8")));
} catch (UnsupportedEncodingException e) {
throw new EJBException(e);
}
HashMap h = (HashMap) decoder.readObject();
decoder.close();
// Handle Base64 encoded string values
HashMap data = new Base64GetHashMap(h);
switch (((Integer) (data.get(BaseUserDataSource.TYPE))).intValue()) {
case CustomUserDataSourceContainer.TYPE_CUSTOMUSERDATASOURCECONTAINER:
userdatasource = new CustomUserDataSourceContainer();
break;
}
userdatasource.loadData(data);
}
return userdatasource;
}