Record Class CollectionMetaData

java.lang.Object
java.lang.Record
com.altibase.document.api.CollectionMetaData
Record Components:
collectionName - 컬렉션의 논리적 이름
tableName - 실제 생성/매핑될 테이블의 물리적 이름 (생략 시 collectionName과 동일)
keyColumnName - 키로 사용되는 실제 데이터베이스 컬럼의 이름
keyTypeName - 데이터베이스에 정의된 키 컬럼의 타입 이름 (예: "VARCHAR", "BIGINT")
keyType - 키 컬럼 타입에 매핑되는 자바 Class 객체 (예: String.class)
jsonColumnType - JSON 문서가 저장되는 컬럼의 타입
keyGenerationType - 키 생성 방식 (UUID 또는 CLIENT)

public record CollectionMetaData(String collectionName, String tableName, String keyColumnName, String keyTypeName, Class<?> keyType, JsonColumnType jsonColumnType, KeyGenerationType keyGenerationType) extends Record
Altibase JSON 컬렉션의 핵심 메타데이터를 캡슐화하는 불변(Immutable) 레코드이다.

이 레코드의 인스턴스는 컬렉션이 생성되거나 조회될 때 데이터베이스로부터 읽어온 스키마 정보를 담는다. 내부적으로 SQL 쿼리를 생성하거나 키 타입을 검증하는 등 컬렉션의 동작 방식을 결정하는 데 사용된다. 주로 프레임워크 내부에서 사용되는 데이터 전송 객체(DTO)이다.

Since:
1.0
  • Constructor Details

    • CollectionMetaData

      public CollectionMetaData(String collectionName, String tableName, String keyColumnName, String keyTypeName, Class<?> keyType, JsonColumnType jsonColumnType, KeyGenerationType keyGenerationType)
      Creates an instance of a CollectionMetaData record class.
      Parameters:
      collectionName - the value for the collectionName record component
      tableName - the value for the tableName record component
      keyColumnName - the value for the keyColumnName record component
      keyTypeName - the value for the keyTypeName record component
      keyType - the value for the keyType record component
      jsonColumnType - the value for the jsonColumnType record component
      keyGenerationType - the value for the keyGenerationType record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • collectionName

      public String collectionName()
      Returns the value of the collectionName record component.
      Returns:
      the value of the collectionName record component
    • tableName

      public String tableName()
      Returns the value of the tableName record component.
      Returns:
      the value of the tableName record component
    • keyColumnName

      public String keyColumnName()
      Returns the value of the keyColumnName record component.
      Returns:
      the value of the keyColumnName record component
    • keyTypeName

      public String keyTypeName()
      Returns the value of the keyTypeName record component.
      Returns:
      the value of the keyTypeName record component
    • keyType

      public Class<?> keyType()
      Returns the value of the keyType record component.
      Returns:
      the value of the keyType record component
    • jsonColumnType

      public JsonColumnType jsonColumnType()
      Returns the value of the jsonColumnType record component.
      Returns:
      the value of the jsonColumnType record component
    • keyGenerationType

      public KeyGenerationType keyGenerationType()
      Returns the value of the keyGenerationType record component.
      Returns:
      the value of the keyGenerationType record component