Class TypeMappings
- java.lang.Object
-
- com.inductiveautomation.ignition.common.gateway.TypeMappings
-
public class TypeMappings extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.Class<?>,java.lang.Integer>
CLASS_TO_SQLTYPE
A mapping of type codes from java.sql.Types to the Strings that are used by FactoryPMI to encode types in GW-Client commstatic java.util.Map<java.lang.Class<?>,java.lang.String>
CLASS_TO_STRING
A reverse mapping of STRING_TO_TYPES; java classes to our string-based type codes.static java.util.Map<java.lang.Integer,java.lang.Class<?>>
SQLTYPE_TO_CLASS
A mapping of type codes from java.sql.Types to the Java Classes that will represent them.static java.util.Map<java.lang.Integer,java.lang.String>
SQLTYPE_TO_STRING
A mapping of type codes from java.sql.Types to the Strings that are used to encode types in GW-Client commstatic java.util.Map<java.lang.String,java.lang.Class<?>>
STRING_TO_CLASS
A Mapping of the Strings that are used by FactoryPMI to encode types to the actual Java classes that they represent
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
getValueFromResultSet(java.sql.ResultSet rs, int colIdx, int typeCode)
Pulls the value for the given column from the result set, using the appropriate getter (rs.get***) not rs.getObject.static java.lang.Object
getValueFromResultSet(java.sql.ResultSet rs, int colIdx, java.lang.Class<?> javaClass)
Pulls the value for the given column from the result set, using the appropriate getter (rs.get***) not rs.getObject.
-
-
-
Field Detail
-
STRING_TO_CLASS
public static final java.util.Map<java.lang.String,java.lang.Class<?>> STRING_TO_CLASS
A Mapping of the Strings that are used by FactoryPMI to encode types to the actual Java classes that they represent
-
CLASS_TO_STRING
public static final java.util.Map<java.lang.Class<?>,java.lang.String> CLASS_TO_STRING
A reverse mapping of STRING_TO_TYPES; java classes to our string-based type codes. Contains mappings for primitives as well.
-
CLASS_TO_SQLTYPE
public static final java.util.Map<java.lang.Class<?>,java.lang.Integer> CLASS_TO_SQLTYPE
A mapping of type codes from java.sql.Types to the Strings that are used by FactoryPMI to encode types in GW-Client comm
-
SQLTYPE_TO_STRING
public static final java.util.Map<java.lang.Integer,java.lang.String> SQLTYPE_TO_STRING
A mapping of type codes from java.sql.Types to the Strings that are used to encode types in GW-Client comm
-
SQLTYPE_TO_CLASS
public static final java.util.Map<java.lang.Integer,java.lang.Class<?>> SQLTYPE_TO_CLASS
A mapping of type codes from java.sql.Types to the Java Classes that will represent them.
-
-
Method Detail
-
getValueFromResultSet
public static java.lang.Object getValueFromResultSet(java.sql.ResultSet rs, int colIdx, java.lang.Class<?> javaClass) throws java.sql.SQLException
Pulls the value for the given column from the result set, using the appropriate getter (rs.get***) not rs.getObject. Returns null if rs.wasNull() returns true after the call.- Throws:
java.sql.SQLException
-
getValueFromResultSet
public static java.lang.Object getValueFromResultSet(java.sql.ResultSet rs, int colIdx, int typeCode) throws java.sql.SQLException
Pulls the value for the given column from the result set, using the appropriate getter (rs.get***) not rs.getObject. Returns null if rs.wasNull() returns true after the call.- Throws:
java.sql.SQLException
-
-