/*
 * ToroDB
 * Copyright © 2014 8Kdata Technology (www.8kdata.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package com.torodb.backend.udt.record;

import com.torodb.backend.udt.MongoRegexUDT;
import org.jooq.Field;
import org.jooq.Record2;
import org.jooq.Row2;
import org.jooq.impl.UDTRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@javax.annotation.Generated(value = {"http://www.jooq.org", "3.4.1"},
    comments = "This class is generated by jOOQ")
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class MongoRegexRecord extends UDTRecordImpl<MongoRegexRecord> implements
    Record2<String, String> {

  private static final long serialVersionUID = -103355438;

  public void setPattern(String secs) {
    setValue(0, secs);
  }

  public String getPattern() {
    return (String) getValue(0);
  }

  public void setOptions(String counter) {
    setValue(1, counter);
  }

  public String getOptions() {
    return (String) getValue(1);
  }

  // -------------------------------------------------------------------------
  // Record2 type implementation
  // -------------------------------------------------------------------------
  @Override
  public Row2<String, String> fieldsRow() {
    return (Row2) super.fieldsRow();
  }

  @Override
  public Row2<String, String> valuesRow() {
    return (Row2) super.valuesRow();
  }

  @Override
  public Field<String> field1() {
    return MongoRegexUDT.PATTERN;
  }

  @Override
  public Field<String> field2() {
    return MongoRegexUDT.OPTIONS;
  }

  @Override
  public String value1() {
    return getPattern();
  }

  @Override
  public String value2() {
    return getOptions();
  }

  @Override
  public Record2<String, String> value1(String s) {
    setPattern(s);
    return this;
  }

  @Override
  public Record2<String, String> value2(String s) {
    setOptions(s);
    return this;
  }

  @Override
  public Record2<String, String> values(String s, String s2) {
    setPattern(s);
    setOptions(s2);
    return this;
  }


  // -------------------------------------------------------------------------
  // Constructors
  // -------------------------------------------------------------------------
  /**
   * Create a detached MongoTimestamPRecord
   */
  public MongoRegexRecord() {
    super(MongoRegexUDT.MONGO_REGEX);
  }

  public MongoRegexRecord(String secs, String   counter) {
    super(MongoRegexUDT.MONGO_REGEX);

    setValue(0, secs);
    setValue(1, counter);
  }
}
