Record Class RepositoryMetadata

java.lang.Object
java.lang.Record
dimstyl.orm.metadata.RepositoryMetadata
Record Components:
databaseName - The name of the database.
databaseEngine - The DatabaseEngine used (e.g., H2, SQLite, Derby).
tableName - The name of the table associated with this repository.
entityClass - The entity class linked to this repository.
supportedOperations - The set of SqlOperation supported by this repository.
All Implemented Interfaces:
Metadata

public record RepositoryMetadata(String databaseName, DatabaseEngine databaseEngine, String tableName, Class<? extends Entity> entityClass, Set<SqlOperation> supportedOperations) extends Record implements Metadata
Represents metadata for a repository, including database details, table name, associated entity class, and supported SQL operations.

This record provides metadata for a repository, containing information about the database name, database engine, table name, entity class, and the set of supported SQL operations.

  • Field Details

  • Constructor Details

    • RepositoryMetadata

      public RepositoryMetadata(String databaseName, DatabaseEngine databaseEngine, String tableName, Class<? extends Entity> entityClass, Set<SqlOperation> supportedOperations)
      Creates an instance of a RepositoryMetadata record class.
      Parameters:
      databaseName - the value for the databaseName record component
      databaseEngine - the value for the databaseEngine record component
      tableName - the value for the tableName record component
      entityClass - the value for the entityClass record component
      supportedOperations - the value for the supportedOperations 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.
    • 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
    • tableName

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

      public Class<? extends Entity> entityClass()
      Returns the value of the entityClass record component.
      Returns:
      the value of the entityClass record component
    • supportedOperations

      public Set<SqlOperation> supportedOperations()
      Returns the value of the supportedOperations record component.
      Returns:
      the value of the supportedOperations record component