Java Annotations

10
Java Annotations • Were introduced in Java SE 5 (Sep, 2004) • Annotations are used to tell the compiler to take additional actions • The @ sign is used to indicate the presence of an annotated class, field or method (@IgnoreWarnings, @Path, etc..)

description

Java Annotations. Were introduced in Java SE 5 (Sep, 2004) Annotations are used to tell the compiler to take additional actions The @ sign is used to indicate the presence of an annotated class, field or method (@ IgnoreWarnings , @Path, etc..). Java Persistence Architecture (JPA). - PowerPoint PPT Presentation

Transcript of Java Annotations

Page 1: Java Annotations

Java Annotations

• Were introduced in Java SE 5 (Sep, 2004)• Annotations are used to tell the compiler to

take additional actions• The @ sign is used to indicate the presence of

an annotated class, field or method (@IgnoreWarnings, @Path, etc..)

Page 2: Java Annotations

Java Persistence Architecture (JPA)

• JPA is a Java API specification that allows developers to describe low level database designs and behaviors using annotations in the Java code.

• Object Relational Mapping (ORM) is the concrete vendor specific implementation of JPA (i.e. – Hibernate, TopLink, etc.)

Page 3: Java Annotations

Java API for RESTful Web Services(JAX-RS)

• JAX-RS is the part of the Java EE standard that facilitates RESTful web services.

• RESTful behavior can be realized purely through the addition of JAX-RS Annotations

Page 4: Java Annotations

Java Architecture for XML Binding(JAXB)

• JAXB facilitates the use of annotations to describe the XML or JSON structure of an object architecture

Page 5: Java Annotations

JPA Annotations

• @Entity• @Table• @Column• @OneToMany• @ManyToOne• @JoinColumn• @Embeddable• @Embedded

• @Id• @NamedQueries• @NamedQuery• @SequenceGenerator• @GeneratedValue• @Enumerated• EnumType• @PersistenceContext• TypedQuery

Page 9: Java Annotations

The project

• https://git.psu.edu/ais-swe/web-conference

Page 10: Java Annotations

Running the VM

• Navigate to the directory you want the web-conference project installed

• git clone https://git.psu.edu/ais-swe/web-conference.git

• cd web-conference/ • git submodule init • git submodule update • cd web-conference-vagrant/ • vagrant up