@Test public void testCalculateParentHash() { index(tCity, tCityId, tCityName, tPerson, tPersonId, tPersonName, tPersonCity, tPersonCityId, tPersonCityName); assertEquals("", dataTypeStackHash.calculateParentHash(tCity)); assertEquals("tCity", dataTypeStackHash.calculateParentHash(tCityId)); assertEquals("tCity", dataTypeStackHash.calculateParentHash(tCityName)); assertEquals("", dataTypeStackHash.calculateParentHash(tPerson)); assertEquals("tPerson", dataTypeStackHash.calculateParentHash(tPersonId)); assertEquals("tPerson", dataTypeStackHash.calculateParentHash(tPersonName)); assertEquals("tPerson", dataTypeStackHash.calculateParentHash(tPersonCity)); assertEquals("tPerson.city", dataTypeStackHash.calculateParentHash(tPersonCityId)); assertEquals("tPerson.city", dataTypeStackHash.calculateParentHash(tPersonCityName)); }
public String calculateParentHash(final DataType reference) { return getParent(reference) .map(dataType -> calculateHash(dataType, dataType.getName())) .orElse(""); }
DataTypeStackHash { public String calculateParentHash(final DataType reference) { return getParent(reference) .map(dataType -> calculateHash(dataType, dataType.getName())) .orElse(""); } }
DataTypeStackHash { public String calculateParentHash(final DataType reference) { return getParent(reference) .map(dataType -> calculateHash(dataType, dataType.getName())) .orElse(""); } @Inject  DataTypeStackHash(final DataTypeStore dataTypeStore); }
DataTypeStackHash { public String calculateParentHash(final DataType reference) { return getParent(reference) .map(dataType -> calculateHash(dataType, dataType.getName())) .orElse(""); } @Inject  DataTypeStackHash(final DataTypeStore dataTypeStore); String calculateHash(final DataType dataType); String calculateParentHash(final DataType reference); }
DataTypeStackHash { public String calculateParentHash(final DataType reference) { return getParent(reference) .map(dataType -> calculateHash(dataType, dataType.getName())) .orElse(""); } @Inject  DataTypeStackHash(final DataTypeStore dataTypeStore); String calculateHash(final DataType dataType); String calculateParentHash(final DataType reference);  }