Style Intelligence v12.0

inetsoft.report
Class ColumnMatching

java.lang.Object
  extended by inetsoft.report.ColumnMatching
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class ColumnMatching
extends Object
implements Serializable, Cloneable, inetsoft.util.XMLSerializable

Define a column width matching to another table.

See Also:
Serialized Form

Constructor Summary
ColumnMatching()
          Create an empty object.
ColumnMatching(String elemid)
          Create a column mapping to another table element.
 
Method Summary
 void addEntry(int[] cols, int[] targetCols)
          Add an entry to the column mapping.
 Object clone()
          Make a copy of the object.
 int[] getColumns(int idx)
          Get the columns of the current table in the mapping.
 int getEntryCount()
          Get the number of mapping entries.
 String getTableElementID()
          Get the target element ID.
 int[] getTargetColumns(int idx)
          Get the columns of the target table in the mapping.
 void parseXML(Element tag)
          Method to parse an xml segment.
 void removeAllEntries()
          Remove all mapping entries.
 void removeEntry(int idx)
          Delete the specified entry.
 void setTableElementID(String id)
          Set the target element ID.
 void validate()
          Check if the column mapping are in proper order.
 void writeXML(PrintWriter writer)
          Write the xml segment to print writer.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnMatching

public ColumnMatching()
Create an empty object. The table element id must be set.


ColumnMatching

public ColumnMatching(String elemid)
Create a column mapping to another table element. If the specific column mapping is not set, the default is a sequential mapping.

Parameters:
elemid - table element id.
Method Detail

getTableElementID

public String getTableElementID()
Get the target element ID.


setTableElementID

public void setTableElementID(String id)
Set the target element ID.

Parameters:
id - target table element ID.

getEntryCount

public int getEntryCount()
Get the number of mapping entries.


addEntry

public void addEntry(int[] cols,
                     int[] targetCols)
Add an entry to the column mapping. The new entry will be inserted at a position so the list is properly sorted. All existing entries that overlaps the new entry will be removed.

Parameters:
cols - columns in the source table.

removeEntry

public void removeEntry(int idx)
Delete the specified entry.


removeAllEntries

public void removeAllEntries()
Remove all mapping entries.


getColumns

public int[] getColumns(int idx)
Get the columns of the current table in the mapping.

Parameters:
idx - index of the mapping entry.

getTargetColumns

public int[] getTargetColumns(int idx)
Get the columns of the target table in the mapping.

Parameters:
idx - index of the mapping entry.

validate

public void validate()
              throws Exception
Check if the column mapping are in proper order.

Throws:
throws - exception if the mapping is not valid.
Exception

clone

public Object clone()
Make a copy of the object.

Overrides:
clone in class Object

writeXML

public void writeXML(PrintWriter writer)
Write the xml segment to print writer.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Parameters:
writer - the destination print writer.

parseXML

public void parseXML(Element tag)
              throws Exception
Method to parse an xml segment.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.