com.distelli.persistence.TableDescription Maven / Gradle / Ivy
// Generated by delombok at Mon Apr 01 13:15:17 PDT 2019
package com.distelli.persistence;
import java.util.Collection;
import java.util.function.Consumer;
public class TableDescription {
private String tableName;
private Collection indexes;
private TableStatus tableStatus;
public static class TableDescriptionBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private String tableName;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private Collection indexes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private TableStatus tableStatus;
public TableDescriptionBuilder index(Consumer fn) {
IndexDescription.IndexDescriptionBuilder indexBuilder = IndexDescription.builder().indexType(IndexType.MAIN_INDEX);
fn.accept(indexBuilder);
return index(indexBuilder.build());
}
public TableDescriptionBuilder index(final IndexDescription index) {
if (this.indexes == null) this.indexes = new java.util.ArrayList();
this.indexes.add(index);
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
TableDescriptionBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableDescriptionBuilder tableName(final String tableName) {
this.tableName = tableName;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableDescriptionBuilder indexes(final Collection indexes) {
this.indexes = indexes;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableDescriptionBuilder tableStatus(final TableStatus tableStatus) {
this.tableStatus = tableStatus;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableDescription build() {
return new TableDescription(tableName, indexes, tableStatus);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "TableDescription.TableDescriptionBuilder(tableName=" + this.tableName + ", indexes=" + this.indexes + ", tableStatus=" + this.tableStatus + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
TableDescription(final String tableName, final Collection indexes, final TableStatus tableStatus) {
this.tableName = tableName;
this.indexes = indexes;
this.tableStatus = tableStatus;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public static TableDescriptionBuilder builder() {
return new TableDescriptionBuilder();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableDescriptionBuilder toBuilder() {
return new TableDescriptionBuilder().tableName(this.tableName).indexes(this.indexes).tableStatus(this.tableStatus);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getTableName() {
return this.tableName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Collection getIndexes() {
return this.indexes;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TableStatus getTableStatus() {
return this.tableStatus;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public void setTableName(final String tableName) {
this.tableName = tableName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public void setIndexes(final Collection indexes) {
this.indexes = indexes;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public void setTableStatus(final TableStatus tableStatus) {
this.tableStatus = tableStatus;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof TableDescription)) return false;
final TableDescription other = (TableDescription) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$tableName = this.getTableName();
final java.lang.Object other$tableName = other.getTableName();
if (this$tableName == null ? other$tableName != null : !this$tableName.equals(other$tableName)) return false;
final java.lang.Object this$indexes = this.getIndexes();
final java.lang.Object other$indexes = other.getIndexes();
if (this$indexes == null ? other$indexes != null : !this$indexes.equals(other$indexes)) return false;
final java.lang.Object this$tableStatus = this.getTableStatus();
final java.lang.Object other$tableStatus = other.getTableStatus();
if (this$tableStatus == null ? other$tableStatus != null : !this$tableStatus.equals(other$tableStatus)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof TableDescription;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $tableName = this.getTableName();
result = result * PRIME + ($tableName == null ? 43 : $tableName.hashCode());
final java.lang.Object $indexes = this.getIndexes();
result = result * PRIME + ($indexes == null ? 43 : $indexes.hashCode());
final java.lang.Object $tableStatus = this.getTableStatus();
result = result * PRIME + ($tableStatus == null ? 43 : $tableStatus.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "TableDescription(tableName=" + this.getTableName() + ", indexes=" + this.getIndexes() + ", tableStatus=" + this.getTableStatus() + ")";
}
}