Class SqlCastHelper
java.lang.Object
org.evomaster.client.java.sql.heuristic.SqlCastHelper
Utility class for casting values to various SQL data types. Provides methods
to safely cast objects into types such as boolean, integer, byte, short, long,
double, string, and DateTime. Throws an exception if the cast is not possible
or if the input value is null.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Objectstatic ObjectcastTo(SqlDataType dataType, Object value) static booleancastToBoolean(Object value) static bytecastToByte(Object value) static ObjectcastToDateTime(Object value) static doublecastToDouble(Object value) static intcastToInteger(Object value) static longcastToLong(Object value) static shortcastToShort(Object value) static StringcastToString(Object value)
-
Constructor Details
-
SqlCastHelper
public SqlCastHelper()
-
-
Method Details
-
castToBoolean
-
castToInteger
-
castToByte
-
castToShort
-
castToLong
-
castToDouble
-
castToString
-
castToDateTime
-
castTo
-
castTo
-