Basic.javaAPI DocGlassfish v2 API4102Fri May 04 22:34:06 BST 2007javax.persistence


public class Basic
The Basic annotation is the simplest type of mapping to a database column. The Basic annotation can be applied to a persistent property or instance variable of any of the following types: Java primitive types, wrappers of the primitive types, {@link String}, {@link java.math.BigInteger java.math.BigInteger}, {@link java.math.BigDecimal java.math.BigDecimal}, {@link java.util.Date java.util.Date}, {@link java.util.Calendar java.util.Calendar}, {@link java.sql.Date java.sql.Date}, {@link java.sql.Time java.sql.Time}, {@link java.sql.Timestamp java.sql.Timestamp}, byte[], Byte[], char[], Character[], enums, and any other type that implements {@link Serializable}.

The use of the Basic annotation is optional for persistent fields and properties of these types.

Java Persistence 1.0

Fields Summary
Constructors Summary
Methods Summary
(Optional) Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. If not specified, defaults to EAGER.

(Optional) Defines whether the value of the field or property may be null. This is a hint and is disregarded for primitive types; it may be used in schema generation. If not specified, defaults to true.