@Test public void testReadable2() { stateManager = new StateManagerImpl(); Employee employee = new Employee(stateManager); Assert.assertFalse(stateManager.isReadable(employee, 0)); Assert.assertFalse(stateManager.isReadable(employee, 1)); employee.setName(new Utf8("foo")); Assert.assertTrue(stateManager.isReadable(employee, 0)); Assert.assertFalse(stateManager.isReadable(employee, 1)); }
public boolean isReadable(Persistent persistent, int fieldIndex) { return readableBits.get(fieldIndex); }
StateManagerImpl implements StateManager { public boolean isReadable(Persistent persistent, int fieldIndex) { return readableBits.get(fieldIndex); } }
StateManagerImpl implements StateManager { public boolean isReadable(Persistent persistent, int fieldIndex) { return readableBits.get(fieldIndex); } StateManagerImpl(); }
StateManagerImpl implements StateManager { public boolean isReadable(Persistent persistent, int fieldIndex) { return readableBits.get(fieldIndex); } StateManagerImpl(); void setManagedPersistent(Persistent persistent); @Override boolean isNew(Persistent persistent); @Override void setNew(Persistent persistent); @Override void clearNew(Persistent persistent); void setDirty(Persistent persistent, int fieldIndex); boolean isDirty(Persistent persistent, int fieldIndex); boolean isDirty(Persistent persistent); @Override void setDirty(Persistent persistent); @Override void clearDirty(Persistent persistent, int fieldIndex); void clearDirty(Persistent persistent); void setReadable(Persistent persistent, int fieldIndex); boolean isReadable(Persistent persistent, int fieldIndex); @Override void clearReadable(Persistent persistent, int fieldIndex); void clearReadable(Persistent persistent); }
StateManagerImpl implements StateManager { public boolean isReadable(Persistent persistent, int fieldIndex) { return readableBits.get(fieldIndex); } StateManagerImpl(); void setManagedPersistent(Persistent persistent); @Override boolean isNew(Persistent persistent); @Override void setNew(Persistent persistent); @Override void clearNew(Persistent persistent); void setDirty(Persistent persistent, int fieldIndex); boolean isDirty(Persistent persistent, int fieldIndex); boolean isDirty(Persistent persistent); @Override void setDirty(Persistent persistent); @Override void clearDirty(Persistent persistent, int fieldIndex); void clearDirty(Persistent persistent); void setReadable(Persistent persistent, int fieldIndex); boolean isReadable(Persistent persistent, int fieldIndex); @Override void clearReadable(Persistent persistent, int fieldIndex); void clearReadable(Persistent persistent);  }