PowerDesigner生成OOM时类名属性名转换

Examples


  • Script 1: Convert a name into a class code (JAVA naming convention)转换类名

    .foreach_part(%Name%, "' _-'")
    %.FU:CurrentPart%
    .next

    The conversion script will output:

    Name = Employee shareholder => Code = EmployeeShareholder

  • Script 2: Convert a name into a class attribute code (JAVA naming convention)转换属性名

    .set_value(_First, true, new)
    .foreach_part(%Name%, "' _-'")
    .if (%_First%)
    %.L:CurrentPart%
    .set_value(_First, false, update)
    .else
    %.FU:CurrentPart%
    .endif
    .next

    The conversion script will output:

    Name = Employee shareholder => Code = employeeShareholder
原文地址:https://www.cnblogs.com/ygjlch/p/4900236.html