com.poscoict.glueframework.biz.activity.mongodb
Class GlueMongoDelete

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.poscoict.glueframework.biz.activity.mongodb.GlueMongoDelete

public class GlueMongoDelete
extends GlueActivity<GlueContext>

MongoRepository¸¦ ÀÌ¿ëÇÑ Document »èÁ¦.

 Activity Property
 
 - repository : (Çʼö) applicationContext.xmlÀÇ repository id.
 
 - entity-id : (¼±ÅÃ) ¹ÌÀԷ½à repositoryÀÇ ¸ðµç data »èÁ¦
      »èÁ¦ÇÏ°íÀÚ ÇÏ´Â entity Á¤º¸·Î ctx¿¡ ´ã±ä °´Ã¼¸¦ ³ªÅ¸³½´Ù. 
      ctx¿¡ ´ã±ä °´Ã¼´Â IDÀϼöµµ Entity Àϼöµµ ÀÖ´Ù.
 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <activity name="DeleteAll" class="com.poscoict.glueframework.biz.activity.mongodb.GlueMongoDelete">
         <transition name="success" value="NextActivity" />
         <property name="repository" value="customerRepository" />
     </activity>
 
 
 »ç¿ë ¿¹# 2
 
     <activity name="Custom" class="...">
         <transition name="success" value="DeleteById" />
     </activity>
     <activity name="DeleteById" class="com.poscoict.glueframework.biz.activity.mongodb.GlueMongoDelete">
         <transition name="success" value="NextActivity" />
         <property name="repository" value="customerRepository" />
         <property name="entity-id" value="dataId" />
     </activity>
 
 
 
 »ç¿ë ¿¹# 3
 
     <activity name="Custom" class="...">
         <transition name="success" value="DeleteByEntity" />
     </activity>
     <activity name="DeleteByEntity" class="com.poscoict.glueframework.biz.activity.mongodb.GlueMongoDelete">
         <transition name="success" value="NextActivity" />
         <property name="repository" value="customerRepository" />
         <property name="entity-id" value="dataEntity" />
     </activity>
 
 
 
 Âü°í : applicationContext.xml
 
     <mongo:repositories base-package="sample.repository" />
 
 
 Âü°í : MongoRepository È®Àå
 
     package sample.repository;
     import org.springframework.data.mongodb.repository.MongoRepository;
     import sample.vo.Customer;
     public interface CustomerRepository extends MongoRepository<Customer, String> {
     }
 
 
 Âü°í : 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(...) );
 

Author:
ȲÀ¯Áø

Field Summary
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueMongoDelete()
           
 
Method Summary
 String runActivity(GlueContext ctx)
          Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueMongoDelete

public GlueMongoDelete()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
Description copied from class: GlueActivity
Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù. °á°ú °ªÀº GlueContext¿¡ ´ã¾Æ¼­ ´ÙÀ½ Activity ¶Ç´Â F/W¿¡ Àü´ÞÇÏ°Ô µÈ´Ù. ÇÊ¿äÇÑ ¸ðµç Data´Â GlueContext¿¡¼­ È£ÃâÇÏ¿© »ç¿ëÇÏ°Ô µÈ´Ù.

Specified by:
runActivity in class GlueActivity<GlueContext>
Parameters:
ctx - GlueContext
Returns:
String Á¤»óÀûÀ̸é "success"¸¦ Return ÇÏ°í ºñÁ¤»ó 󸮸¦ ¿øÇϸé "failure"¸¦ Return ÇÑ´Ù.
 ¿¹) 
 <transition name="success" value="BizLogic"/>
 <transition name="failure" value="ErrorHandle"/>
 ==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
 


Copyright © 2013–2018 POSCO ICT. All rights reserved.