Record Class DatabaseMetadata

java.lang.Object
java.lang.Record
dimstyl.orm.metadata.DatabaseMetadata
Record Components:
databaseName - The name of the database.
databaseEngine - The database engine used (e.g., H2, SQLite, Derby).
sqlOperation - The SQL operation associated with this metadata.
tableMetadataList - The list of table metadata objects.
All Implemented Interfaces:
Metadata

public record DatabaseMetadata(String databaseName, DatabaseEngine databaseEngine, SqlOperation sqlOperation, List<TableMetadata> tableMetadataList) extends Record implements Metadata
Represents metadata for a database, including its name, engine, SQL operations, and tables.

This record is used to store metadata about a database, including its name, database engine, supported SQL operations, and the list of tables it contains.

  • Field Details

  • Constructor Details

  • Method Details

    • addTableMetadata

      public void addTableMetadata(TableMetadata tableMetadata)
      Adds a new table metadata to the database.
      Parameters:
      tableMetadata - The TableMetadata to add.
      Throws:
      NullPointerException - if tableMetadata is null.
    • 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.
    • databaseName

      public String databaseName()
      Returns the value of the databaseName record component.
      Returns:
      the value of the databaseName record component
    • databaseEngine

      public DatabaseEngine databaseEngine()
      Returns the value of the databaseEngine record component.
      Returns:
      the value of the databaseEngine record component
    • sqlOperation

      public SqlOperation sqlOperation()
      Returns the value of the sqlOperation record component.
      Returns:
      the value of the sqlOperation record component
    • tableMetadataList

      public List<TableMetadata> tableMetadataList()
      Returns the value of the tableMetadataList record component.
      Returns:
      the value of the tableMetadataList record component