ThingWorx Edge Java SDK > Application Details > Base Types and Primitives
  
Base Types and Primitives
Base types and primitives both provide classifications for data values. While base types are just a label, a primitive is a base type PLUS a value. The ThingWorx platform has its own set of primitives that represent a wide variety of data types. For example, the platform and Edge products all have a base type called LOCATION; the primitive, Location, is the LOCATION base type plus an actual location (with settings for latitude, longitude, and altitude).
INFOTABLE is a special base type that is used to aggregate data of various types into one value. For example, an infotable might be used to return results of a service request. For more information, refer to Example Using the InfoTable Base Type.
To access a string value from an infotable as a primitive, use the following code:
// This way of accessing a value will work for all primitive types.
StringPrimitive prim = (StringPrimitive) result.getFirstRow().
getPrimitive("name");

LOG.info("The name of the Thing is: {} "prim.getValue());
The following table lists and briefly describes the base types and their corresponding primitives in ThingWorx platform and ThingWorx Edge products.
Base Type
Primitive
Description
BOOLEAN
BooleanPrimitive
True or false values only
DATETIME
DatetimePrimitive
Date and time value
GROUPNAME
StringPrimitive
ThingWorx group name
HTML
StringPrimitive
HTML value
HYPERLINK
StringPrimitve
Hyperlink value
IMAGE
ImagePrimitive
Image value
IMAGELINK
StringPrimitive
Image link value
INFOTABLE
InfoTablePrimitive
ThingWorx infotable
INTEGER
IntegerPrimitive
32–bit integer value
JSON
JSONPrimitive
JSON structure
LOCATION
LocationPrimitive
ThingWorx location structure
MASHUPNAME
StringPrimitive
ThingWorx mashup name
MENUNAME
StringPrimitive
ThingWorx menu name
NOTHING
No type (used for services to define void result)
NUMBER
NumberPrimitive
Double precision value
STRING
StringPrimitive
String value
QUERY
ThingWorx query structure
TEXT
StringPrimitive
Text value
THINGNAME
StringPrimitive
ThingWorx thing name
USERNAME
StringPrimitive
ThingWorx user name
XML
XMLPrimitive
XML structure