All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.objectos.way.sql.CharColumnInfoPojo Maven / Gradle / Ivy

package br.com.objectos.way.sql;

import br.com.objectos.way.core.testing.Testables;
import com.google.common.base.Optional;

@javax.annotation.Generated("br.com.objectos.way.auto.pojo.AutoPojoProcessor")
final class CharColumnInfoPojo extends CharColumnInfo  {

  private final TableName tableName;
  private final String name;
  private final CharDataType dataType;
  private final int length;
  private final boolean nullable;
  private final Optional defaultValue;

  public CharColumnInfoPojo(CharColumnInfoBuilderPojo builder) {
    super();
    tableName = builder.tableName();
    name = builder.name();
    dataType = builder.dataType();
    length = builder.length();
    nullable = builder.nullable();
    defaultValue = builder.defaultValue();
  }

  @Override
  public boolean isEqual(ColumnInfo o) {
    if (!CharColumnInfoPojo.class.isInstance(o)) {
      return false;
    }    
    CharColumnInfoPojo that = CharColumnInfoPojo.class.cast(o);
    return Testables.isEqualHelper()
        .equal(this.tableName, that.tableName)
        .equal(this.name, that.name)
        .equal(this.dataType, that.dataType)
        .equal(this.length, that.length)
        .equal(this.nullable, that.nullable)
        .equal(this.defaultValue, that.defaultValue)
        .result();
  }
  
  @Override
  TableName tableName() {
    return tableName;
  }
  
  @Override
  String name() {
    return name;
  }
  
  @Override
  CharDataType dataType() {
    return dataType;
  }
  
  @Override
  int length() {
    return length;
  }
  
  @Override
  boolean nullable() {
    return nullable;
  }
  
  @Override
  Optional defaultValue() {
    return defaultValue;
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy