javax.rad.model.reference
Class StorageReferenceDefinition

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

public class StorageReferenceDefinition
extends ColumnMapping

The StorageReferenceDefinition specifies the relation between a detail IStorage and the master IStorage.
It also can be used as "server side" binding between a drop down list (with an list of items to choose from) and the corresponding "master" DataBook to write the defined item (e.g. PrimaryKey columns to ForeignKey columns) back to it.

Example:

 
 StorageReferenceDefinition bdDETAILtoTEST = new StorageReferenceDefinition();
 bdDETAILtoTEST.setReferencedStorage("test");
 bdDETAILtoTEST.setReferencedColumns(new String [] { "ID" });
 bdDETAILtoTEST.setColumns(new String [] { "TEST_ID" });
 
 

See Also:
Serialized Form

Constructor Summary
StorageReferenceDefinition()
          Constructs the StorageReferenceDefinition without parameters.
StorageReferenceDefinition(String[] pColumnNames, String pReferencedStorage, String[] pReferencedColumnNames)
          Constructs the StorageReferenceDefinition with the specified parameters.
 
Method Summary
 boolean equals(Object pObject)
          
 String getReferencedStorage()
          Returns the "name" of the referenced (master) IStorage of the StorageReferenceDefinition.
 int hashCode()
          
 void setReferencedStorage(String pReferencedStorage)
          Sets the "name" of referenced IStorage of the StorageReferenceDefinition.
 String toString()
          
 
Methods inherited from class javax.rad.model.reference.ColumnMapping
clone, getColumnNames, getReferencedColumnName, getReferencedColumnNames, setColumnNames, setReferencedColumnNames
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StorageReferenceDefinition

public StorageReferenceDefinition()
Constructs the StorageReferenceDefinition without parameters.


StorageReferenceDefinition

public StorageReferenceDefinition(String[] pColumnNames,
                                  String pReferencedStorage,
                                  String[] pReferencedColumnNames)
                           throws ModelException
Constructs the StorageReferenceDefinition with the specified parameters.

Parameters:
pReferencedStorage - the "name" of referenced IStorage of the StorageReferenceDefinition
pReferencedColumnNames - the referenced column names to use in this StorageReferenceDefinition
pColumnNames - the source column names to use in this StorageReferenceDefinition
Throws:
ModelException - if one the parameters is null or empty
Method Detail

toString

public String toString()

Overrides:
toString in class ColumnMapping

equals

public boolean equals(Object pObject)

Overrides:
equals in class ColumnMapping

hashCode

public int hashCode()

Overrides:
hashCode in class ColumnMapping

setReferencedStorage

public void setReferencedStorage(String pReferencedStorage)
Sets the "name" of referenced IStorage of the StorageReferenceDefinition.

Parameters:
pReferencedStorage - the "name" of the referenced (master) IStorage

getReferencedStorage

public String getReferencedStorage()
Returns the "name" of the referenced (master) IStorage of the StorageReferenceDefinition.

Returns:
the "name" of the referenced (master) IStorage of the StorageReferenceDefinition.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.