2.4.1 Range of Java data type supported in CMP

The following table describes the range of Java data types supported in the CMP Entity Bean of an EJB container and also describes the availability of specifications for the primary key:

Table 2-10 Range of Java data types supported in CMP

Java data typeRange of valuesSpecification to the primary key
booleantrue, falseN
java.lang.BooleanY
byte-128 to 127N
java.lang.ByteY
char'\u0000' to '\uffff'(0 to 65535)N
java.lang.CharacterY
short-32768 to 32767N
java.lang.ShortY
int-2147483648​ to 2147483647​N
java.lang.IntegerY
long-9223372036854775808​ to 9223372036854775807​N
java.lang.LongY
float#[Figure]1.40239846​e-45 to [Figure]3.40282347​e38N
java.lang.Float#Y
double#[Figure]4.94065645841246544​e-324 to [Figure]1.79769313486231570​e308N
java.lang.Double#Y
byte[]1Byte to 2147483647​ByteN
java.lang.String--Y
java.math.BigDecimal--N
java.sql.Date--N
java.sql.Time00:00:00 to 23:59:59N
java.sql.TimeStamp--N
Serializable type--N
Legend:
Y: Can be specified for the primary key
N: Cannot be specified for the primary key
--: Not applicable
#
The floating points might be rounded off.