/*
 * This file is generated by jOOQ.
 */
package jj.tech.paolu.repository.jooq.tables.records;


import jj.tech.paolu.repository.jooq.tables.SysRole;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record3;
import org.jooq.Row3;
import org.jooq.impl.UpdatableRecordImpl;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
public class SysRoleRecord extends UpdatableRecordImpl<SysRoleRecord> implements Record3<String, String, String> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>yx.sys_role.id</code>.
     */
    public void setId(String value) {
        set(0, value);
    }

    /**
     * Getter for <code>yx.sys_role.id</code>.
     */
    public String getId() {
        return (String) get(0);
    }

    /**
     * Setter for <code>yx.sys_role.rolename</code>.
     */
    public void setRolename(String value) {
        set(1, value);
    }

    /**
     * Getter for <code>yx.sys_role.rolename</code>.
     */
    public String getRolename() {
        return (String) get(1);
    }

    /**
     * Setter for <code>yx.sys_role.department</code>.
     */
    public void setDepartment(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>yx.sys_role.department</code>.
     */
    public String getDepartment() {
        return (String) get(2);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<String> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record3 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row3<String, String, String> fieldsRow() {
        return (Row3) super.fieldsRow();
    }

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

    @Override
    public Field<String> field1() {
        return SysRole.SYS_ROLE.ID;
    }

    @Override
    public Field<String> field2() {
        return SysRole.SYS_ROLE.ROLENAME;
    }

    @Override
    public Field<String> field3() {
        return SysRole.SYS_ROLE.DEPARTMENT;
    }

    @Override
    public String component1() {
        return getId();
    }

    @Override
    public String component2() {
        return getRolename();
    }

    @Override
    public String component3() {
        return getDepartment();
    }

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

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

    @Override
    public String value3() {
        return getDepartment();
    }

    @Override
    public SysRoleRecord value1(String value) {
        setId(value);
        return this;
    }

    @Override
    public SysRoleRecord value2(String value) {
        setRolename(value);
        return this;
    }

    @Override
    public SysRoleRecord value3(String value) {
        setDepartment(value);
        return this;
    }

    @Override
    public SysRoleRecord values(String value1, String value2, String value3) {
        value1(value1);
        value2(value2);
        value3(value3);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached SysRoleRecord
     */
    public SysRoleRecord() {
        super(SysRole.SYS_ROLE);
    }

    /**
     * Create a detached, initialised SysRoleRecord
     */
    public SysRoleRecord(String id, String rolename, String department) {
        super(SysRole.SYS_ROLE);

        setId(id);
        setRolename(rolename);
        setDepartment(department);
        resetChangedOnNotNull();
    }

    /**
     * Create a detached, initialised SysRoleRecord
     */
    public SysRoleRecord(jj.tech.paolu.repository.jooq.tables.pojos.SysRole value) {
        super(SysRole.SYS_ROLE);

        if (value != null) {
            setId(value.getId());
            setRolename(value.getRolename());
            setDepartment(value.getDepartment());
            resetChangedOnNotNull();
        }
    }
}
