// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java
// public class Member {
// 
//     private Integer id;
// 
//     private String name;
// 
//     private String phone;
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getPhone() {
//         return phone;
//     }
// 
//     public void setPhone(String phone) {
//         this.phone = phone;
//     }
// 
//     @Override
//     public String toString() {
//         return "Member{" +
//                 "id=" + id +
//                 ", name='" + name + '\'' +
//                 ", phone='" + phone + '\'' +
//                 '}';
//     }
// }
// 
// Path: koper-dataevent/src/main/java/koper/event/DataEvent.java
// public interface DataEvent {
// 
//     void setException(String exception);
// 
//     String getException();
// 
//     void setResult(Object result);
// 
//     Object getResult();
// 
//     void setArgs(List<?> args);
// 
//     List<?> getArgs();
// 
//     void setMsgBean(MsgBean<String, String> msgBean);
// 
//     MsgBean<String, String> getMsgBean();
// 
//     void setEventName(String eventName);
// 
//     String getEventName();
// 
//     void setDataObjectName(String dataObjectName);
// 
//     String getDataObjectName();
// 
//     void setTopic(String topic);
// 
//     String getTopic();
// 
// }


import koper.demo.member.mapper.Member;
import koper.event.DataEvent;
import koper.event.DataListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package koper.event.binding;



/**
 * @author caie
 * @since 1.2
 */
@Component
@DataListener(dataObject = "koper.demo.member.mapper.impl.MemberMapperImpl")
public class MemberListener {

    private Logger logger = LoggerFactory.getLogger(MemberListener.class);

    /**
     * test with Integer String type param
     */
    public void onInsertMember(Integer id, String name, String phone) {
        logger.info("on insert Member successful, id : {}, name : {}, phone : {}", id, name, phone);
    }

    /**
     * test with pojo and Integer type param
     */
    public void onCancelMember(Integer id, Member member) {
        logger.info("on cancel member successful, member info : {}, id : {}",
                member.toString(), id);
    }

    /**
     * test with DataEvent type param
     */
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java
// public class Member {
// 
//     private Integer id;
// 
//     private String name;
// 
//     private String phone;
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getPhone() {
//         return phone;
//     }
// 
//     public void setPhone(String phone) {
//         this.phone = phone;
//     }
// 
//     @Override
//     public String toString() {
//         return "Member{" +
//                 "id=" + id +
//                 ", name='" + name + '\'' +
//                 ", phone='" + phone + '\'' +
//                 '}';
//     }
// }
// 
// Path: koper-dataevent/src/main/java/koper/event/DataEvent.java
// public interface DataEvent {
// 
//     void setException(String exception);
// 
//     String getException();
// 
//     void setResult(Object result);
// 
//     Object getResult();
// 
//     void setArgs(List<?> args);
// 
//     List<?> getArgs();
// 
//     void setMsgBean(MsgBean<String, String> msgBean);
// 
//     MsgBean<String, String> getMsgBean();
// 
//     void setEventName(String eventName);
// 
//     String getEventName();
// 
//     void setDataObjectName(String dataObjectName);
// 
//     String getDataObjectName();
// 
//     void setTopic(String topic);
// 
//     String getTopic();
// 
// }


// Path: koper-testcase/src/main/java/koper/event/binding/MemberListener.java
import koper.demo.member.mapper.Member;
import koper.event.DataEvent;
import koper.event.DataListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package koper.event.binding;



/**
 * @author caie
 * @since 1.2
 */
@Component
@DataListener(dataObject = "koper.demo.member.mapper.impl.MemberMapperImpl")
public class MemberListener {

    private Logger logger = LoggerFactory.getLogger(MemberListener.class);

    /**
     * test with Integer String type param
     */
    public void onInsertMember(Integer id, String name, String phone) {
        logger.info("on insert Member successful, id : {}, name : {}, phone : {}", id, name, phone);
    }

    /**
     * test with pojo and Integer type param
     */
    public void onCancelMember(Integer id, Member member) {
        logger.info("on cancel member successful, member info : {}, id : {}",
                member.toString(), id);
    }

    /**
     * test with DataEvent type param
     */
    public void onDeleteMember(DataEvent dataEvent) {