• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RecursiveModelRelationship类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.chalup.thneed.RecursiveModelRelationship的典型用法代码示例。如果您正苦于以下问题:Java RecursiveModelRelationship类的具体用法?Java RecursiveModelRelationship怎么用?Java RecursiveModelRelationship使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RecursiveModelRelationship类属于org.chalup.thneed包,在下文中一共展示了RecursiveModelRelationship类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: shouldVisitEveryRelationship

点赞 3

import org.chalup.thneed.RecursiveModelRelationship; //导入依赖的package包/类
@Test
public void shouldVisitEveryRelationship() throws Exception {
  ModelGraph<ModelInterface> graph = ModelGraph.of(ModelInterface.class)
      .identifiedByDefault().by(_ID)
      .where()
      .the(CONTACT).groupsOther().by(CONTACT_ID)
      .build();

  graph.accept(mockVisitor);

  verify(mockVisitor).visit(captor.capture());
  RecursiveModelRelationship<ModelInterface> relationship = captor.getValue();
  assertThat(relationship.mModel).isEqualTo(CONTACT);
  assertThat(relationship.mGroupByColumn).isEqualTo(CONTACT_ID);
  assertThat(relationship.mModelIdColumn).isEqualTo(_ID);
}
 

开发者ID:chalup,
项目名称:thneed,
代码行数:17,
代码来源:RecursiveModelTest.java

示例2: shouldUseRelationshipSpecificIdColumn

点赞 2

import org.chalup.thneed.RecursiveModelRelationship; //导入依赖的package包/类
@Test
public void shouldUseRelationshipSpecificIdColumn() throws Exception {
  ModelGraph<ModelInterface> graph = ModelGraph.of(ModelInterface.class)
      .identifiedByDefault().by(_ID)
      .where()
      .the(CONTACT).identified().by(ID).groupsOther().by(CONTACT_ID)
      .build();

  graph.accept(mockVisitor);

  verify(mockVisitor).visit(captor.capture());
  RecursiveModelRelationship<ModelInterface> relationship = captor.getValue();
  assertThat(relationship.mModelIdColumn).isEqualTo(ID);
}
 

开发者ID:chalup,
项目名称:thneed,
代码行数:15,
代码来源:RecursiveModelTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)