com.supermap.data
Class JoinItems
- java.lang.Object
-
- com.supermap.data.JoinItems
-
public class JoinItems extends java.lang.Object
The connection information class.
When a vector dataset is connected to multiple external tables, it uses a connection information collection object to manage all of its connection information objects.
-
-
Constructor Summary
Constructors Constructor and Description JoinItems()
Constructs a new JoinItems object.JoinItems(JoinItem[] joinItems)
Creates a new JoinItems object according to the specified arguments.JoinItems(JoinItems joinItems)
Constructs a new object identical to the given JoinItems object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
add(JoinItem joinItem)
Adds the specified JoinItem object to the end of this JoinItems object.int
addRange(JoinItem[] joinItems)
Adds the specified multiple JoinItem objects to the end of this JoinItems object.void
clear()
Clears all the JoinItem objects in this JoinItems object.JoinItems
clone()
Returns a copy of the current JoinItems object.void
dispose()
Releases the resources that the object occupies.JoinItem
get(int index)
Returns the JoinItem object at the specified index in this JoinItems object.int
getCount()
Returns the count of JoinItem objects in this JoinItems object.boolean
insert(int index, JoinItem joinItem)
Adds the specified JoinItem object to the specified index in this JoinItems object.int
insertRange(int index, JoinItem[] joinItems)
Adds the specified multiple JoinItem object to this JoinItems object starting from the specified index.boolean
remove(int index)
Removes the JoinItem object with the specified index from this JoinItems object.int
removeRange(int index, int count)
Removes the specified count of JoinItem objects starting from the specified the index.void
set(int index, JoinItem value)
Sets the JoinItem object at the specified index in this JoinItems object.JoinItem[]
toArray()
Converts this JoinItems object to an array of the JoinItem objects.
-
-
-
Constructor Detail
-
JoinItems
public JoinItems()
Constructs a new JoinItems object.
-
JoinItems
public JoinItems(JoinItem[] joinItems)
Creates a new JoinItems object according to the specified arguments.- Parameters:
joinItems
- Specifies the array of connection information objects.
-
JoinItems
public JoinItems(JoinItems joinItems)
Constructs a new object identical to the given JoinItems object.- Parameters:
joinItems
- The specified JoinItems object.
-
-
Method Detail
-
getCount
public int getCount()
Returns the count of JoinItem objects in this JoinItems object.- Returns:
- The count of JoinItem objects in this JoinItems object.
- Default:
- The default value is 0.
-
get
public JoinItem get(int index)
Returns the JoinItem object at the specified index in this JoinItems object.- Parameters:
index
- The specified index number.- Returns:
- The JoinItem object at the specified index in this JoinItems object.
-
set
public void set(int index, JoinItem value)
Sets the JoinItem object at the specified index in this JoinItems object.- Parameters:
index
- The specified index number.value
- The JoinItem object at the specified index in this JoinItems object.- See Also:
add(JoinItem)
- Example:
- See the sample of
JoinItems.add()
method.
-
clone
public JoinItems clone()
Returns a copy of the current JoinItems object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- The new JoinItems object generated from the clone operation.
-
add
public int add(JoinItem joinItem)
Adds the specified JoinItem object to the end of this JoinItems object.- Parameters:
joinItem
- The JoinItem object to be added to this JoinItems object.- Returns:
- The index of the added JoinItem object.
- Example:
- The following example demonstrates some operations on the JoinItems object.
public void addTest(){ // Supposes there are three defined JoinItem objects: item1, item2, item3 // Initialize the object of connection information collection JoinItems joinItems = new JoinItems(); // Adds item1 to the end of items joinItems.add(item1); // Adds item2 and item3 to the end of items joinItems.addRange(new JoinItem[] {item2, item3}); // Deletes the first JoinItem object joinItems.remove(0); // Adds item1 to the second location joinItems.insert(1, item1); // Clears items object joinItems.clear(); // Inserts item2, item3, item1 into the head of items joinItems.insertRange(0, new JoinItem[] {item2, item3, item1}); // Sets the third item of items is item1 joinItems.set(2, item1); // Releases resources joinItems.dispose(); }
-
addRange
public int addRange(JoinItem[] joinItems)
Adds the specified multiple JoinItem objects to the end of this JoinItems object.- Parameters:
joinItems
- The JoinItem object to be added to this JoinItems object.- Returns:
- The count of added JoinItem objects.
- See Also:
add(JoinItem)
- Example:
- See the sample of
JoinItems.add()
method.
-
insert
public boolean insert(int index, JoinItem joinItem)
Adds the specified JoinItem object to the specified index in this JoinItems object.- Parameters:
index
- The index to which the JoinItem object will be added.joinItem
- The JoinItem object to be added.- Returns:
- Add success, return true; otherwise, it returns false.
- See Also:
add(JoinItem)
- Example:
- See the sample of
JoinItems.add()
method.
-
insertRange
public int insertRange(int index, JoinItem[] joinItems)
Adds the specified multiple JoinItem object to this JoinItems object starting from the specified index.- Parameters:
index
- Add the start number of the object.joinItems
- The JoinItem object array to be added.- Returns:
- The number of connection information objects added.
- See Also:
add(JoinItem)
- Example:
- See the sample of
JoinItems.add()
method.
-
remove
public boolean remove(int index)
Removes the JoinItem object with the specified index from this JoinItems object.- Parameters:
index
- The number of the connection information object to be deleted.- Returns:
- Returns true if successful, false otherwise.
- See Also:
add(JoinItem)
- Example:
- See the example of the
JoinItems.add()
method.
-
removeRange
public int removeRange(int index, int count)
Removes the specified count of JoinItem objects starting from the specified the index.- Parameters:
index
- Delete the start sequence of the object.count
- The number of connection information objects to be deleted.- Returns:
- The number of deleted connection information objects.
-
clear
public void clear()
Clears all the JoinItem objects in this JoinItems object.- See Also:
add(JoinItem)
- Example:
- See the example of the
JoinItems.add()
method.
-
toArray
public JoinItem[] toArray()
Converts this JoinItems object to an array of the JoinItem objects.- Returns:
- This connection information sets the object to an array of connected information objects.
-
dispose
public void dispose()
Releases the resources that the object occupies. This object is no longer available when the method is called.
-
-