zoukankan      html  css  js  c++  java
  • Find方法 Exist方法

    在ax中新建表时,通常要实现这两个方法,以便于重用。下面贴出Find与Exists方法示例,摘自表InvenBatch

    Find方法:

    static InventBatch find(InventBatchId _inventBatchId, ItemId _itemId, boolean _forupdate = false)
    {
        InventBatch inventBatch;
        ;
        inventBatch.selectForUpdate(_forupdate);

        if (_inventBatchId)
        {
            select firstonly inventBatch
                index hint itemBatchIdx
                where inventBatch.ItemId    == _itemId       &&
                      inventBatch.InventBatchId   == _inventBatchId;

        }

        return inventBatch;
    }

    Exists方法:

    static boolean exist(
        ItemId          itemId,
        InventBatchId   batchId
        )
    {
        return (select inventBatch
                    index hint itemBatchIdx
                    where inventBatch.ItemId        == itemId    &&
                          inventBatch.InventBatchId == batchId).RecId != 0;
    }

  • 相关阅读:
    企业级应用TOMCAT
    HTTP服务及状态码
    Zabbix服务网页报错汇总
    spring aop 嵌套方法注解不生效
    oracle数据库密码修改和解锁
    redis安装
    docker简介
    ffmpeg简介
    JAVA学习笔记之变量
    JAVA学习笔记之类和对象
  • 原文地址:https://www.cnblogs.com/perock/p/2376546.html
Copyright © 2011-2022 走看看