org.knime.core.node.port.database
Class DatabasePortObject

java.lang.Object
  extended by org.knime.core.node.port.database.DatabasePortObject
All Implemented Interfaces:
PortObject

public class DatabasePortObject
extends Object
implements PortObject

Class used as database port object holding a BufferedDataTable and a ModelContentRO to create a database connection.

Author:
Thomas Gabriel, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Field Summary
static PortType TYPE
          Database port type formed PortObjectSpec.class and PortObject.class from this class.
 
Constructor Summary
DatabasePortObject(DatabasePortObjectSpec spec)
          Creates a new database port object.
 
Method Summary
 boolean equals(Object obj)
          
 ModelContentRO getConnectionModel()
           
static PortObject.PortObjectSerializer<DatabasePortObject> getPortObjectSerializer()
          Serializer used to save DatabasePortObject.
 DatabasePortObjectSpec getSpec()
          Get specification to this port object.
 String getSummary()
          Get a short summary of this PortObject.
 JComponent[] getViews()
          The returned views are displayed in the out port view of the referring node.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final PortType TYPE
Database port type formed PortObjectSpec.class and PortObject.class from this class.

Constructor Detail

DatabasePortObject

public DatabasePortObject(DatabasePortObjectSpec spec)
Creates a new database port object.

Parameters:
spec - database port object spec
Throws:
NullPointerException - if one of the arguments is null
Method Detail

getSpec

public DatabasePortObjectSpec getSpec()
Get specification to this port object. That is, the corresponding PortObjectSpec which is used to configure any successor node after execution, e.g. a BufferedDataTable can return a DataTableSpec.

Subclasses should narrow the return type if possible.

Specified by:
getSpec in interface PortObject
Returns:
underlying PortObjectSpec or any derived spec, never null.

getSummary

public String getSummary()
Get a short summary of this PortObject. The return value will be shown in a node port's tooltip, for instance.

Specified by:
getSummary in interface PortObject
Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).

getConnectionModel

public ModelContentRO getConnectionModel()
Returns:
connection model

getPortObjectSerializer

public static PortObject.PortObjectSerializer<DatabasePortObject> getPortObjectSerializer()
Serializer used to save DatabasePortObject.

Returns:
a new database port object serializer

getViews

public JComponent[] getViews()
The returned views are displayed in the out port view of the referring node. Each component is displayed in an extra tab. The name of the component is used as the title for the tab. It is important that no external members are kept in the component so it can be deleted, when the port object is deleted. If the port object has no view return an empty array.

Specified by:
getViews in interface PortObject
Returns:
an array of views for the port object, each displayed as a tab in the out port view

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.