Package com.netrics.likeit
Class NetricsJoin
- java.lang.Object
-
- com.netrics.likeit.NetricsJoin
-
- All Implemented Interfaces:
java.io.Serializable
public class NetricsJoin extends java.lang.Object implements java.io.Serializable
This class is used to define a join relationship for a Patterns search. See the discussion of joined searches in the ibi™ Patterns - Search Concepts Guide for more information on how to use a joined search.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
JOIN_ALL_RECORD_TYPES
All records are returned: Complete, records with missing child records and orphan child records.static int
JOIN_FULL_AND_ORPHANS
Complete records, or orphan child records are returned.static int
JOIN_FULL_AND_PARTIALS
Complete records, or records with one or more missing child records are returned.static int
JOIN_FULL_RECORDS_ONLY
Only complete records, with no missing child records, are returned.
-
Constructor Summary
Constructors Constructor Description NetricsJoin(java.lang.String parent_tbl, int join_type, boolean multi_parent)
Create a NetricsJoin object for searching related tables in a ibi™ Patterns - Search Server.NetricsJoin(java.lang.String parent_tbl, int join_type, boolean multi_parent, java.lang.String[] aliases, java.lang.String[] child_tables)
Create a NetricsJoin object for searching related tables in a ibi™ Patterns - Search Server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(java.lang.String alias, java.lang.String table_name)
Add a child table to a NetricsJoin specification.
-
-
-
Field Detail
-
JOIN_FULL_RECORDS_ONLY
public static final int JOIN_FULL_RECORDS_ONLY
Only complete records, with no missing child records, are returned.- See Also:
- Constant Field Values
-
JOIN_FULL_AND_PARTIALS
public static final int JOIN_FULL_AND_PARTIALS
Complete records, or records with one or more missing child records are returned.- See Also:
- Constant Field Values
-
JOIN_FULL_AND_ORPHANS
public static final int JOIN_FULL_AND_ORPHANS
Complete records, or orphan child records are returned.- See Also:
- Constant Field Values
-
JOIN_ALL_RECORD_TYPES
public static final int JOIN_ALL_RECORD_TYPES
All records are returned: Complete, records with missing child records and orphan child records.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NetricsJoin
public NetricsJoin(java.lang.String parent_tbl, int join_type, boolean multi_parent, java.lang.String[] aliases, java.lang.String[] child_tables) throws java.lang.IllegalArgumentException
Create a NetricsJoin object for searching related tables in a ibi™ Patterns - Search Server.- Parameters:
parent_tbl
- Name of the parent table. Required.join_type
- One of JOIN_FULL_RECORDS_ONLY, JOIN_FULL_AND_PARTIALS, JOIN_FULL_AND_ORPHANS, or JOIN_ALL_RECORD_TYPES.multi_parent
- If true, each record from the parent table may have multiple combinations returned in a search result set. If false, only the one best match for each parent record is returned.aliases
- Aliases for child tables. Required if a child table is specified more than once, otherwise optional. If present, it must be the same length as child_tables. All alias names must be unique and may not be the same as the parent table name or a child table name that appears in a different location.child_tables
- Names of child tables. These must be children of the parent_tbl. Required. Additional child tables and aliases may be specified using addChild().- Throws:
java.lang.IllegalArgumentException
-
NetricsJoin
public NetricsJoin(java.lang.String parent_tbl, int join_type, boolean multi_parent) throws java.lang.IllegalArgumentException
Create a NetricsJoin object for searching related tables in a ibi™ Patterns - Search Server. This creates an incomplete join specification. The addChild method must be called to add one or more child tables before this join specification can be used in a search.- Parameters:
parent_tbl
- Name of the parent table. Required.join_type
- One of JOIN_FULL_RECORDS_ONLY, JOIN_FULL_AND_PARTIALS, JOIN_FULL_AND_ORPHANS, or JOIN_ALL_RECORD_TYPES.multi_parent
- If true, each record from the parent table may have multiple combinations returned in a search result set. If false, only the one best match for each parent record is returned.- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
addChild
public void addChild(java.lang.String alias, java.lang.String table_name) throws NetricsException
Add a child table to a NetricsJoin specification.- Parameters:
alias
- Alias for the child table. Required if an alias has already been used in this NetricsJoin, or if a child table is used multiple times. This can't be used if a child table has already been added without an alias.table_name
- Name of the child table. Required.- Throws:
NetricsException
- if the alias assignment does not match the construction of this NetricsJoin object.
-
-