javax.rad.model.reference
Class ColumnMapping

java.lang.Object
  extended by javax.rad.model.reference.ColumnMapping
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ReferenceDefinition, StorageReferenceDefinition

public class ColumnMapping
extends Object
implements Cloneable, Serializable

The ColumnMapping class is for mapping different column names between referenced tables.

See Also:
Serialized Form

Constructor Summary
ColumnMapping()
          Constructs the ColumnMapping without column names.
ColumnMapping(String[] pColumnNames)
          Constructs the ColumnMapping with the same column names and referenced column names.
ColumnMapping(String[] pColumnNames, String[] pReferencedColumnNames)
          Constructs the ColumnMapping with the different column names and referenced column names.
 
Method Summary
 ColumnMapping clone()
          
 boolean equals(Object pObject)
          
 String[] getColumnNames()
          Gets the source column names of the ColumnMapping.
 String getReferencedColumnName(String pColumnName)
          Gets the corresponding referenced column name to the given column name.
 String[] getReferencedColumnNames()
          Gets the referenced column names of the ReferenceDefinition.
 int hashCode()
          
 void setColumnNames(String[] pColumnNames)
          Sets the source column names of the ColumnMapping.
 void setReferencedColumnNames(String[] pReferencedColumnNames)
          Sets the referenced column names of the ReferenceDefinition.
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnMapping

public ColumnMapping()
Constructs the ColumnMapping without column names.


ColumnMapping

public ColumnMapping(String[] pColumnNames)
Constructs the ColumnMapping with the same column names and referenced column names.

Parameters:
pColumnNames - source column names of the ColumnMapping.

ColumnMapping

public ColumnMapping(String[] pColumnNames,
                     String[] pReferencedColumnNames)
Constructs the ColumnMapping with the different column names and referenced column names. If the referenced column names are null, the are automatically mapped to the same name as the column names.

Parameters:
pColumnNames - source column names of the ColumnMapping.
pReferencedColumnNames - referenced column names of the ColumnMapping.
Method Detail

equals

public boolean equals(Object pObject)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

getColumnNames

public String[] getColumnNames()
Gets the source column names of the ColumnMapping. This function returns never null, at least an empty String[] is returned.

Returns:
the source column names of the ColumnMapping.

setColumnNames

public void setColumnNames(String[] pColumnNames)
Sets the source column names of the ColumnMapping.

Parameters:
pColumnNames - the source column names of the ColumnMapping.

getReferencedColumnNames

public String[] getReferencedColumnNames()
Gets the referenced column names of the ReferenceDefinition. This function returns never null, at least an array with a length greater or equal to the length of the array of getColumnNames is returned.

Returns:
the referenced column names of the ReferenceDefinition.

getReferencedColumnName

public String getReferencedColumnName(String pColumnName)
Gets the corresponding referenced column name to the given column name.

Parameters:
pColumnName - the column name.
Returns:
the referenced column name.

setReferencedColumnNames

public void setReferencedColumnNames(String[] pReferencedColumnNames)
Sets the referenced column names of the ReferenceDefinition.

Parameters:
pReferencedColumnNames - the referenced column names of the ReferenceDefinition.

toString

public String toString()

Overrides:
toString in class Object

clone

public ColumnMapping clone()

Overrides:
clone in class Object


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.