|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.jep.convert.ConverterFactory
public class ConverterFactory
Keep JepConversionFunction
objects for converting built-in
JEP object to Query API Expression
or Restriction
objects.
JepConversionFunction
Field Summary | |
---|---|
private static Map<Object,JepConversionFunction<?>> |
converters
|
Constructor Summary | |
---|---|
ConverterFactory()
|
Method Summary | |
---|---|
static JepConversionFunction<?> |
getConverter(Object o)
Get a converter for the specified built-in JEP object. |
static JepConversionFunction<?> |
getConverterByClass(Object o)
Get a converter for the specified built-in JEP object by checking if a converter has been registered for it's class. |
static Collection<JepConversionFunction<?>> |
getConverters()
Get all registered converters. |
static void |
registerConverter(Object o,
JepConversionFunction<?> converter)
Add a converter for a specific object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Map<Object,JepConversionFunction<?>> converters
Constructor Detail |
---|
public ConverterFactory()
Method Detail |
---|
public static JepConversionFunction<?> getConverter(Object o)
o
- The object to convert
JepConversionFunction
or null if no converter is foundpublic static JepConversionFunction<?> getConverterByClass(Object o)
o
- The object to convert
JepConversionFunction
or null if no converter is foundpublic static void registerConverter(Object o, JepConversionFunction<?> converter)
registerConverter(Add.class, new AddConverter()); registerConverter("==", new EqualsConverter());
o
- The object defining what the converter can convertconverter
- The converter
ItemAlreadyExistsException
- If a converter already exists for the given classpublic static Collection<JepConversionFunction<?>> getConverters()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |