/*
 * This file is generated by jOOQ.
 */
package edu.uci.ics.texera.web.model.jooq.generated.tables.records;


import edu.uci.ics.texera.web.model.jooq.generated.enums.UserFileAccessPrivilege;
import edu.uci.ics.texera.web.model.jooq.generated.tables.UserFileAccess;
import edu.uci.ics.texera.web.model.jooq.generated.tables.interfaces.IUserFileAccess;

import org.jooq.Field;
import org.jooq.Record2;
import org.jooq.Record3;
import org.jooq.Row3;
import org.jooq.impl.UpdatableRecordImpl;
import org.jooq.types.UInteger;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class UserFileAccessRecord extends UpdatableRecordImpl<UserFileAccessRecord> implements Record3<UInteger, UInteger, UserFileAccessPrivilege>, IUserFileAccess {

    private static final long serialVersionUID = -638683500;

    /**
     * Setter for <code>texera_db.user_file_access.uid</code>.
     */
    @Override
    public void setUid(UInteger value) {
        set(0, value);
    }

    /**
     * Getter for <code>texera_db.user_file_access.uid</code>.
     */
    @Override
    public UInteger getUid() {
        return (UInteger) get(0);
    }

    /**
     * Setter for <code>texera_db.user_file_access.fid</code>.
     */
    @Override
    public void setFid(UInteger value) {
        set(1, value);
    }

    /**
     * Getter for <code>texera_db.user_file_access.fid</code>.
     */
    @Override
    public UInteger getFid() {
        return (UInteger) get(1);
    }

    /**
     * Setter for <code>texera_db.user_file_access.privilege</code>.
     */
    @Override
    public void setPrivilege(UserFileAccessPrivilege value) {
        set(2, value);
    }

    /**
     * Getter for <code>texera_db.user_file_access.privilege</code>.
     */
    @Override
    public UserFileAccessPrivilege getPrivilege() {
        return (UserFileAccessPrivilege) get(2);
    }

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

    @Override
    public Record2<UInteger, UInteger> key() {
        return (Record2) super.key();
    }

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

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

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

    @Override
    public Field<UInteger> field1() {
        return UserFileAccess.USER_FILE_ACCESS.UID;
    }

    @Override
    public Field<UInteger> field2() {
        return UserFileAccess.USER_FILE_ACCESS.FID;
    }

    @Override
    public Field<UserFileAccessPrivilege> field3() {
        return UserFileAccess.USER_FILE_ACCESS.PRIVILEGE;
    }

    @Override
    public UInteger component1() {
        return getUid();
    }

    @Override
    public UInteger component2() {
        return getFid();
    }

    @Override
    public UserFileAccessPrivilege component3() {
        return getPrivilege();
    }

    @Override
    public UInteger value1() {
        return getUid();
    }

    @Override
    public UInteger value2() {
        return getFid();
    }

    @Override
    public UserFileAccessPrivilege value3() {
        return getPrivilege();
    }

    @Override
    public UserFileAccessRecord value1(UInteger value) {
        setUid(value);
        return this;
    }

    @Override
    public UserFileAccessRecord value2(UInteger value) {
        setFid(value);
        return this;
    }

    @Override
    public UserFileAccessRecord value3(UserFileAccessPrivilege value) {
        setPrivilege(value);
        return this;
    }

    @Override
    public UserFileAccessRecord values(UInteger value1, UInteger value2, UserFileAccessPrivilege value3) {
        value1(value1);
        value2(value2);
        value3(value3);
        return this;
    }

    // -------------------------------------------------------------------------
    // FROM and INTO
    // -------------------------------------------------------------------------

    @Override
    public void from(IUserFileAccess from) {
        setUid(from.getUid());
        setFid(from.getFid());
        setPrivilege(from.getPrivilege());
    }

    @Override
    public <E extends IUserFileAccess> E into(E into) {
        into.from(this);
        return into;
    }

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

    /**
     * Create a detached UserFileAccessRecord
     */
    public UserFileAccessRecord() {
        super(UserFileAccess.USER_FILE_ACCESS);
    }

    /**
     * Create a detached, initialised UserFileAccessRecord
     */
    public UserFileAccessRecord(UInteger uid, UInteger fid, UserFileAccessPrivilege privilege) {
        super(UserFileAccess.USER_FILE_ACCESS);

        set(0, uid);
        set(1, fid);
        set(2, privilege);
    }
}
