Tabnine Logo
ValueObjectIdDTO
Code IndexAdd Tabnine to your IDE (free)

How to use
ValueObjectIdDTO
in
org.javers.repository.jql

Best Java code snippets using org.javers.repository.jql.ValueObjectIdDTO (Showing top 5 results out of 315)

origin: javers/javers

public static ValueObjectIdDTO valueObjectId(Object ownerLocalId, Class ownerClass, String fragment){
  return new ValueObjectIdDTO(ownerClass, ownerLocalId, fragment);
}
origin: javers/javers

@Test
public void shouldSupportInterfaceProperty() {
  // given
  TestClassWithInterfaceProperty foo = new TestClassWithInterfaceProperty("1", new TestInterfaceImpl("Foo"));
  TestClassWithInterfaceProperty bar = new TestClassWithInterfaceProperty("1", new TestInterfaceImpl("Bar"));
  Javers javers = JaversBuilder.javers().build();
  // when
  Diff diff = javers.compare(foo, bar);
  System.out.println(diff);
  // then
  assertTrue(diff.getChanges().size() == 1);
  ValueChange change = diff.getChangesByType(ValueChange.class).get(0);
  ValueObjectIdDTO voId = ValueObjectIdDTO.valueObjectId("1", TestClassWithInterfaceProperty.class, "interfaceProperty");
  Assertions.assertThat(change.getAffectedGlobalId().value()).isEqualTo(voId.value());
  Assertions.assertThat(change.getPropertyName()).isEqualTo("value");
  Assertions.assertThat(change.getLeft()).isEqualTo("Foo");
  Assertions.assertThat(change.getRight()).isEqualTo("Bar");
}
origin: javers/javers

public GlobalId createFromDto(GlobalIdDTO globalIdDTO){
  if (globalIdDTO instanceof InstanceIdDTO){
    InstanceIdDTO idDTO = (InstanceIdDTO) globalIdDTO;
    return createInstanceId(idDTO.getCdoId(), idDTO.getEntity());
  }
  if (globalIdDTO instanceof UnboundedValueObjectIdDTO){
    UnboundedValueObjectIdDTO idDTO = (UnboundedValueObjectIdDTO) globalIdDTO;
    return createUnboundedValueObjectId(idDTO.getVoClass());
  }
  if (globalIdDTO instanceof ValueObjectIdDTO){
    ValueObjectIdDTO idDTO = (ValueObjectIdDTO) globalIdDTO;
    GlobalId ownerId = createFromDto(idDTO.getOwnerIdDTO());
    return createValueObjectIdFromPath(ownerId, idDTO.getPath());
  }
  throw new RuntimeException("type " + globalIdDTO.getClass() + " is not implemented");
}
origin: javers/javers

return new QueryBuilder(new IdFilterDefinition(ValueObjectIdDTO.valueObjectId(ownerLocalId, ownerEntityClass, path)));
origin: javers/javers

public static ValueObjectIdDTO withUnboundedValueObjectOwner(Class ownerClass, String fragment){
  return new ValueObjectIdDTO(ownerClass, fragment);
}
org.javers.repository.jqlValueObjectIdDTO

Most used methods

  • valueObjectId
  • <init>
  • getOwnerIdDTO
  • getPath
  • value

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now