Appian Annotations - 2

JPA Annotations :-

JPA annotations are used in mapping java objects to the database tables, columns etc. Today we will look into Appian supported JPA annotations.

When used with Data Stores, a custom data type (CDT) can be used to map data to a relational database. Your custom data types can use JPA annotations in the XSD (XML Schema Definition) to map types and their fields to tables and columns within a database.

Many of the supported JPA annotations are automatically added for you when creating a custom data type (CDT) from a database table or when defining CDT relationships in the data type designer. Should you need to add additional JPA (Java Persistence API) annotations to your XSD (XML Schema Definition), this section contains the list of all Appian supported annotations.

The following annotations are supported: 


16) @JoinTable

The @JoinTable annotation is used to specify the link table between two other database tables.


17) @Lob

The @Lob annotation is used to specify that the currently annotated entity attribute represents a large object type.


18) @MappedSuperclass

The @MappedSuperclass annotation is used to specify that the currently annotated type attributes are inherited by any subclass entity.


19) @OrderBy

The @OrderBy annotation is used to specify the entity attributes used for sorting when fetching the currently annotated collection.


20) @PrimaryKeyJoinColumn

The @PrimaryKeyJoinColumn annotation is used to specify that the primary key column of the currently annotated entity is also a foreign key to some other entity (e.g. a base class table in a JOINED inheritance strategy, the primary table in a secondary table mapping, or the parent table in a @OneToOne relationship).


21) @PrimaryKeyJoinColumns

The @PrimaryKeyJoinColumns annotation is used to group multiple @PrimaryKeyJoinColumn annotations.


22) @SecondaryTable

The @SecondaryTable annotation is used to specify a secondary table for the currently annotated entity.


23) @SecondaryTables

The @SecondaryTables annotation is used to group multiple @SecondaryTable annotations.


24) @SequenceGenerator

The @SequenceGenerator annotation is used to specify the database sequence used by the identifier generator of the currently annotated entity.


25) @Table

The @Table annotation is used to specify the primary table of the currently annotated entity.


26) @TableGenerator

The @TableGenerator annotation is used to specify the database table used by the identity generator of the currently annotated entity.


27) @Temporal

The @Temporal annotation is used to specify the TemporalType of the currently annotated java.util.Date or java.util.Calendar entity attribute.


28) @Transient

The @Transient annotation is used to specify that a given entity attribute should not be persisted.


29) @UniqueConstraint

The @UniqueConstraint annotation is used to specify a unique constraint to be included by the automated schema generator for the primary or secondary table associated with the currently annotated entity.


30) @Version

The @Version annotation is used to specify the version attribute used for optimistic locking.


31) @ManyToMany

The @ManyToMany annotation is used to specify a many-to-many database relationship.


32) @ManyToOne

The @ManyToOne annotation is used to specify a many-to-one database relationship. (with additional value of NONE for cascade attribute; default value of cascade is MERGE, PERSIST, REFRESH)


33) @OneToMany

The @OneToMany annotation is used to specify a one-to-many database relationship.(default value of cascade is ALL, which includes deleting orphans)


34) @OneToOne

The @OneToOne annotation is used to specify a one-to-one database relationship.


Appian Annotations - 1 :-   Click Here

Source : shorturl.at/fjlmY

Source : https://docs.appian.com/suite/help/22.2/Supported_XSD_Elements_and_JPA_Annotations.html



No comments:

Post a Comment

MOST VIEWED