|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpt.moredata.dataentry.core.AbstractDataEntry
AbstractDataEntry.java Company MoreData
FormDataEntry,
GriddDataEntry,
Serialized Form| Field Summary | |
protected java.util.List |
_components
Lista de componentes da entrada de dados. |
protected DAOView |
_daoView
DAOView usado para popular esta entrada de dados. |
protected java.util.Hashtable |
_map
Mapeamento entre o nome de uma coluna da tabela e um componente. |
protected boolean |
_queryAllowed
Indica se a entrada de dados permite que sejam efectuadas pesquisas. |
protected static java.lang.String |
ACTION_EVENT_KEY
|
static int |
AFTER_ACTION_EVENT
|
static int |
BEFORE_ACTION_EVENT
|
protected static java.lang.String |
MODE_CHANGED_EVENT_KEY
|
protected static java.lang.String |
RECORD_DELETED_EVENT_KEY
|
protected static java.lang.String |
RECORD_INSERTED_EVENT_KEY
|
protected static java.lang.String |
RECORD_MODIFIED_EVENT_KEY
|
| Fields inherited from interface pt.moredata.dataentry.DataEntry |
INSERT_MODE, QUERY_MODE, READ_MODE, UPDATE_MODE |
| Constructor Summary | |
AbstractDataEntry(java.lang.String dataEntryName)
Creates a new instance of AbstractDataEntry |
|
| Method Summary | |
void |
addActionListener(ActionListener listener)
Adiciona um actionListener. |
void |
addActionMapping(java.lang.String commandName,
java.lang.String className)
Add a new Action mapping for a giveen command. |
void |
addComponent(DataEntryComponent component)
Adiciona uma relacao entre uma coluna da tabela com um campo da entrada de dados. |
void |
addModeChangedListener(ModeChangedListener listener)
Adiciona um ModeChangedListener. |
void |
addRecordDeletedListener(RecordDeletedListener listener)
Adiciona um RecordDeletedListener. |
void |
addRecordInsertedListener(RecordInsertedListener listener)
Adiciona um RecordInsertedListener. |
void |
addRecordModifiedListener(RecordModifiedListener listener)
Adiciona um RecordModifiedListener. |
void |
cleanUp()
Clean up the DataEntry, removing all listeners added to other objects. |
protected void |
fireDataEntryEvent(DataEntryEvent event)
Dispara a ocorrencia de um evento DataEntryEvent para os listeners registados. |
java.lang.String |
getClassNameForAction(java.lang.String commandName)
Returns the name of the class that implements a Action for a giveen command. |
protected java.lang.String |
getColumnName(int columnNumber)
Devolve o nome de uma coluna de um componente com determinado index. |
protected int |
getColumnNumber(java.lang.String componentName)
Devolve o index de um componente associado a uma coluna com um determinado nome. |
DataEntryComponent |
getComponent(int index)
Devolve um determinado componente da entrada de dados. |
DataEntryComponent |
getComponent(java.lang.String componentName)
Devolve um determinado componente da entrada de dados. |
java.util.Iterator |
getComponents()
Devolve um iterador com todos os componentes da entrada de dados. |
int |
getComponentsCount()
Devolve o numero de componentes da entrada de dados. |
java.util.Iterator |
getComponentsNames()
Devolve um iterador para o nome dos componentes da entrade dados. |
int |
getCurrentRow()
Devolve o index do registo que se encontra selecionado na entrada de dados. |
DAOManager |
getDAOManager()
Getter for property daoManager. |
DAOView |
getDAOView()
Getter for property _daoView. |
java.lang.Object |
getFieldValue(java.lang.String componentName)
Devolve o valor guardado num determinado campo visual da entrada de dados. |
int |
getMode()
Devolve o modo em que se encontra a entrada de dados. |
java.lang.String |
getName()
Getter for the DataEntry name. |
java.lang.Object |
getProperty(java.lang.Object key)
Devolve o valor de um determinado atributo da entrada de dados. |
boolean |
isColumn(java.lang.String componentName)
Check if a column name is part of the DataEntry columns. |
boolean |
isColumn(java.lang.String tableName,
java.lang.String columnName)
Check if exists any component with the columnName and table name. |
boolean |
isModified()
Verifica se a algum registo da entrada de dados se encontra modificado. |
boolean |
isModified(int rowNumber)
Verifica se um determinado registo se encontra modificado na entrada de dados. |
boolean |
isModified(int rowNumber,
java.lang.String componentName)
Verifica se uma determinada coluna de um determinado registo se encontra modificado na entrada de dados. |
boolean |
isNavigable()
Indica se e possivel navegar atraves dos varios registos da entrada de dados. |
boolean |
isQueryAllowed()
Indica se a entrada de dados permite ou nao a realizacao de pesquisas. |
void |
loadDataFromDAOView()
Carrega na entrada de dados todas as linhas tal como foram lidas do DataSource. |
void |
refreshComponentsData()
Actualiza os valores dos componentes da entrada de dados com os dados que tinham da ultima vez que estiveram visiveis na entrada de dados. |
void |
refreshComponentsData(int rowNumber)
Actualiza os valores dos componentes da entrada de dados com os dados que uma determinada linha tinha da ultima vez que essa linha se encontrava visivel na entrada de dados. |
void |
removeActionListener(ActionListener listener)
Remove um ActionListener. |
void |
removeAllRows()
Remove todas as linhas da entrada de dados. |
void |
removeModeChangedListener(ModeChangedListener listener)
Remove um ModeChangedListener. |
void |
removeRecordDeletedListener(RecordDeletedListener listener)
Remove um RecordDeletedListener. |
void |
removeRecordInsertedListener(RecordInsertedListener listener)
Remove um RecordInsertedListener. |
void |
removeRecordModifiedListener(RecordModifiedListener listener)
Remove um RecordModifiedListener. |
void |
saveComponentsData()
Salvaguarda os valores armazenados nos componente tornando possivel a sua recuperacao atraves dos metodos refreshComponentsData() ou refreshComponentsData(int). |
void |
saveComponentsData(int rowNumber)
Salvaguarda os valores armazenados nos componente tornando possivel a sua recuperacao atraves dos metodos refreshComponentsData() ou refreshComponentsData(int). |
void |
setCurrentRow(int rowNumber)
Altera o index do registo que se encontra selecionado na entrada de dados. |
void |
setDAOManager(DAOManager daoManager)
Setter for property daoManager. |
void |
setDAOView(DAOView daoView)
Setter for property _daoView. |
void |
setMode(int mode)
Altera o modo em que se encontra a entrada de dados. |
void |
setNavigable(boolean isNavigable)
Activa ou desactiva a navegacao pelos registos da entrada de dados. |
void |
setProperty(java.lang.Object key,
java.lang.Object obj)
Guarda um determinado atributo na entrada de dados. |
void |
setQueryAllowed(boolean queryAllowed)
Activa ou desactiva a possibilidade de se realizar pesquisas na entrada de dados. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface pt.moredata.dataentry.DataEntry |
getFieldValue, getFieldValue, getRows, insertNewRow, loadDataFromDAOView, removeRow, setFieldValue |
| Field Detail |
protected static final java.lang.String RECORD_INSERTED_EVENT_KEY
protected static final java.lang.String RECORD_DELETED_EVENT_KEY
protected static final java.lang.String RECORD_MODIFIED_EVENT_KEY
protected static final java.lang.String MODE_CHANGED_EVENT_KEY
protected static final java.lang.String ACTION_EVENT_KEY
public static final int BEFORE_ACTION_EVENT
public static final int AFTER_ACTION_EVENT
protected java.util.List _components
protected java.util.Hashtable _map
protected transient DAOView _daoView
protected boolean _queryAllowed
| Constructor Detail |
public AbstractDataEntry(java.lang.String dataEntryName)
dataEntryName - The DataEntry name.| Method Detail |
protected void fireDataEntryEvent(DataEntryEvent event)
event - O evento a disparar.
protected java.lang.String getColumnName(int columnNumber)
throws java.lang.IndexOutOfBoundsException
columnNumber - O index do componente.
java.lang.IndexOutOfBoundsException
protected int getColumnNumber(java.lang.String componentName)
throws NoFieldMappedToColumnException
componentName - The name of the DataEntryComponent.
NoFieldMappedToColumnException
public void addComponent(DataEntryComponent component)
throws InvalidComponentException,
DuplicateComponentException
addComponent in interface DataEntrycomponent - The feature to be added to the VisualField attribute.
InvalidComponentException - Se a relação já existir.
DuplicateComponentException - Se o componente não for do tipo
FormDataEntryComponent.public java.util.Iterator getComponents()
getComponents in interface DataEntry
public DataEntryComponent getComponent(int index)
throws java.lang.IndexOutOfBoundsException
getComponent in interface DataEntryindex - O index do componente a devolver.
java.lang.IndexOutOfBoundsException - Se o index for superior ao numero de
componentes.
public DataEntryComponent getComponent(java.lang.String componentName)
throws NoFieldMappedToColumnException
getComponent in interface DataEntrycomponentName - The name of the DataEntryComponent.
NoFieldMappedToColumnException - If there is no component associated
to the giveen column name.public int getComponentsCount()
getComponentsCount in interface DataEntrypublic java.util.Iterator getComponentsNames()
getComponentsNames in interface DataEntrypublic void cleanUp()
cleanUp in interface DataEntrypublic boolean isColumn(java.lang.String componentName)
isColumn in interface DataEntrycomponentName - The name of the DataEntryComponent.
public boolean isColumn(java.lang.String tableName,
java.lang.String columnName)
isColumn in interface DataEntrytableName - The component tableName or table alias.columnName - The component columnName.
public java.lang.String getName()
getName in interface DataEntrypublic java.lang.Object getProperty(java.lang.Object key)
getProperty in interface DataEntrykey - Nome chave do atributo pretendido.
public void setProperty(java.lang.Object key,
java.lang.Object obj)
setProperty in interface DataEntrykey - Nome chave do atributo pretendido.obj - Atributo a guardar na entrada de dados.public int getCurrentRow()
getCurrentRow in interface DataEntrypublic void setCurrentRow(int rowNumber)
setCurrentRow in interface DataEntryrowNumber - O novo numero da linha selecionada na entrada de dados.public java.lang.Object getFieldValue(java.lang.String componentName)
getFieldValue in interface DataEntrycomponentName - The name of the DataEntryComponent.
public int getMode()
getMode in interface DataEntrypublic void setMode(int mode)
setMode in interface DataEntrymode - O novo modo da entrada de dados.public void setDAOView(DAOView daoView)
setDAOView in interface DataEntrydaoView - The new daoView valuepublic DAOView getDAOView()
getDAOView in interface DataEntry
public boolean isModified(int rowNumber,
java.lang.String componentName)
isModified in interface DataEntryrowNumber - Numero do registo.componentName - The name of the DataEntryComponent.
public boolean isModified(int rowNumber)
isModified in interface DataEntryrowNumber - Numero do registo.
public boolean isModified()
isModified in interface DataEntrypublic boolean isNavigable()
isNavigable in interface DataEntrypublic void setNavigable(boolean isNavigable)
setNavigable in interface DataEntryisNavigable - True para permitir a navesação na entrada de dados,
false caso contrario.public void loadDataFromDAOView()
loadDataFromDAOView in interface DataEntrypublic void refreshComponentsData()
refreshComponentsData in interface DataEntrypublic void refreshComponentsData(int rowNumber)
refreshComponentsData in interface DataEntryrowNumber - Linha da entrada de dados.public void saveComponentsData()
saveComponentsData in interface DataEntrypublic void saveComponentsData(int rowNumber)
saveComponentsData in interface DataEntryrowNumber - Numero da linha da entrada de dados que deve ser
salvaguardada.public void addRecordModifiedListener(RecordModifiedListener listener)
addRecordModifiedListener in interface DataEntrylistener - O listener a adicionar.public void addRecordInsertedListener(RecordInsertedListener listener)
addRecordInsertedListener in interface DataEntrylistener - O listener a adicionar.public void addRecordDeletedListener(RecordDeletedListener listener)
addRecordDeletedListener in interface DataEntrylistener - O listener a adicionar.public void addModeChangedListener(ModeChangedListener listener)
addModeChangedListener in interface DataEntrylistener - O listener a adicionar.public void addActionListener(ActionListener listener)
addActionListener in interface DataEntrylistener - O listener a adicionar.public void removeRecordModifiedListener(RecordModifiedListener listener)
removeRecordModifiedListener in interface DataEntrylistener - O listener a remover.public void removeRecordInsertedListener(RecordInsertedListener listener)
removeRecordInsertedListener in interface DataEntrylistener - O listener a remover.public void removeRecordDeletedListener(RecordDeletedListener listener)
removeRecordDeletedListener in interface DataEntrylistener - O listener a remover.public void removeModeChangedListener(ModeChangedListener listener)
removeModeChangedListener in interface DataEntrylistener - O listener a remover.public void removeActionListener(ActionListener listener)
removeActionListener in interface DataEntrylistener - O listener a remover.public boolean isQueryAllowed()
isQueryAllowed in interface DataEntrypublic void setQueryAllowed(boolean queryAllowed)
setQueryAllowed in interface DataEntryqueryAllowed - true para activar a pesquisa na entrada de dados,
false para desactivar.public DAOManager getDAOManager()
getDAOManager in interface DataEntrypublic void setDAOManager(DAOManager daoManager)
setDAOManager in interface DataEntrydaoManager - New value of property daoManager.public void removeAllRows()
removeAllRows in interface DataEntry
public void addActionMapping(java.lang.String commandName,
java.lang.String className)
addActionMapping in interface DataEntrycommandName - The name of the command that identifies the action.className - The name of the class that implements the action command.public java.lang.String getClassNameForAction(java.lang.String commandName)
getClassNameForAction in interface DataEntrycommandName - The name of the command that identifies the action.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||