Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

enum type spring boot entity

Solution in simple: 
1- create new class with the required name, then put all the enums
public enum ResourceType {
    FINANCIAL,RAW,FACTORY,LAB
}

2-Next, in the entity :
@Enumerated(EnumType.STRING)
@Column(name="resourceType")
private ResourceType type;

Comment

PREVIOUS NEXT
Code Example
Java :: gradle reflections 
Java :: java remainder sign 
Java :: change button text onclick javca 
Java :: convert array to list java 
Java :: spring h2 database example 
Java :: java print variable type 
Java :: java file system append new line 
Java :: getting the last value of an integer in java 
Java :: random java 
Java :: onclick listener android 
Java :: slice a list java 
Java :: java return list 
Java :: java array to string 
Java :: empty array java 
Java :: string to bigdecimal 
Java :: regex pattern for date validation 
Java :: how to send a byte array in socket java 
Java :: java.lang.IllegalArgumentException: Invalid character found in method name 
Java :: convert array of int to arraylist java 
Java :: Who made java ? 
Java :: java regex 10 digit number 
Java :: java create map 
Java :: string.join java 8 
Java :: java remove space at the end of string 
Java :: java create new arraylist with elements 
Java :: queue implementation in java using arraylist 
Java :: android toolbar menu align center 
Java :: create java gui intellij 
Java :: long vs int java 
Java :: java convert date to localdate 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =