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 »èÁ¦.

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

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, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, 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–2014 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.