Package org.pgcodekeeper.core.library
Record Class Library
java.lang.Object
java.lang.Record
org.pgcodekeeper.core.library.Library
- Record Components:
name- the name of the librarypath- the file system path to the libraryisIgnorePrivileges- whether to ignore privileges for this libraryowner- the owner of the library
public record Library(String name, String path, boolean isIgnorePrivileges, String owner)
extends Record
Represents a database library with its metadata and properties.
This class encapsulates information about a library including its name,
file system path, privilege ignore flag, and owner information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this library with another object for equality.getTitle()Gets the display title for the library.inthashCode()Computes the hash code based on the library title.booleanReturns the value of theisIgnorePrivilegesrecord component.name()Returns the value of thenamerecord component.owner()Returns the value of theownerrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Library
Creates an instance of aLibraryrecord class.- Parameters:
name- the value for thenamerecord componentpath- the value for thepathrecord componentisIgnorePrivileges- the value for theisIgnorePrivilegesrecord componentowner- the value for theownerrecord component
-
-
Method Details
-
getTitle
Gets the display title for the library. Returns the library name if not blank, otherwise returns the path.- Returns:
- the display title
-
hashCode
public int hashCode()Computes the hash code based on the library title. -
equals
Compares this library with another object for equality. Two libraries are considered equal if their titles match. -
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
isIgnorePrivileges
public boolean isIgnorePrivileges()Returns the value of theisIgnorePrivilegesrecord component.- Returns:
- the value of the
isIgnorePrivilegesrecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-