org.anystub.jdbc.StubRowId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anystub Show documentation
Show all versions of anystub Show documentation
the library allows to create handy stubs for any tests
package org.anystub.jdbc;
import java.sql.RowId;
import java.util.Arrays;
public class StubRowId implements RowId {
private final byte[] rowid;
public StubRowId(byte[] rowid) {
this.rowid = rowid;
}
@Override
public byte[] getBytes() {
return rowid;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StubRowId stubRowId = (StubRowId) o;
return Arrays.equals(rowid, stubRowId.rowid);
}
@Override
public int hashCode() {
return Arrays.hashCode(rowid);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy