You are on page 1of 1

Bean Types Interceptors Relations

T @Stateless(name=””) T @Interceptor(classname=””) MF @ManyToOne(targetEntity=””, CascasdeType[]


T @Statefull(name=””) T @Interceptors(String[] classnames) cascade={},fetch=[LAZY, EAGER], optional=true)
M @Init(String[] init = {}) M @AroundInvoke MF @OneToOne(targetEntity=””, CascasdeType[]
M @Remove(retainIfException=false) cascade={},fetch=[LAZY, EAGER],optional=true,
T @MessageDriven(name=””, Ealier View Client mappedBy=””, usePKasFK=false)
ActivationConfigPropery[]={}) Ts @RemoteHome(String homeinterfacename, MF @OneToMany(targetEntity=””, CascasdeType[]
T @Entity(name=””, access=[PROPERTY,FIELD], String remoteinterfacename) cascade={},fetch=[LAZY, EAGER], mappedBy=””)
entityType=[CMP,BMP], version=3) Ts @LocalHome(String localinterfacename, MF @AssociationTable(table=@Table(specified=false),
T @Remote String localinterfacename) JoinColumn[] joinColumns={},
T @Local inverseJoinColumns()={})
M @BusinessMethod MF @ManyToMany(targetEntity=””, CascasdeType[]
Queries cascade={},fetch=[LAZY, EAGER], mappedBy=””)
TM @FlushMode(value=[COMMIT, AUTO, NEVER])
Transaction and Security PTM @NamedQuery(name=””, queryString, resultType,
T @TransactionManagement( ejbInterfaceType[LOCAL, REMOTE])
value=[CONTAINER,BEAN]) PTM @NamedQuerys(NamedQuery[] value)
Inheritance
TM @TransactionAttribute(value=[MANDATORY, T @Inhertance(strategy=[SINLGE_TABLE,
REQUIRED, REQUIRES_NEW, SUPPORTS, TABLE_PER_CLASS, JOINED],
NOT_SUPPORTED, NEVER])
ResultSetMapping discriminatorType=[STRING, CHAR, INTEGER],
TM @MethodPermissions(String[] roles) TM @SqlResultSetMapping(String name, EntityResult AttributeOverride[] inheritedAttributes={})
TM @SecurityRoles(String[] rolesAllowed={}, [] entities={}, ColumnResult[] columns={}) T @InheritanceJoinColumn(name=””,
rolesReferences={}) @EntityResult(String name, FieldResult[] fields = {}) referencedColumnNames=””, columnDefinition=””)
TM @Unchecked @FieldResult(String name, column) T @InheritanceJoinColumn(
M @Exclude @ColumnResult(String name) InheritanceJoinColumn[] columns)
T @RunAs(String rolaname) T @DiscriminatorColumn(name=””, nullable=false,
P @SecurityRoles(String[] RoleNames={}) Object-Relational-Mapping columnDefinition=””, length=10)
T @Table(name=””, catalog=””, schema=””,
Callbacks UniqueConstraint{}={}, specified=true) Embedded Values
T @CallBackListener(String classname) T @SecondaryTable(name=””, catalog=””, schema=””, T @Embeddable(accessType=[PROPERTY,FIELD])
M @PostConstruct JoinColumn[] join={}, MF @Embedded(AttributeOverride[] override={})
M @PreDestroy UniqueConstraint[] uniqueConstraints={})
T @SecondaryTables(SecondaryTable[] value)
M @PostActivate
@UniqueConstraint(primary=false,
Generators
M @PrePassivate PT @GenerateIdTable(name=””,
Te @EntityListener(String classname) String[] columnNames)
TMF @Column(name=””, primaryKey=false, unique=false, table=@Table(specified=false), pkColumnName=””,
Me @PrePersist valueColumnName=””)
Me @PostPersist nullable=true, insertable=true, updatable=true,
columnDefinition=””, secondaryTable=””, PTMF @SequenceGenerator(String name,
Me @PreRemove sequenceName=””, initialValue=0,
Me @PostRemove length=255, precision=0, scale=0, specified=true)
TMF @JoinColumn(name=””, referencedColumn=””, allocationSize=50)
Me @PreUpdate PTMF @TableGenerator(String name, tableName=””,
Me @PostLoad primaryKey=””, unique=false, nullable=true,
insertable=true, updatable=true, pkColumnValue=””, allocationSize=50)
columnDefinition=””, secondaryTable=””)
Resources TMF @JoinColumns(JoinColumn[]) Legend
TMFP @Resource(name=””, resourceType=””, MF @Id(generate=[NONE, TABLE, SEQUENCE, IDENTITY,
AuthenticationType=[CONTAINER,Application], AUTO), generator=””) PMTF Annotation applies to Package, Method, Type, Field
shareable=true, jndiName=””) MF @EmbeddedId(AttributeOverride[]={})
T @Resources(Resource[] value) Me Annotation applies to Entity Bean Methods
@AttributeOverride(name, Column[]={})
TMFP @EJB(name=””, businessInterface=””, jndiName=””) T @IdClass Ts Annotation applies to Session Bean
T @EJBs{EJB[] value) MF @Transient
VALUE Default Value
MF @Version
TMFP @Home(name=””, homeInterface=””, MF @Lob(fetch=[LAZY, EAGER], type=[BLOB,CLOB])
String businessInterface, beanType= MF @Serialized(fetch=[LAZY, EAGER])
[SESSION, ENTITY], AccessMode=[LOCAL,REMOTE], EJB 3.0 Annotations Cheat Sheet
jndiName=””
MF @Inject(jndiName=””) ©2005 Philipp Meier – www.fnogol.de
Version 1.1 – Based on EJB3.0 edr 2

You might also like