Abstract ElementType

What does the following ElementType annotation mean?

@Entity
@Table(table="application")
@ElementType(type=1L) 
class application extends Element
+3
source share
4 answers

Please check: ElementType . Listing and all fields are listed here. You should not rely on numeric values ​​in your code.

+2
source

This is a type literal longand a value of 1. What this means depends on the definition of the annotation, but most likely there are constants defined in the annotation class ElementTypethat you should use instead of long literals.

0
source

, , . ElementType - JDK, , . , . , , , , , , . .

0

- , , Java Persistence. JPA Hibernate ElementType, , .

The full name for ElementType will provide a few more clues, but this is most likely a custom annotation; the definition of which is in your code base.

0
source

Source: https://habr.com/ru/post/1706391/


All Articles