SMALL
--------- Obect 생성
MatchOperation matchOp = Aggregation.match(Criteria.where("upchecd").is(paramKey);
MatchOperation groupOp = Aggregation.group("upchecd).max("stdde").as("MAX_STDDE");
------------------
Aggregation agg = Aggregation.newAggregation(matchOp, projectOp).
withOptions(Aggregation.newAggregationOptions()
.allowDiskUse(false)
.explain(false)
.cursor(new BasicDBObject()
.build()
);
DBObject dbobj mongoTemplate.aggregate(agg, "TB_TEST_INFO" , BasicDBObject.class).getRawResults();
List rst = null;
BasicDBOBject cursorObj = (BasicDBObject) dbobj.get("cursor");
BasicDBList resultList = (BasicDBList)cursorObj.get("firstBatch");
for(Object obj : resultList){
....
}
LIST
'IT > java' 카테고리의 다른 글
Java mongdb Api (0) | 2024.08.05 |
---|---|
JAVA Compile create jar manifest (0) | 2024.08.02 |
CMD jar 생성 (0) | 2023.12.22 |
C#에서 JAVA 이미지 전송 및 Base64 디코더 (0) | 2018.11.16 |
Java toByteArray (0) | 2018.11.16 |