Record Class RepositoryMetadata
java.lang.Object
java.lang.Record
dimstyl.orm.metadata.RepositoryMetadata
- Record Components:
databaseName
- The name of the database.databaseEngine
- TheDatabaseEngine
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 ofSqlOperation
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final DatabaseEngine
The field for thedatabaseEngine
record component.private final String
The field for thedatabaseName
record component.The field for theentityClass
record component.private final Set
<SqlOperation> The field for thesupportedOperations
record component.private final String
The field for thetableName
record component. -
Constructor Summary
ConstructorsConstructorDescriptionRepositoryMetadata
(String databaseName, DatabaseEngine databaseEngine, String tableName, Class<? extends Entity> entityClass, Set<SqlOperation> supportedOperations) Creates an instance of aRepositoryMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatabaseEngine
record component.Returns the value of thedatabaseName
record component.Returns the value of theentityClass
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thesupportedOperations
record component.Returns the value of thetableName
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
databaseName
The field for thedatabaseName
record component. -
databaseEngine
The field for thedatabaseEngine
record component. -
tableName
-
entityClass
The field for theentityClass
record component. -
supportedOperations
The field for thesupportedOperations
record component.
-
-
Constructor Details
-
RepositoryMetadata
public RepositoryMetadata(String databaseName, DatabaseEngine databaseEngine, String tableName, Class<? extends Entity> entityClass, Set<SqlOperation> supportedOperations) Creates an instance of aRepositoryMetadata
record class.- Parameters:
databaseName
- the value for thedatabaseName
record componentdatabaseEngine
- the value for thedatabaseEngine
record componenttableName
- the value for thetableName
record componententityClass
- the value for theentityClass
record componentsupportedOperations
- the value for thesupportedOperations
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object)
. -
databaseName
Returns the value of thedatabaseName
record component.- Returns:
- the value of the
databaseName
record component
-
databaseEngine
Returns the value of thedatabaseEngine
record component.- Returns:
- the value of the
databaseEngine
record component
-
tableName
-
entityClass
Returns the value of theentityClass
record component.- Returns:
- the value of the
entityClass
record component
-
supportedOperations
Returns the value of thesupportedOperations
record component.- Returns:
- the value of the
supportedOperations
record component
-