Package com.altibase.document.api
Enum Class KeyColumnType
- All Implemented Interfaces:
Serializable,Comparable<KeyColumnType>,Constable
컬렉션의 키 컬럼으로 사용될 수 있는 데이터베이스 타입을 정의하는 Enum.
각 타입은 자신에게 매핑되는 Java 클래스, 사이즈 필요 여부, 유효성 검증, DDL 문자열 생성 등 자신과 관련된 모든 로직을 내장하고 있다.
-
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 TypeMethodDescriptionbuildTypeString(Integer aSize) 데이터베이스 DDL에서 사용할 타입 문자열을 생성한다.static KeyColumnTypefromString(String aName) 대소문자를 구분하지 않고 문자열로부터 KeyColumnType Enum 상수를 반환한다.Class<?>이 키 타입에 해당하는 Java 클래스를 반환한다.boolean이 키 타입이 사이즈 지정을 필요로 하는지 여부를 반환한다.abstract voidvalidateForUuidKey(Integer aSize) 이 키 타입이 UUID 키 생성 타입과 함께 사용될 때 유효한지 검증한다.abstract voidvalidateSize(Integer aSize, Logger aLogger) 해당 키 타입에 대해 주어진 size 값이 유효한지 검증한다.static KeyColumnTypeReturns the enum constant of this class with the specified name.static KeyColumnType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VARCHAR
가변 길이 문자열 타입. 사이즈 지정이 필수이다. -
CHAR
고정 길이 문자열 타입. 사이즈 지정이 필수이다. -
INT
정수 타입. 사이즈를 지정할 수 없다. -
SMALLINT
작은 정수 타입. 사이즈를 지정할 수 없다. -
BIGINT
큰 정수 타입. 사이즈를 지정할 수 없다.
-
-
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
-
isRequiresSize
public boolean isRequiresSize()이 키 타입이 사이즈 지정을 필요로 하는지 여부를 반환한다.- Returns:
- 사이즈가 필요하면 true
-
getJavaType
이 키 타입에 해당하는 Java 클래스를 반환한다.- Returns:
- 매핑되는 Java Class 객체 (예: Integer.class)
-
buildTypeString
데이터베이스 DDL에서 사용할 타입 문자열을 생성한다.- Parameters:
aSize- 타입의 크기 (필요한 경우 사용됨)- Returns:
- 최종 타입 문자열 (예: "VARCHAR(40)", "INT")
-
validateSize
해당 키 타입에 대해 주어진 size 값이 유효한지 검증한다.- Parameters:
aSize- 검증할 크기 값aLogger- 경고 로그를 남기기 위한 Logger 객체- Throws:
AltibaseSchemaException- 유효성 검증 실패 시
-
validateForUuidKey
이 키 타입이 UUID 키 생성 타입과 함께 사용될 때 유효한지 검증한다.- Parameters:
aSize- 키 타입의 크기- Throws:
AltibaseSchemaException- 유효하지 않을 경우
-
fromString
대소문자를 구분하지 않고 문자열로부터 KeyColumnType Enum 상수를 반환한다. 이 메서드는 enum의 기본 이름과 정의된 별칭(alias)을 모두 확인한다.- Parameters:
aName- 변환할 타입 이름 (e.g., "INT", "INTEGER")- Returns:
- 매칭되는 KeyGenerationType 상수
- Throws:
IllegalArgumentException- 매칭되는 상수가 없거나 입력값이 null일 경우
-