org.norther.tammi.root.db
Class DefaultLobConverter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.converter.DefaultObjectConverter<Object>
          extended by org.norther.tammi.root.db.DefaultLobConverter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, ObjectConverter<Object>

public class DefaultLobConverter
extends DefaultObjectConverter<Object>

A default implemantation of large object converter.

Version:
$Id: DefaultLobConverter.java,v 1.4 2009/10/02 13:50:47 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultLobConverter()
          Constructs a new converter.
 
Method Summary
protected  Object getComponentInstance(String className, Object object, String pattern)
          Gets a large object instance converted from a source object.
protected  String toComponentString(String className, Object object, String pattern)
          Returns the string representation of a large object.
 
Methods inherited from class org.norther.tammi.core.converter.DefaultObjectConverter
fromLocalizedObject, getFormatPattern, getInstance, getInstance, getInstance, getLocalizedPattern, getResourceFinderName, postmanaged, setResourceFinderName, toLocalizedObject, toString, toString, toString, toStrings, toStrings, toStrings, unmanaged
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLobConverter

public DefaultLobConverter()
Constructs a new converter.

Method Detail

getComponentInstance

protected Object getComponentInstance(String className,
                                      Object object,
                                      String pattern)
                               throws ConversionException
Gets a large object instance converted from a source object. The source object may be a string representation of a file path, URL path, File instance, URL instance, byte buffer, char buffer, input stream or reader. The object is passed as a paramter to the LOB factory's instance constructor.

Overrides:
getComponentInstance in class DefaultObjectConverter<Object>
Parameters:
className - the name of the class.
object - the source object.
pattern - the conversion pattern.
Returns:
the instance.
Throws:
ConversionException - if conversion fails.

toComponentString

protected String toComponentString(String className,
                                   Object object,
                                   String pattern)
Returns the string representation of a large object. This is always null as we don't want and can't read the contents of a large object within the conversion context.

Overrides:
toComponentString in class DefaultObjectConverter<Object>
Parameters:
className - the name of the class.
object - the source object.
pattern - the conversion pattern.
Returns:
the string representation.


Copyright © 2004 The Norther Organization. All rights reserved.