class Regclass implements Comparable<Regclass>, Writeable {

    private final int oid;
    private final String name;


    public static Regclass relationOid(RelationInfo relation) {<FILL_FUNCTION_BODY>}

    public static Regclass primaryOid(RelationInfo relation) {
        return new Regclass(
            OidHash.primaryKeyOid(relation.ident(), relation.primaryKey()),
            relation.ident().fqn()
        );
    }

    public static Regclass fromRelationName(RelationName relationName) {
        return new Regclass(
            OidHash.relationOid(OidHash.Type.TABLE, relationName),
            relationName.fqn()
        );
    }

    public Regclass(int oid, String name) {
        this.oid = oid;
        this.name = name;
    }


    public Regclass(StreamInput in) throws IOException {
        this.oid = in.readInt();
        this.name = in.readString();
    }

    public int oid() {
        return oid;
    }

    public String name() {
        return name;
    }

    public void writeTo(StreamOutput out) throws IOException {
        out.writeInt(oid);
        out.writeString(name);
    }

    @Override
    public int compareTo(Regclass o) {
        return Integer.compare(oid, o.oid);
    }

    @Override
    public String toString() {
        return Integer.toString(oid);
    }

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

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Regclass other = (Regclass) obj;
        return oid == other.oid;
    }
}

        return new Regclass(
            OidHash.relationOid(
                OidHash.Type.fromRelationType(relation.relationType()),
                relation.ident()
            ),
            relation.ident().fqn()
        );
    
<no_super_class>