package com.kingdee.eas.custom.integration.feishu;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.framework.ejb.EJBRemoteException;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.integration.feishu.app.FeishuI18nResourcesController;
import com.kingdee.shr.base.syssetting.SHRBaseItem;

import java.rmi.RemoteException;

/**
 * @Description TODO
 * @Date 2026/3/12 10:37
 * @Created by HeYuan
 */
public class FeishuI18nResources  extends SHRBaseItem implements IFeishuI18nResources {
    public FeishuI18nResources() {
        super();
        registerInterface(IFeishuI18nResources.class, this);
    }

    public FeishuI18nResources(Context ctx) {
        super(ctx);
        registerInterface(IFeishuI18nResources.class, this);
    }

    public BOSObjectType getType() {
        return new BOSObjectType("1555C93E");
    }

    private FeishuI18nResourcesController getController() throws BOSException {
        return (FeishuI18nResourcesController) getBizController();
    }

    /**
     * 取值-System defined method
     *
     * @param pk 取值
     * @return
     */
    public FeishuI18nResourcesInfo getFeishuI18nResourcesInfo(IObjectPK pk) throws BOSException, EASBizException {
        try {
            return getController().getFeishuI18nResourcesInfo(getContext(), pk);
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }

    /**
     * 取值-System defined method
     *
     * @param pk       取值
     * @param selector 取值
     * @return
     */
    public FeishuI18nResourcesInfo getFeishuI18nResourcesInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException {
        try {
            return getController().getFeishuI18nResourcesInfo(getContext(), pk, selector);
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }

    /**
     * 取值-System defined method
     *
     * @param oql 取值
     * @return
     */
    public FeishuI18nResourcesInfo getFeishuI18nResourcesInfo(String oql) throws BOSException, EASBizException {
        try {
            return getController().getFeishuI18nResourcesInfo(getContext(), oql);
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }

    /**
     * 取集合-System defined method
     *
     * @return
     */
    public FeishuI18nResourcesCollection getFeishuI18nResourcesCollection() throws BOSException {
        try {
            return getController().getFeishuI18nResourcesCollection(getContext());
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }

    /**
     * 取集合-System defined method
     *
     * @param view 取集合
     * @return
     */
    public FeishuI18nResourcesCollection getFeishuI18nResourcesCollection(EntityViewInfo view) throws BOSException {
        try {
            return getController().getFeishuI18nResourcesCollection(getContext(), view);
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }

    /**
     * 取集合-System defined method
     *
     * @param oql 取集合
     * @return
     */
    public FeishuI18nResourcesCollection getFeishuI18nResourcesCollection(String oql) throws BOSException {
        try {
            return getController().getFeishuI18nResourcesCollection(getContext(), oql);
        } catch (RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }
}
