|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.model.RowDefinition
public class RowDefinition
A RowDefinition contains all ColumnDefintion's of a
DataRow.
Example:
// construct a RowDefinition
RowDefinition rdRowDefinition = new RowDefinition();
// construct some ColumnDefinitions
ColumnDefinition cdId = new ColumnDefinition("id");
ColumnDefinition cdName = new ColumnDefinition("name");
rdRowDefinition.addColumnDefinition(cdId);
rdRowDefinition.addColumnDefinition(cdName);
IRowDefinition,
ColumnDefinition,
Serialized Form| Constructor Summary | |
|---|---|
RowDefinition()
|
|
| Method Summary | |
|---|---|
void |
addColumnDefinition(ColumnDefinition pColumnDefinition)
Adds an ColumnDefinition to this IRowDefinition. |
void |
addDataBook(IDataBook rowDefinitionListener)
It register and adds a IDataBook to this IRowDefinition, which uses this IRowDefintion. |
IRowDefinition |
createRowDefinition(String[] pColumnNames)
Returns a cloned IRowDefinition with only a subset of
ColumnDefinitions, specified by a column name String[]. |
int |
getColumnCount()
Returns the column count of this IRowDefintion. |
ColumnDefinition |
getColumnDefinition(int pColumnIndex)
Returns the ColumnDefinition by index. |
ColumnDefinition |
getColumnDefinition(String pColumnName)
Returns the ColumnDefinition by name. |
int |
getColumnDefinitionIndex(String pColumnName)
Returns the index of the ColumnDefinition name of this
IRowDefinition. |
String[] |
getColumnNames()
Returns the String[] of all column names in this IRowDefintion. |
ColumnView |
getColumnView(Class<? extends IControl> pTargetControl)
Returns the column view to use for GUI controls. |
IDataBook[] |
getDataBooks()
It returns the list of IDataBooks corresponding to this IRowDefintion. |
ColumnView |
getDefaultColumnView()
Returns the default table columns names. |
static String[] |
getDefaultIgnoredColumnNames()
Gets the list of columns which are not included in the table columns when no specific table columns are set. |
String[] |
getPrimaryKeyColumnNames()
Returns the String[] of all column names in the primary key. |
String[] |
getReadOnly()
Returns all read only (true) column names. |
void |
removeDataBook(IDataBook rowDefinitionListener)
It removes the DataBook reference to this IRowDefinition, which used this IRowDefintion before. |
void |
setColumnView(Class<? extends IControl> pTargetControl,
ColumnView pColumnView)
Sets the column view to use for GUI controls. |
static void |
setDefaultIgnoredColumnNames(String... pColumnNames)
Sets a list of columns which are excluded from the table columns when no specific table columns are set. |
void |
setPrimaryKeyColumnNames(String[] pColumnNames)
Sets all primary key column names. |
void |
setReadOnly(String[] pColumnNames)
Sets the specified column names as read only true. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RowDefinition()
| Method Detail |
|---|
public void addDataBook(IDataBook rowDefinitionListener)
throws ModelException
addDataBook in interface IRowDefinitionrowDefinitionListener - the IDataBook to add
ModelException - if the xxxColumnsName (eg.xxx=Table) are not existing in the IRowDefinition.public void removeDataBook(IDataBook rowDefinitionListener)
removeDataBook in interface IRowDefinitionrowDefinitionListener - the IDataBook to removepublic IDataBook[] getDataBooks()
getDataBooks in interface IRowDefinition
public IRowDefinition createRowDefinition(String[] pColumnNames)
throws ModelException
IRowDefinition with only a subset of
ColumnDefinitions, specified by a column name String[].
createRowDefinition in interface IRowDefinitionpColumnNames - column names to use
IRowDefinition with only a subset column names
String[].
ModelException - if the IRowDefinition couldn't constructed
public void addColumnDefinition(ColumnDefinition pColumnDefinition)
throws ModelException
ColumnDefinition to this IRowDefinition.ColumnDefinition is only
added in one IRowDefinition. After an IDataBook is registered (at open())
to this IRowDefinition, there is not allowed to add columns.
addColumnDefinition in interface IRowDefinitionpColumnDefinition - the new ColumnDefinition
ModelException - if the ColumnDefinition name already exists or if it already
added to another IRowDefintion or if an IDataBook is registered
(at open()) to the IRowDefinition.
public ColumnDefinition getColumnDefinition(String pColumnName)
throws ModelException
ColumnDefinition by name.
getColumnDefinition in interface IRowDefinitionpColumnName - name of the ColumnDefinition
ColumnDefinition by name.
ModelException - if the ColumnDefinition name not exists.public ColumnDefinition getColumnDefinition(int pColumnIndex)
ColumnDefinition by index.
getColumnDefinition in interface IRowDefinitionpColumnIndex - index of the ColumnDefinition
ColumnDefinition by index.public int getColumnDefinitionIndex(String pColumnName)
ColumnDefinition name of this
IRowDefinition.
getColumnDefinitionIndex in interface IRowDefinitionpColumnName - name of the ColumnDefinition
ColumnDefinition name of this
IRowDefinition, or -1 if it does not exist.public int getColumnCount()
IRowDefintion.
getColumnCount in interface IRowDefinitionIRowDefintion.public String[] getColumnNames()
IRowDefintion.
getColumnNames in interface IRowDefinitionIRowDefintion.public String[] getPrimaryKeyColumnNames()
getPrimaryKeyColumnNames in interface IRowDefinition
public void setPrimaryKeyColumnNames(String[] pColumnNames)
throws ModelException
DataBook or if the DataRow is in use.
setPrimaryKeyColumnNames in interface IRowDefinitionpColumnNames - the new String[] with the column names to set the primary key
ModelException - if an IDataBook already registered (at open()) to this
IRowdDefinition.public ColumnView getColumnView(Class<? extends IControl> pTargetControl)
getColumnView in interface IRowDefinitionpTargetControl - the type of target class.
public void setColumnView(Class<? extends IControl> pTargetControl,
ColumnView pColumnView)
throws ModelException
setColumnView in interface IRowDefinitionpTargetControl - the type of target class.pColumnView - the column view to use for GUI controls.
ModelException - if the xxxColumnsName (eg.xxx=Table) are not existing in the IRowDefinition.
public void setReadOnly(String[] pColumnNames)
throws ModelException
setReadOnly in interface IRowDefinitionpColumnNames - the column names to use. if null or empty, then all columns are used.
ModelException - if one column name doesn't exist.public String[] getReadOnly()
getReadOnly in interface IRowDefinitionpublic String toString()
toString in class Objectpublic ColumnView getDefaultColumnView()
public static void setDefaultIgnoredColumnNames(String... pColumnNames)
pColumnNames - a list of column names to ignorepublic static String[] getDefaultIgnoredColumnNames()
setDefaultIgnoredColumnNames(String...)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||