package com.atlassian.stash.internal.repository.sync.dao;

import net.java.ao.Accessor;
import net.java.ao.Entity;
import net.java.ao.Mutator;
import net.java.ao.Preload;
import net.java.ao.schema.Indexed;
import net.java.ao.schema.NotNull;
import net.java.ao.schema.StringLength;
import net.java.ao.schema.Table;

/**
 * @since 2.6
 */
@Preload
@Table("REJECTED_REF")
public interface AoRejectedRef extends Entity {

    String REF_DISPLAY_ID_COLUMN = "REF_DISPLAY_ID";
    String REF_ID_COLUMN = "REF_ID";
    String REPOSITORY_ID_COLUMN = "REPOSITORY_ID";
    String STATE_COLUMN = "REF_STATUS";

    @Accessor(REF_DISPLAY_ID_COLUMN)
    @NotNull
    @StringLength(StringLength.MAX_LENGTH)
    String getRefDisplayId();

    @Accessor(REF_ID_COLUMN)
    @Indexed
    @NotNull
    @StringLength(StringLength.MAX_LENGTH)
    String getRefId();

    @Accessor(REPOSITORY_ID_COLUMN)
    @Indexed
    @NotNull
    int getRepositoryId();

    @Accessor(STATE_COLUMN)
    @NotNull
    int getState();

    @Mutator(STATE_COLUMN)
    void setState(int status);
}
