CodesJava

Easy learning with example program codes

JPA NamedNativeQuery and NamedNativeQueries annotations

The @NamedNativeQuery and @NamedNativeQueries annotations are used to define one or more SQL queries. These queries will be associated with that particular entity. @NamedNativeQuery Example: @Entity @NamedNativeQuery… Read More
Posted in JPA   

JPA NamedQuery and NamedQueries annotations

The @NamedQuery and @NamedQueries annotations are used to define one or more JPQL queries. These queries will be associated with that particular entity. @NamedQuery Example: @Entity @NamedQuery(name="Student.selectAllStudents",… Read More
Posted in JPA   

JPA ManyToMany annotation

The @ManyToMany annotation is used to implement Many-to-Many relationship. Two entities are said to be in Many-to-Many relationship if many occurrence of entity belongs to many occurrence… Read More
Posted in JPA   

JPA ManyToOne annotation

The @ManyToOne annotation is used to implement Many-to-One relationship. Two entities are said to be in Many-to-One relationship if one entity belongs to many occurrence of other… Read More
Posted in JPA   

JPA OneToMany annotation

The @OneToMany annotation is used to implement One-to-Many relationship. Two entities are said to be in One-to-Many relationship if one entity has many occurrence in other entity.… Read More
Posted in JPA   

JPA OneToOne annotation

The @OneToOne annotation is used to implement One-to-One relationship. Two entities are said to be in One-to-One relationship if one entity has only one occurrence in other… Read More
Posted in JPA   

JPA Temporal annotation

The @Temporal annotation is specified for Date and Calendar type persistent. It can have one of following three values DATE, TIME, and TIMESTAMP. Default is TIMESTAMP. Example:… Read More
Posted in JPA   

JPA Transient annotation

It is used to annotate a property or field of an entity class, mapped superclass, or embeddable class which is not persistent. Example: @Entity public class Employee… Read More
Posted in JPA   

JPA column annotation

The Column annotation is used to specify the mapped column for a persistent property or field. If no Column annotation is specified, the default value will be… Read More
Posted in JPA   

JPA Table annotation

The Table annotation is used to specify the primary table for the annotated entity. Additional tables may be specified using SecondaryTable or SecondaryTables annotation. Example: @Entity @Table(name="Student")… Read More
Posted in JPA   


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap