org.neodatis.odb.impl.tool
Class ObjectTool
- java.lang.Object
-
- org.neodatis.odb.impl.tool.ObjectTool
-
public class ObjectTool extends java.lang.ObjectBasic native Object formatter. Used in ODBExplorer and XML import/export.
-
-
Field Summary
Fields Modifier and Type Field and Description static OdbDateFormatformatstatic intID_CALLER_IS_ODB_EXPLORERstatic intID_CALLER_IS_SERIALIZERstatic intID_CALLER_IS_XML
-
Constructor Summary
Constructors Constructor and Description ObjectTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.StringatomicNativeObjectToString(AtomicNativeObjectInfo anoi, int caller)static booleancallerIsOdbExplorer(int caller)static booleancallerIsSerializer(int caller)static booleancallerIsXml(int caller)static java.lang.ObjectstringToObject(int odbTypeId, java.lang.String value, int caller)Convert a string representation to the right objectstatic NativeObjectInfostringToObjectInfo(int odbTypeId, java.lang.String value, int caller, ClassInfo ci)
-
-
-
Field Detail
-
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
-
-
Method Detail
-
stringToObject
public static java.lang.Object stringToObject(int odbTypeId, java.lang.String value, int caller) throws java.lang.NumberFormatException, java.text.ParseExceptionConvert a string representation to the right objectIf 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.NumberFormatExceptionjava.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.NumberFormatExceptionjava.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)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG