Package com.altibase.document.api
Enum Class KeyGenerationType
- All Implemented Interfaces:
Serializable,Comparable<KeyGenerationType>,Constable
새로운 문서의 기본 키(primary key) 생성 방식을 정의하는 열거형이다.
컬렉션을 생성할 때, 이 타입을 지정하여 문서의 식별자(_ID)를 API가 자동으로 생성할지, 아니면 클라이언트 애플리케이션이 직접 제공할지를 결정한다. 이 선택은 컬렉션의 스키마에 저장되며 변경할 수 없다.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyGenerationTypefromString(String aText) 대소문자를 구분하지 않고 문자열로부터 KeyGenerationType Enum 상수를 반환한다.static KeyGenerationTypeReturns the enum constant of this class with the specified name.static KeyGenerationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UUID
API가 자동으로 UUID(Universally Unique Identifier)를 생성하여 키로 사용한다.클라이언트는 키 값을 명시할 필요가 없다. 삽입 시 자동으로 고유한 문자열 키가 할당된다.
-
CLIENT
클라이언트 애플리케이션이 직접 키 값을 제공해야 한다.문서를 삽입하기 전에 반드시 고유한 키 값을 설정해야 한다. 키 값이 누락되거나 중복될 경우 예외가 발생한다.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
대소문자를 구분하지 않고 문자열로부터 KeyGenerationType Enum 상수를 반환한다.- Parameters:
aText- 변환할 문자열 (e.g., "uuid", "CLIENT")- Returns:
- 매칭되는 KeyGenerationType 상수
- Throws:
IllegalArgumentException- 매칭되는 상수가 없거나 입력값이 null일 경우
-