org.jooq.conf.MigrationSchema Maven / Gradle / Ivy
package org.jooq.conf;
import java.io.Serializable;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jooq.util.jaxb.tools.XMLAppendable;
import org.jooq.util.jaxb.tools.XMLBuilder;
/**
* A migration schema configuration.
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MigrationSchema", propOrder = {
})
@SuppressWarnings({
"all"
})
public class MigrationSchema
extends SettingsBase
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31900L;
protected String catalog;
@XmlElement(required = true)
protected String schema;
/**
* The catalog qualifier of the schema, if applicable.
*
*/
public String getCatalog() {
return catalog;
}
/**
* The catalog qualifier of the schema, if applicable.
*
*/
public void setCatalog(String value) {
this.catalog = value;
}
/**
* The schema qualifier whose elements can be found from the search path.
*
*/
public String getSchema() {
return schema;
}
/**
* The schema qualifier whose elements can be found from the search path.
*
*/
public void setSchema(String value) {
this.schema = value;
}
/**
* The catalog qualifier of the schema, if applicable.
*
*/
public MigrationSchema withCatalog(String value) {
setCatalog(value);
return this;
}
/**
* The schema qualifier whose elements can be found from the search path.
*
*/
public MigrationSchema withSchema(String value) {
setSchema(value);
return this;
}
@Override
public final void appendTo(XMLBuilder builder) {
builder.append("catalog", catalog);
builder.append("schema", schema);
}
@Override
public String toString() {
XMLBuilder builder = XMLBuilder.nonFormatting();
appendTo(builder);
return builder.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass()!= that.getClass()) {
return false;
}
MigrationSchema other = ((MigrationSchema) that);
if (catalog == null) {
if (other.catalog!= null) {
return false;
}
} else {
if (!catalog.equals(other.catalog)) {
return false;
}
}
if (schema == null) {
if (other.schema!= null) {
return false;
}
} else {
if (!schema.equals(other.schema)) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = ((prime*result)+((catalog == null)? 0 :catalog.hashCode()));
result = ((prime*result)+((schema == null)? 0 :schema.hashCode()));
return result;
}
}