@Test public void testWriteAndReadSecondaryLock() throws IOException { SecondaryLock expect = getSecondaryLock(COLUMN); SecondaryLock actual = new SecondaryLock(); writeObjectToBufferAndRead(expect, actual); Assert.assertTrue(expect.equals(actual)); }
@Override public boolean equals(Object other) { if (!(other instanceof SecondaryLock)) { return false; } ThemisLock lock = (ThemisLock)other; return super.equals(lock) && !lock.isPrimary() && this.primaryColumn.equals(((SecondaryLock) other).getPrimaryColumn()); }
SecondaryLock extends ThemisLock { @Override public boolean equals(Object other) { if (!(other instanceof SecondaryLock)) { return false; } ThemisLock lock = (ThemisLock)other; return super.equals(lock) && !lock.isPrimary() && this.primaryColumn.equals(((SecondaryLock) other).getPrimaryColumn()); } }
SecondaryLock extends ThemisLock { @Override public boolean equals(Object other) { if (!(other instanceof SecondaryLock)) { return false; } ThemisLock lock = (ThemisLock)other; return super.equals(lock) && !lock.isPrimary() && this.primaryColumn.equals(((SecondaryLock) other).getPrimaryColumn()); } SecondaryLock();  SecondaryLock(Type type); }
SecondaryLock extends ThemisLock { @Override public boolean equals(Object other) { if (!(other instanceof SecondaryLock)) { return false; } ThemisLock lock = (ThemisLock)other; return super.equals(lock) && !lock.isPrimary() && this.primaryColumn.equals(((SecondaryLock) other).getPrimaryColumn()); } SecondaryLock();  SecondaryLock(Type type); ColumnCoordinate getPrimaryColumn(); void setPrimaryColumn(ColumnCoordinate primaryColumn); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override boolean equals(Object other); @Override String toString(); @Override boolean isPrimary(); }
SecondaryLock extends ThemisLock { @Override public boolean equals(Object other) { if (!(other instanceof SecondaryLock)) { return false; } ThemisLock lock = (ThemisLock)other; return super.equals(lock) && !lock.isPrimary() && this.primaryColumn.equals(((SecondaryLock) other).getPrimaryColumn()); } SecondaryLock();  SecondaryLock(Type type); ColumnCoordinate getPrimaryColumn(); void setPrimaryColumn(ColumnCoordinate primaryColumn); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override boolean equals(Object other); @Override String toString(); @Override boolean isPrimary();  }