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

hydra.ext.org.ansi.sql.syntax.ColumnDefinition Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
// Note: this is an automatically generated file. Do not edit.

package hydra.ext.org.ansi.sql.syntax;

import java.io.Serializable;

public class ColumnDefinition implements Serializable {
  public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/ansi/sql/syntax.ColumnDefinition");
  
  public static final hydra.core.Name FIELD_NAME_NAME = new hydra.core.Name("name");
  
  public static final hydra.core.Name FIELD_NAME_TYPE_OR_DOMAIN = new hydra.core.Name("typeOrDomain");
  
  public static final hydra.core.Name FIELD_NAME_REF_SCOPE = new hydra.core.Name("refScope");
  
  public static final hydra.core.Name FIELD_NAME_DEFAULT_OR_IDENTITY_OR_GENERATION = new hydra.core.Name("defaultOrIdentityOrGeneration");
  
  public static final hydra.core.Name FIELD_NAME_CONSTRAINTS = new hydra.core.Name("constraints");
  
  public static final hydra.core.Name FIELD_NAME_COLLATE = new hydra.core.Name("collate");
  
  public final hydra.ext.org.ansi.sql.syntax.ColumnName name;
  
  public final hydra.util.Opt typeOrDomain;
  
  public final hydra.util.Opt refScope;
  
  public final hydra.util.Opt defaultOrIdentityOrGeneration;
  
  public final java.util.List constraints;
  
  public final hydra.util.Opt collate;
  
  public ColumnDefinition (hydra.ext.org.ansi.sql.syntax.ColumnName name, hydra.util.Opt typeOrDomain, hydra.util.Opt refScope, hydra.util.Opt defaultOrIdentityOrGeneration, java.util.List constraints, hydra.util.Opt collate) {
    java.util.Objects.requireNonNull((name));
    java.util.Objects.requireNonNull((typeOrDomain));
    java.util.Objects.requireNonNull((refScope));
    java.util.Objects.requireNonNull((defaultOrIdentityOrGeneration));
    java.util.Objects.requireNonNull((constraints));
    java.util.Objects.requireNonNull((collate));
    this.name = name;
    this.typeOrDomain = typeOrDomain;
    this.refScope = refScope;
    this.defaultOrIdentityOrGeneration = defaultOrIdentityOrGeneration;
    this.constraints = constraints;
    this.collate = collate;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof ColumnDefinition)) {
      return false;
    }
    ColumnDefinition o = (ColumnDefinition) (other);
    return name.equals(o.name) && typeOrDomain.equals(o.typeOrDomain) && refScope.equals(o.refScope) && defaultOrIdentityOrGeneration.equals(o.defaultOrIdentityOrGeneration) && constraints.equals(o.constraints) && collate.equals(o.collate);
  }
  
  @Override
  public int hashCode() {
    return 2 * name.hashCode() + 3 * typeOrDomain.hashCode() + 5 * refScope.hashCode() + 7 * defaultOrIdentityOrGeneration.hashCode() + 11 * constraints.hashCode() + 13 * collate.hashCode();
  }
  
  public ColumnDefinition withName(hydra.ext.org.ansi.sql.syntax.ColumnName name) {
    java.util.Objects.requireNonNull((name));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
  
  public ColumnDefinition withTypeOrDomain(hydra.util.Opt typeOrDomain) {
    java.util.Objects.requireNonNull((typeOrDomain));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
  
  public ColumnDefinition withRefScope(hydra.util.Opt refScope) {
    java.util.Objects.requireNonNull((refScope));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
  
  public ColumnDefinition withDefaultOrIdentityOrGeneration(hydra.util.Opt defaultOrIdentityOrGeneration) {
    java.util.Objects.requireNonNull((defaultOrIdentityOrGeneration));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
  
  public ColumnDefinition withConstraints(java.util.List constraints) {
    java.util.Objects.requireNonNull((constraints));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
  
  public ColumnDefinition withCollate(hydra.util.Opt collate) {
    java.util.Objects.requireNonNull((collate));
    return new ColumnDefinition(name, typeOrDomain, refScope, defaultOrIdentityOrGeneration, constraints, collate);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy