Professional Documents
Culture Documents
Java Ee 6 Reference Sheet
Java Ee 6 Reference Sheet
CDI: javax.enterprise.inject
TMF
@New(value=className)
TMF
@Alternative
TMF
@Any
MF
@Produces
CDI: javax.enterprise.context
@AroundTimeout
@Stateful(name=className)
TM
@ExcludeDefaultInterceptors
@Singleton(name=className)
@ExcludeClassInterceptors
@MessageDriven(name=,
activationConfig=ActivationConfigProperty[])
@ActivationConfigProperty(propertyName=,
propertyValue=)
@RunAs(String rolename)
@Local(value=Class[])
@DeclareRoles(value=String[])
@Remote(value=Class[])
TM
@RolesAllowed(value=String[])
@LocalBean
TM
@PermitAll
TM
@DenyAll
TM
@Asynchronous
TM
@Lock(value=[WRITE,READ])
@ConcurrencyManagement(value=[CONTAINER,
BEAN])
@DependsOn(value=String[])
@Startup
TMF
@ApplicationScoped
TMF
@ConversationScoped
TMF
@RequestScoped
TM
@AccessTimeout(value=0,unit=MILLISECONDS)
TMF
@SessionScoped
@StatefulTimeout(value=0,unit=MILLISECONDS)
TMF
@Dependent
@Timeout
@Schedules(Schedule[])
@TransactionManagement(
value=[CONTAINER, BEAN])
TM
@TransactionAttribute(value=[MANDATORY,
REQUIRED, REQUIRES_NEW, SUPPORTS,
NOT_SUPPORTED, NEVER])
@ManagedBean(name=, eager=false)
@ManagedProperty(name=, value=)
@ApplicationScoped
@CustomScoped(value=)
@NoneScoped
@ReferencedBean(name=)
@RequestScoped
@SessionScoped
@ViewScoped
@EJB(name=, beanInterface=Object.class,
mappedName=, lookup=| beanName=,
description=)
@EJBs(EJB[])
@AroundInvoke
@Stateless(name=className)
@Inject
@Named(value=)
@Interceptors(Class[])
CDI: javax.inject
CMF
TM
Timeouts: javax.ejb
Transaction: javax.ejb
@AfterBegin
@AfterCompletion
@BeforeCompletion
@PostConstruct
@PreDestroy
@PostActivate
@PrePassivate
@ManagedBean(value=)
TMF
@Resource(name=, type=Object.class,
AuthenticationType=[CONTAINER,Application],
shareable=true, lookup=, mappedName=)
@Remove(retainIfException=false)
@Resources(Resource[])
@Interceptor
Interceptors: javax.interceptor
Security: javax.annotation.security
Legend
TCMF Annotation applies to Type, Constructor, Method, Field
VALUE Default Value
@PersistenceContext(name=, unitName=,type=
[TRANSACTION,EXTENDED],
properties=PersistenceProperty[])
@PersistenceContexts(PersistenceContext[])
TMF
@PersistenceUnit(name=, unitName=)
@PersistenceUnits(PersistenceUnit[])
@PersistenceProperty(name=, value=)
@Lob
MF
@Version
@Embeddable
MF
@EmbeddedId
MF
@Embedded
MF
@MapsId(value=)
MF
@OneToOne(targetEntity=void.class,
cascade={ALL,DETACH,MERGE,PERSIST,REFRESH,
REMOVE}, fetch=[LAZY, EAGER], optional=true,
mappedBy=, orphanRemoval=false)
MF
@OneToMany(targetEntity=void.class ,
cascade={...}, fetch=[...], mappedBy=,
orphanRemoval=false)
@Cacheable(value=true)
@Entity(name=)
MF
@MappedSuperclass
MF
@GeneratedValue(generator=,
strategy=[AUTO,IDENTITY,SEQUENCE,TABLE])
TMF
@SequenceGenerator(name=, schema=,
catalog=, sequenceName=, initialValue=0,
allocationSize=50)
TMF
MF
@MapKey(value=)
MF
@MapKeyClass(value=Class)
MF
MF
@MapKeyEnumerated(value=[ORDINAL,STRING])
MF
@MapKeyJoinColumn(name=, table=,
referencedColumnName=, unique=false,
nullable=true, insertable=true, updatable=true,
columnDefinition=)
MF
@MapKeyJoinColumns(MapKeyJoinColumn[])
MF
@MapKeyTemporal([DATE,TIME,TIMESTAMP])
Generators: javax.persistence
Relations: javax.persistence
MF
@ManyToOne(targetEntity=void.class,
cascade={...}, fetch=[...], optional=true)
@UniqueConstraint(columnNames=String[],
name=)
MF
@ManyToMany(targetEntity=void.class,
cascade={...}, fetch=[...], mappedBy=)
@IdClass(Class)
MF
@OrderBy(value=)
TMF
@Access(value=[FIELD,PROPERTY])
MF
TMF
@PrimaryKeyJoinColumn(name=,
columnDefinition=, referencedColumnName=)
@OrderColumn(name=, columnDefinition=,
insertable=true, updateable=true, nullable=true)
TMF
@PrimaryKeyJoinColumns(PrimaryKeyJoinColumn[])
@SecondaryTables(SecondaryTable[])
Queries: javax.persistence
MapKey: javax.persistence
TMF
@AttributeOverride(name=String, column=Column)
@NamedQuery(name=String, query=String)
TMF
@AssociationOverride(name=String,
joinTable=JoinTable, JoinColumns=JoinColumn[])
@NamedQueries(NamedQuery[])
@NamedNativeQuery(name=String, query=String,
resultClass=void.class)
@PostLoad
@NamedNativeQueries(NamedQuery[])
@PrePersist
@QueryHint(name=, value=)
@PostPersist
@PreRemove
@PostRemove
@PreUpdate
@PostUpdate
@EntityListeners(Class[])
@ExcludeDefaultListeners
@ExcludeSuperclassListeners
MF
MF
@SqlResultSetMapping(name=String,
entities=EntityResult[], columns=ColumnResult[])
MF
@JoinColumns(JoinColumn[])
MF
@EntityResult(entityResult=Class,
disriminatorColumn=, fields=FieldResult[])
@ColumnResult(name=)
MF
MF
@ElementCollection(targetClass=void.class,
fetch=[LAZY,EAGER])
MF
@Id
MF
MF
@Enumerated(EnumType)
MF
MF
@Transient
@SqlResultSetMappings(SqlResultSetMapping[])
@FieldResult(name=, column=)
Listeners: javax.persistence
Inheritance: javax.persistence
T
T
See also:
@Inheritance(strategy=[SINGLE_TABLE,
TABLE_PER_CLASS, JOINED])
JSF
http://horstmann.com/corejsf/refcard.html
@DiscriminatorColumn(name=DTYPE,
discriminatorType=[STRING,CHAR,INTEGER],
columnDefinition=, length=31)
JPA
http://www.oracle.com/technetwork/middleware/ias/top
link-jpa-annotations-096251.html
CDI
http://www.theserverside.com/news/1373391/Depende
ncy-Injection-in-Java-EE-6-Part-1
@DiscriminatorValue(value=)