org.neodatis.odb.impl.tool
Class ObjectTool
java.lang.Object
org.neodatis.odb.impl.tool.ObjectTool
public class ObjectTool
- extends java.lang.Object
Basic native Object formatter. Used in ODBExplorer and XML import/export.
- Author:
- osmadja
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
format
public static OdbDateFormat format
ID_CALLER_IS_ODB_EXPLORER
public static int ID_CALLER_IS_ODB_EXPLORER
ID_CALLER_IS_XML
public static int ID_CALLER_IS_XML
ID_CALLER_IS_SERIALIZER
public static int ID_CALLER_IS_SERIALIZER
ObjectTool
public ObjectTool()
stringToObject
public static java.lang.Object stringToObject(int odbTypeId,
java.lang.String value,
int caller)
throws java.lang.NumberFormatException,
java.text.ParseException
- Convert a string representation to the right object
If it is a representation of an int, it will return an Integer.
- Parameters:
odbTypeId
- The native object typevalue
- The real valuecaller
- The caller type , can be one of the constants
ObjectTool.CALLER_IS_*
- Returns:
- The right object
- Throws:
java.lang.NumberFormatException
java.text.ParseException
stringToObjectInfo
public static NativeObjectInfo stringToObjectInfo(int odbTypeId,
java.lang.String value,
int caller,
ClassInfo ci)
throws java.lang.NumberFormatException,
java.text.ParseException
- Parameters:
odbTypeId
- The native object typevalue
- The real valuecaller
- The caller type , can be one of the constants
ObjectTool.CALLER_IS_*ci
- The ClassInfo. It is only used for enum where we need the enum
class info. In other cases, it is null
- Returns:
- The NativeObjectInfo that represents the specific value
- Throws:
java.lang.NumberFormatException
java.text.ParseException
atomicNativeObjectToString
public static java.lang.String atomicNativeObjectToString(AtomicNativeObjectInfo anoi,
int caller)
callerIsOdbExplorer
public static boolean callerIsOdbExplorer(int caller)
callerIsXml
public static boolean callerIsXml(int caller)
callerIsSerializer
public static boolean callerIsSerializer(int caller)