Class JoinItem
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.JoinItem
-
public class JoinItem extends InternalHandleDisposable
The connection information class.
The JoinItem class is used to define the join information between the vector dataset and the exterior table. The exterior table can be the DBMS table of another vector dataset (including the tabular dataset, which has no geometry field) or the table in a database defined by the user. Note that the vector dataset and the exterior table should exist in the same datasource.
Once the two tables are joined together, you can perform query, mapping and analysis etc. on the exterior table via the main table, here, the vector dataset. When the relationship between two tables is one-to-one or many-to-one, you can use join to connect them, and especially, under many-to-one relationship, it is allowed to specify multiple associations, that is, there can be multiple associated field pairs. The instance of this class can be created.
-
-
Constructor Summary
Constructors Constructor and Description JoinItem()
Constructs a new JoinItem object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
dispose()
Releases the resources that the object occupies.java.lang.String
getForeignTable()
Returns the name of the external table.java.lang.String
getJoinFilter()
Returns the joint expression between the vector dataset and the foreign table, i.e., sets the related fields between the two tables.JoinType
getJoinType()
Returns the join type of the two tables.java.lang.String
getName()
Returns the name of the JoinItem object.void
setForeignTable(java.lang.String value)
Sets the name of the external table.void
setJoinFilter(java.lang.String value)
Sets the joint expression between the vector dataset and the foreign table, i.e., sets the related fields between the two tables.void
setJoinType(JoinType value)
Sets the join type of the two tables.void
setName(java.lang.String value)
Sets the name of this JoinItem object.java.lang.String
toString()
Outputs this JoinItem object to a readable string, the format is {Name="",ForeignTable="",JoinFilter="",JoinType=}.
-
-
-
Method Detail
-
getForeignTable
public java.lang.String getForeignTable()
Returns the name of the external table.- Returns:
- The name of the external table.
- Default:
- The default value is an empty string.
-
setForeignTable
public void setForeignTable(java.lang.String value)
Sets the name of the external table.- Parameters:
value
- The name of the external table.- Example:
- Please refer to the example for the
JoinItem
class.
-
getJoinFilter
public java.lang.String getJoinFilter()
Returns the joint expression between the vector dataset and the foreign table, i.e., sets the related fields between the two tables. For example, let us connect the 'district' field of a region dataset (Building) about housing and the "region" field of an attribute datasets (Owner) about house owners . Names of the two datasets are Table_Building and Table_Owner respectively. The connection expression is Table_Building.district = Table_Owner.region. When multiple fields are connected, please use AND to connect them.- Returns:
- The related fields between the two tables.
- Default:
- The default value is an empty string.
-
setJoinFilter
public void setJoinFilter(java.lang.String value)
Sets the joint expression between the vector dataset and the foreign table, i.e., sets the related fields between the two tables. For example, let us connect the "district" field of a region dataset (Building) about housing and the "region" field of an attribute datasets (Owner) about house owners . Names of the two datasets are Table_Building and Table_Owner respectively. The connection expression is Table_Building.district = Table_Owner.region. When multiple fields are connected, please use AND to connect them.- Parameters:
value
- The related fields between the two tables.- Example:
- Please refer to the example for the
JoinItem
class.
-
getJoinType
public JoinType getJoinType()
Returns the join type of the two tables. Join type is used when performing query on the two joined tables, and will determine which records among the records that meet the query condition will be returned.- Returns:
- The join type between two tables.
- Default:
- The default value is
LEFTJOIN
-
setJoinType
public void setJoinType(JoinType value)
Sets the join type of the two tables. Join type is used when performing query on the two joined tables, and will determine which records among the records that meet the query condition will be returned.- Parameters:
value
- The join type between two tables.- Example:
- Please refer to the example for the
JoinItem
class.
-
getName
public java.lang.String getName()
Returns the name of the JoinItem object.- Returns:
- The name of the JoinItem object.
- Default:
- The default value is "UntitledJoinItem".
-
setName
public void setName(java.lang.String value)
Sets the name of this JoinItem object.- Parameters:
value
- The name of the JoinItem object.- Example:
- Please refer to the example for the
JoinItem
class.
-
dispose
public void dispose()
Releases the resources that the object occupies. This object is no longer available when the method is called.
-
toString
public java.lang.String toString()
Outputs this JoinItem object to a readable string, the format is {Name="",ForeignTable="",JoinFilter="",JoinType=}.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string that of the JoinItem object.
-
-