|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.model.reference.ColumnMapping
javax.rad.model.reference.ReferenceDefinition
public class ReferenceDefinition
The ReferenceDefinition
specifies the relation between a detail
DataBook
and the master DataBook
.
It also can be used as 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:
ReferenceDefinition bdDETAILtoTEST = new ReferenceDefinition();
bdDETAILtoTEST.setReferencedDataBook(dbDataBook);
bdDETAILtoTEST.setReferencedColumns(new String [] { "ID" });
bdDETAILtoTEST.setColumns(new String [] { "TEST_ID" });
DataBook dbDataBook = new DataBook();
dbDataBook.setDataSource(dba);
dbDataBook.setName("TEST");
DataBook dbDetail = new DataBook();
dbDetail.setDataSource(dba);
dbDetail.setName("DETAIL");
dbDetail.setMasterReference(bdDETAILtoTEST);
dbDetail.open();
dbDataBook.open();
RemoteDataBook
,
Serialized FormConstructor Summary | |
---|---|
ReferenceDefinition()
Constructs the ReferenceDefinition without parameters. |
|
ReferenceDefinition(String[] pColumnNames,
IDataBook pReferencedDataBook,
String[] pReferencedColumnNames)
Constructs the ReferenceDefinition with the specified parameters. |
Method Summary | |
---|---|
IDataBook |
getReferencedDataBook()
Returns the referenced (master) IDataBook of the ReferenceDefinition . |
void |
setColumnNames(String[] pColumnNames)
Sets the source (detail) ColumnDefinition 's to use in this
ReferenceDefinition . |
void |
setConnected()
Sets the ReferenceDefinition connected to the source
IDataBook . |
void |
setReferencedColumnNames(String[] pReferencedColumnNames)
Sets the referenced (master) column names to use in this ReferenceDefinition . |
void |
setReferencedDataBook(IDataBook pReferencedDataBook)
Sets the referenced IDataBook of the ReferenceDefinition . |
String |
toString()
|
Methods inherited from class javax.rad.model.reference.ColumnMapping |
---|
clone, equals, getColumnNames, getReferencedColumnName, getReferencedColumnNames, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReferenceDefinition()
ReferenceDefinition
without parameters.
public ReferenceDefinition(String[] pColumnNames, IDataBook pReferencedDataBook, String[] pReferencedColumnNames) throws ModelException
ReferenceDefinition
with the specified parameters.
pColumnNames
- the source column names to use in this ReferenceDefinition
pReferencedDataBook
- the referenced IDataBook
of the ReferenceDefinition
pReferencedColumnNames
- the referenced column names to use in this ReferenceDefinition
ModelException
- if one the parameters is null or emptyMethod Detail |
---|
public String toString()
toString
in class ColumnMapping
public void setReferencedDataBook(IDataBook pReferencedDataBook)
IDataBook
of the ReferenceDefinition
.
pReferencedDataBook
- the referenced (master) IDataBook
public IDataBook getReferencedDataBook()
IDataBook
of the ReferenceDefinition
.
IDataBook
of the ReferenceDefinition
.public void setReferencedColumnNames(String[] pReferencedColumnNames)
ReferenceDefinition
.
setReferencedColumnNames
in class ColumnMapping
pReferencedColumnNames
- the referenced (master) column names to usepublic void setColumnNames(String[] pColumnNames)
ColumnDefinition
's to use in this
ReferenceDefinition
.
setColumnNames
in class ColumnMapping
pColumnNames
- the source (detail) column namespublic void setConnected()
ReferenceDefinition
connected to the source
IDataBook
. Internal use only!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |