
public class GlueMongoDelete extends GlueActivity<GlueContext>
Activity Property
- repository : (필수) applicationContext.xml의 repository id.
- entity-id : (선택) 미입력시 repository의 모든 data 삭제
삭제하고자 하는 entity 정보로 ctx에 담긴 객체를 나타낸다.
ctx에 담긴 객체는 ID일수도 Entity 일수도 있다.
예제
사용 예# 1
사용 예# 2
사용 예# 3
참고 : applicationContext.xml
참고 : MongoRepository 확장
package sample.repository;
import org.springframework.data.mongodb.repository.MongoRepository;
import sample.vo.Customer;
public interface CustomerRepository extends MongoRepository {
}
참고 : Document
package sample.vo;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@ Document
public class Customer {
@ Id
private String id;
private String name;
public Customer( String name ) {
this.name = name;
}
}
참고 : Java Code (Custom)
ctx.put( "dataId", ID );
ctx.put( "dataEntity", repository.findXXX(...) );
dynamicProperties, logger| Constructor and Description |
|---|
GlueMongoDelete() |
| Modifier and Type | Method and Description |
|---|---|
String |
runActivity(GlueContext ctx)
Sub Class에서 반드시 구현하여야 하는 Abstract Method 이며 이 Method는 F/W에서 호출한다.
|
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransitionpublic String runActivity(GlueContext ctx)
GlueActivityrunActivity in class GlueActivity<GlueContext>ctx - GlueContext예)==> return "success"이면 BizLogic Activity 를 실행함.
Copyright © 2013–2021 POSCO ICT. All rights reserved.