Record Class ObjectOverride
java.lang.Object
java.lang.Record
org.pgcodekeeper.core.database.api.schema.ObjectOverride
- Record Components:
newStatement- the new statement that overrides the old oneoldStatement- the original statement being overridden
Represents an override of a database statement when loading from multiple sources.
Contains both the original statement and the new statement that overrides it,
along with location information for tracking where each version came from.
-
Constructor Summary
ConstructorsConstructorDescriptionObjectOverride(IStatement newStatement, IStatement oldStatement) Creates an instance of aObjectOverriderecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getName()Gets the name of the overridden statement.Gets the location information for the new statement.Gets the file path where the new statement is defined.Gets the location information for the old statement.Gets the file path where the old statement is defined.getType()Gets the type of the overridden statement.final inthashCode()Returns a hash code value for this object.Returns the value of thenewStatementrecord component.Returns the value of theoldStatementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ObjectOverride
Creates an instance of aObjectOverriderecord class.- Parameters:
newStatement- the value for thenewStatementrecord componentoldStatement- the value for theoldStatementrecord component
-
-
Method Details
-
getName
Gets the name of the overridden statement.- Returns:
- the statement name
-
getType
Gets the type of the overridden statement.- Returns:
- the statement type
-
getNewPath
Gets the file path where the new statement is defined.- Returns:
- the file path of the new statement
-
getOldPath
Gets the file path where the old statement is defined.- Returns:
- the file path of the old statement
-
getNewLocation
Gets the location information for the new statement.- Returns:
- location of the new statement
-
getOldLocation
Gets the location information for the old statement.- Returns:
- location of the old statement
-
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. -
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. -
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). -
newStatement
Returns the value of thenewStatementrecord component.- Returns:
- the value of the
newStatementrecord component
-
oldStatement
Returns the value of theoldStatementrecord component.- Returns:
- the value of the
oldStatementrecord component
-