com.crystaldecisions.sdk.occa.report.data
Class Tables

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by com.crystaldecisions.sdk.occa.report.lib.ClonableList<E>
                  extended by com.crystaldecisions.sdk.occa.report.lib.ControllableList<E>
                      extended by com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector<ITable>
                          extended by com.crystaldecisions.sdk.occa.report.data.Tables
All Implemented Interfaces:
IClone, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<ITable>, java.util.Collection<ITable>, java.util.List<ITable>, java.util.RandomAccess

public class Tables
extends ReportSDKVector<ITable>
implements IClone

This class defines a collection of database tables. The tables may belong to separate databases.

See Also:
Serialized Form

Constructor Summary
Tables()
          Constructor for the Tables class.
Tables(Tables src)
          Constructor that creates a copy of a table.
 
Method Summary
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
           For internal use only.
 void endElement(java.lang.String eleName, java.util.Map objState)
           For internal use only.
 int findByAlias(java.lang.String aliasName)
           Returns the index of the table with the given alias.
 ITable findTableByAlias(java.lang.String aliasName)
           Returns a table with the given alias.
 ITable getTable(int index)
           Returns the table at a specified index.
 boolean isDirectlyControllable()
           
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
           For internal use only.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, java.lang.String sTag, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
           For internal use only.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
           For internal use only.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector
add, add, addElement, elementAt, insertElementAt, removeAllElements
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ControllableList
addAll, addAll, clear, copyTo, doControllerModification, enumerateMembers, getControllableMixin, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ClonableList
clone, findIndexOf, hasContent
 
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode
 

Constructor Detail

Tables

public Tables(Tables src)
Constructor that creates a copy of a table.

Parameters:
src - the table to copy

Tables

public Tables()
Constructor for the Tables class.

Method Detail

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.

Overrides:
createMember in class ClonableList<ITable>

endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)

For internal use only.

Overrides:
endElement in class ClonableList<ITable>

findByAlias

public int findByAlias(java.lang.String aliasName)

Returns the index of the table with the given alias. If the table is not found, this method returns -1.

Parameters:
aliasName - the alias of the table
Returns:
the index of the table, or -1 if the table is not found

findTableByAlias

public ITable findTableByAlias(java.lang.String aliasName)

Returns a table with the given alias.

Example: finding the index of the "Customers" table

 IDatabase database = clientDoc.getDatabaseController().getDatabase();
 Tables tables = database.getTables();
 ITable table = tables.findTableByAlias("Customers");
 

Parameters:
aliasName - the alias of the table
Returns:
the table, or null if the table is not found

getTable

public ITable getTable(int index)

Returns the table at a specified index.

Parameters:
index - the index of the table
Returns:
the table at the specified index

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)

For internal use only.

Overrides:
readElement in class ClonableList<ITable>

save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class ClonableList<ITable>
Throws:
java.io.IOException

save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 java.lang.String sTag,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class ClonableList<ITable>
Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException

For internal use only.

Overrides:
saveContents in class ClonableList<ITable>
Throws:
java.io.IOException

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)

For internal use only.

Overrides:
startElement in class ClonableList<ITable>

isDirectlyControllable

public boolean isDirectlyControllable()
Overrides:
isDirectlyControllable in class ReportSDKVector<ITable>