本文整理了Java中com.holonplatform.core.query.Query.list
方法的一些代码示例,展示了Query.list
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.list
方法的具体详情如下:
包路径:com.holonplatform.core.query.Query
类名称:Query
方法名:list
暂无
代码示例来源:origin: com.holon-platform.core/documentation-core
public void selectAllProjection() {
// tag::allprojection[]
Datastore datastore = getDatastore(); // build or obtain a concrete Datastore implementation
List<Map<String, Object>> values = datastore.query(DataTarget.named("test")).list(SelectAllProjection.create()); // <1>
// end::allprojection[]
}
代码示例来源:origin: com.holon-platform.jpa/documentation-datastore-jpa
void query() {
Datastore datastore = getJpaDatastore();
List<Test> resultEntities = datastore.query(JPA_TARGET).filter(ID.gt(0L)).list(JPA_TARGET); // <2>
}
// end::model4[]
代码示例来源:origin: com.holon-platform.jpa/documentation-datastore-jpa
void operations() {
Datastore datastore = getJpaDatastore();
PropertyBox value = PropertyBox.builder(Test.PROPERTIES).set(Test.PROPERTIES.property("id"), 1L)
.set(Test.PROPERTIES.property("value"), "test").build(); // <3>
datastore.save(Test.TARGET, value);
List<PropertyBox> values = datastore.query(Test.TARGET).filter(Test.PROPERTIES.property("id").gt(0L))
.sort(Test.PROPERTIES.property("value").desc()).list(Test.PROPERTIES); // <4>
}
// end::beans1[]
代码示例来源:origin: com.holon-platform.core/documentation-core
public void queryResults() {
// tag::queryresults[]
final NumericProperty<Integer> PROPERTY1 = NumericProperty.integerType("test1");
final StringProperty PROPERTY2 = StringProperty.create("test2");
final PropertySet<?> PROPERTIES = PropertySet.of(PROPERTY1, PROPERTY2);
final DataTarget<?> TARGET = DataTarget.named("testTarget");
Datastore datastore = getDatastore(); // build or obtain a concrete Datastore implementation
long count = datastore.query().target(TARGET).count(); // <1>
Stream<Integer> values = datastore.query(TARGET).stream(PROPERTY1); // <2>
Optional<Integer> value = datastore.query(TARGET).findOne(PROPERTY1); // <3>
Stream<PropertyBox> results = datastore.query(TARGET).stream(PROPERTY1, PROPERTY2); // <4>
results = datastore.query(TARGET).stream(PROPERTIES); // <5>
List<PropertyBox> list = datastore.query(TARGET).list(PROPERTY1, PROPERTY2); // <6>
Optional<PropertyBox> result = datastore.query(TARGET).findOne(PROPERTY1, PROPERTY2); // <7>
// end::queryresults[]
}
代码示例来源:origin: com.holon-platform.jdbc/documentation-datastore-jdbc
public void naming2() {
// tag::naming2[]
Datastore datastore = JdbcDatastore.builder().dataSource(createOrObtainDatasource()).build(); // <1>
PropertyBox value = PropertyBox.builder(TEST).set(ID, 1L).set(VALUE, "One").build();
datastore.save(TARGET, value); // <2>
Stream<PropertyBox> results = datastore.query().target(TARGET).filter(ID.goe(1L)).stream(TEST); // <3>
List<String> values = datastore.query().target(TARGET).sort(ID.asc()).list(VALUE); // <4>
datastore.bulkDelete(TARGET).filter(ID.gt(0L)).execute(); // <5>
// end::naming2[]
}
内容来源于网络,如有侵权,请联系作者删除!