com.supermap.data

类 LinkItems

  • java.lang.Object
    • com.supermap.data.InternalHandle
      • com.supermap.data.InternalHandleDisposable
        • com.supermap.data.LinkItems
  • 所有已实现的接口:
    IDisposable


    public class LinkItems
    extends com.supermap.data.InternalHandleDisposable

    关联信息集合类,仅支持关联 Oracle数据库。

    当一个矢量数据集与多个外部表相关联时,同一个关联信息集合对象来管理其所有的关联信息对象。

    • 构造器概要

      构造器 
      构造器和说明
      LinkItems()
      构造一个新的 LinkItems 对象。
      LinkItems(LinkItem[] linkItems)
      根据指定的参数来构造一个 LinkItems 的新对象。
      LinkItems(LinkItems linkItems)
      根据给定的 LinkItems 对象构造一个与其完全相同的新对象。
    • 方法概要

      所有方法 实例方法 具体方法 
      限定符和类型 方法和说明
      int add(LinkItem linkItem)
      将指定的关联信息对象添加到此关联信息集合对象的末尾
      int addRange(LinkItem[] linkItems)
      将指定的多个关联信息对象添加到此关联信息集合的末尾。
      void clear()
      清除当前关联信息集合对象中的所有元素。
      LinkItems clone()
      根据当前对象克隆一个新的 LinkItems 对象。
      void dispose()
      释放该对象所占用的资源。
      LinkItem get(int index)
      返回此关联信息集合对象中指定序号的关联信息对象。
      int getCount()
      返回此关联信息集合对象中所包含的关联信息对象的总数。
      boolean insert(int index, LinkItem linkItem)
      将指定的关联信息对象添加到此关联信息对象集合的指定序号处。
      int insertRange(int index, LinkItem[] linkItems)
      将指定的多个关联信息对象添加到此关联信息对象集合中,从指定的序号开始依次添加。
      boolean remove(int index)
      将此关联信息集合对象中指定序号处的关联信息对象删除。
      int removeRange(int index, int count)
      将此关联信息集合对象中从指定序号开始的指定个数的多个关联信息对象删除。
      void set(int index, LinkItem value)
      设置此关联信息集合对象中指定序号的关联信息对象。
      LinkItem[] toArray()
      将此关联信息集合对象转换成为一个关联信息对象的数组。
      • 从类继承的方法 com.supermap.data.InternalHandleDisposable

        makeSureNativeObjectLive
    • 构造器详细资料

      • LinkItems

        public LinkItems()
        构造一个新的 LinkItems 对象。
      • LinkItems

        public LinkItems(LinkItem[] linkItems)
        根据指定的参数来构造一个 LinkItems 的新对象。
        参数:
        linkItems - 指定的关联信息对象的数组。
      • LinkItems

        public LinkItems(LinkItems linkItems)
        根据给定的 LinkItems 对象构造一个与其完全相同的新对象。
        参数:
        linkItems - 指定的 LinkItems 对象。
    • 方法详细资料

      • getCount

        public int getCount()
        返回此关联信息集合对象中所包含的关联信息对象的总数。
        返回:
        此关联信息集合对象中所包含的关联信息对象的总数。
        默认值:
        默认值为 0。
      • get

        public LinkItem get(int index)
        返回此关联信息集合对象中指定序号的关联信息对象。
        参数:
        index - 指定的序号。
        返回:
        此关联信息集合对象中指定序号的关联信息对象。
      • set

        public void set(int index,
                        LinkItem value)
        设置此关联信息集合对象中指定序号的关联信息对象。
        参数:
        index - 指定的序号。
        value - 此关联信息集合对象中指定序号的关联信息对象。
        另请参阅:
        LinkItems.add(LinkItem)
        示范代码:
        请参见 LinkItems.add() 方法的示例。
      • clone

        public LinkItems clone()
        根据当前对象克隆一个新的 LinkItems 对象。
        覆盖:
        clone 在类中 Object
        返回:
        克隆的 LinkItems 新对象。
      • add

        public int add(LinkItem linkItem)
        将指定的关联信息对象添加到此关联信息集合对象的末尾
        参数:
        linkItem - 要添加的此关联信息集合对象中的关联信息对象。
        返回:
        添加的关联信息对象的序号。
        示范代码:
        以下代码示范在关联信息集合中对关联信息对象的一些操作。
         public void addTest(){
                // 假设已经定义了两个 LinkItem 对象,分别为 item1,item2
                // 以下代码示范在关联信息集合中对 LinkItem 对象的一些操作
                // 构造一个 LinkItems 对象,将 item1 添加到 LinkItems 对象中
                LinkItems linkItems = new LinkItems();
                linkItems.add(item1);
        
                // 清除 LinkItems 对象
                linkItems.clear();
        
                // 使用 addRange() 方法将 item1 和 item2 添加到 LinkItems 对象中
                linkItems.addRange(new LinkItem[] {item1, item2});
        
                // 删除序号为1的对象
                linkItems.remove(1);
        
                // 将 item1 添加到序号为1的位置上
                linkItems.insert(1, item1);
        
                // 设置序号为1的位置对象为 item2
                linkItems.set(1, item2);
            }
         
      • addRange

        public int addRange(LinkItem[] linkItems)
        将指定的多个关联信息对象添加到此关联信息集合的末尾。
        参数:
        linkItems - 要添加的此关联信息集合对象中的多个关联信息对象。
        返回:
        添加的多个关联信息对象的个数。
        另请参阅:
        LinkItems.add(LinkItem)
        示范代码:
        请参见 LinkItems.add() 方法的示例。
      • insert

        public boolean insert(int index,
                              LinkItem linkItem)
        将指定的关联信息对象添加到此关联信息对象集合的指定序号处。
        参数:
        index - 要添加的序号。
        linkItem - 指定要添加的关联信息对象。
        返回:
        添加成功,返回 true;否则,返回 false。
        另请参阅:
        LinkItems.add(LinkItem)
        示范代码:
        请参见 LinkItems.add() 方法的示例。
      • insertRange

        public int insertRange(int index,
                               LinkItem[] linkItems)
        将指定的多个关联信息对象添加到此关联信息对象集合中,从指定的序号开始依次添加。
        参数:
        index - 要添加对象的起始序号。
        linkItems - 要添加多个关联信息对象。
        返回:
        添加的关联信息对象的个数。
      • remove

        public boolean remove(int index)
        将此关联信息集合对象中指定序号处的关联信息对象删除。
        参数:
        index - 要删除的关联信息对象的序号。
        返回:
        删除成功,返回 true;否则返回 false。
        另请参阅:
        LinkItems.add(LinkItem)
        示范代码:
        请参见 LinkItems.add() 方法的示例。
      • removeRange

        public int removeRange(int index,
                               int count)
        将此关联信息集合对象中从指定序号开始的指定个数的多个关联信息对象删除。
        参数:
        index - 删除对象的起始序号。
        count - 要删除的关联信息对象的个数。
        返回:
        删除的关联信息对象的个数。
      • toArray

        public LinkItem[] toArray()
        将此关联信息集合对象转换成为一个关联信息对象的数组。
        返回:
        此关联信息集合对象转换得到的关联信息对象的数组。
      • dispose

        public void dispose()
        释放该对象所占用的资源。当调用该方法之后,此对象不再可用。

Copyright © 2021–2024 SuperMap. All rights reserved.