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

com.vaadin.v7.data.util.sqlcontainer.ReadOnlyRowId Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.v7.data.util.sqlcontainer;

/**
 * @deprecated As of 8.0, no replacement available.
 */
@Deprecated
public class ReadOnlyRowId extends RowId {
    private static final long serialVersionUID = -2626764781642012467L;
    private final Integer rowNum;

    public ReadOnlyRowId(int rowNum) {
        super();
        this.rowNum = rowNum;
    }

    @Override
    public int hashCode() {
        return getRowNum();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) {
            return false;
        }
        return getRowNum() == (((ReadOnlyRowId) obj).getRowNum());
    }

    public int getRowNum() {
        return rowNum;
    }

    @Override
    public String toString() {
        return String.valueOf(getRowNum());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy