pt.despodata.java.webappl.tables
Class ApplDataControl

java.lang.Object
  extended bypt.moredata.dao.PublicSimpleDataAccessObject
      extended bypt.despodata.java.ddata.DDataControl
          extended bypt.despodata.java.ddata.DHtmlDataControl
              extended bypt.despodata.java.webappl.tables.ApplDataControl
All Implemented Interfaces:
IDHtmlDataControl

public class ApplDataControl
extends DHtmlDataControl

ApplDataControl.java Created: Mon Jun 04 03:19:49 2000

Version:
$Revision: 1.4 $
Author:
Paulo Carmo
See Also:
Serialized Form

Field Summary
static int ALTER_STATE
          Usado quando se esta a alterar o ApplDataControl.
static int INSERT_STATE
          Usado quando se esta a inserir no ApplDataControl.
static int NONE_STATE
          Usado quando nenhum dos outros estados se aplica.
static int QUERY_STATE
          Usado quando se esta a pesquisar no ApplDataControl.
 
Fields inherited from class pt.despodata.java.ddata.DHtmlDataControl
session
 
Fields inherited from interface pt.despodata.java.ddata.IDHtmlDataControl
SEPARATOR
 
Constructor Summary
ApplDataControl()
           
ApplDataControl(javax.servlet.http.HttpSession session, DDataSource source)
          Constroi um objecto para representar a tabela contacto.
 
Method Summary
 void addRelatedTable(java.lang.String table, boolean readAndWrite)
          Adiciona uma tabela como detalhe deste DDataControl.
 void clear()
          Limpa o DataAccessObject.
 void decRowNumber()
          Incrementa a linha actual em uma unidade.
 void dump()
           
 void dump(java.lang.String _prefix)
           
 int getAllChecked()
          Get the value of allChecked.
 java.lang.String getAuthorizationWhereString()
          Este metodo devolve uma clausula de where para restringir as pesquisas.
protected  java.lang.String getFileDeleteUrl(int rowNumber, java.lang.String columnName)
          Constroi e devolve uma URL de uma servlet para apagar um ficheiro.
protected  java.lang.String getFileUploadUrl(int rowNumber, java.lang.String columnName)
          Constroi e devolve uma URL de uma servlet para fazer download de um ficheiro.
 int getFirst()
          Get the value of first.
protected  java.lang.String getImageUrl(int rowNumber, java.lang.String columnName)
          Constroi e devolve uma URL de uma servlet para fazer download de uma imagem.
 int getLast()
          Get the value of last.
 int getListaNFrames()
          Get the value of listaNFrames.
 int getNFrames()
          Get the value of nFrames.
 java.util.Hashtable getRelatedTables()
          Devolve a lista de tabelas que sao detalhe deste DDataControl.
 int getRowNumber()
          Get the value of rowNumber.
 int getState()
          Get the value of state.
 void incRowNumber()
          Incrementa a linha actual em uma unidade.
protected  void init()
           
 void init(DDataSource source)
          Inicializa a classe.
 boolean isCleanBeforeInsert()
          Getter for property cleanBeforeInsert.
protected  java.lang.String isDetail(java.lang.String columnName)
          Verifica se este ApplDataControl e um detalhe ou nao
 boolean isRefresh()
          Get the value of refresh.
 void query()
          Efectua um query dos dados do local onde estes se encontram Actualiza as listas de descricoes.
 void setAllChecked(int v)
          Set the value of allChecked.
 void setCleanBeforeInsert(boolean cleanBeforeInsert)
          Setter for property cleanBeforeInsert.
 void setFirst(int v)
          Set the value of first.
 void setListaNFrames(int v)
          Set the value of listaNFrames.
 void setNFrames(int v)
          Set the value of nFrames.
 void setRefresh(boolean v)
          Set the value of refresh.
 void setRowNumber(int v)
          Set the value of rowNumber.
 void setState(int v)
          Set the value of state.
 
Methods inherited from class pt.despodata.java.ddata.DHtmlDataControl
addAllColumnsFromTable, addAllColumnsToVisualField, addDescription, addDescription, addReferencedColumn, addReferencedColumn, addVisualField, addVisualField, addVisualField, addVisualField, createDHtmlArray, dumpDataColumns, formatObject, getButtonText, getColumn, getColumnName, getColumnsNames, getDateFormat, getFileName, getFormatedCellAt, getFormHeader, getFormName, getFormTarget, getPKWhereStr, getRefField, getServletTableName, getSession, getTableBorder, getTableHeader, getVisualField, getVisualField, getVisualFieldName, getVisualFieldsNames, getVisualFieldsNames, isReference, isVisualField, marshallingParamName, refreshComboBox, refreshComboBoxs, refreshRefVisualFields, removeVisualField, replaceChars, rmDescription, rmReferencedColumn, setButtonText, setColumnFileName, setDateFormat, setEditable, setFileName, setFormHeader, setFormName, setFormTarget, setRefField, setRefWhereStr, setTableBorder, setTableHeader, setTableName, showDataAsCustom, showDataAsCustom, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomForm, showDataAsCustomTable, showDataAsCustomTable, showDataAsForm, showDataAsTable, showNewDataAsCustomForm, showNewDataAsForm, submitFormData, unmarshallingParamName
 
Methods inherited from class pt.despodata.java.ddata.DDataControl
addDDataControlListener, clearAllFields, columns, getDataSource, getMetaField, getMetaField, getPrimaryKey, initRecordSet, removeDDataControlListener, rows, setDeleted, setDescColumn, setPkColumn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE_STATE

public static int NONE_STATE
Usado quando nenhum dos outros estados se aplica.


ALTER_STATE

public static int ALTER_STATE
Usado quando se esta a alterar o ApplDataControl.


INSERT_STATE

public static int INSERT_STATE
Usado quando se esta a inserir no ApplDataControl.


QUERY_STATE

public static int QUERY_STATE
Usado quando se esta a pesquisar no ApplDataControl.

Constructor Detail

ApplDataControl

public ApplDataControl()

ApplDataControl

public ApplDataControl(javax.servlet.http.HttpSession session,
                       DDataSource source)
Constroi um objecto para representar a tabela contacto.

Parameters:
session - Sessao associada a aplicacao.
source - Origem de dados para o DDataControl.
Method Detail

init

protected void init()

getAuthorizationWhereString

public java.lang.String getAuthorizationWhereString()
Este metodo devolve uma clausula de where para restringir as pesquisas.


init

public void init(DDataSource source)
Inicializa a classe.


incRowNumber

public void incRowNumber()
Incrementa a linha actual em uma unidade.


isRefresh

public boolean isRefresh()
Get the value of refresh.

Returns:
value of refresh.

decRowNumber

public void decRowNumber()
Incrementa a linha actual em uma unidade.


getFileUploadUrl

protected java.lang.String getFileUploadUrl(int rowNumber,
                                            java.lang.String columnName)
Constroi e devolve uma URL de uma servlet para fazer download de um ficheiro.

Overrides:
getFileUploadUrl in class DHtmlDataControl
Parameters:
columnName - O nome da coluna que contem a imagem a mostrar.
Returns:
Uma url que contem a imagem armazenada no DataControl, na linha e coluna indicadas.

getFileDeleteUrl

protected java.lang.String getFileDeleteUrl(int rowNumber,
                                            java.lang.String columnName)
Constroi e devolve uma URL de uma servlet para apagar um ficheiro.

Overrides:
getFileDeleteUrl in class DHtmlDataControl
Parameters:
columnName - O nome da coluna que contem a imagem a mostrar.
Returns:
Uma url que contem a imagem armazenada no DataControl, na linha e coluna indicadas.

getImageUrl

protected java.lang.String getImageUrl(int rowNumber,
                                       java.lang.String columnName)
Constroi e devolve uma URL de uma servlet para fazer download de uma imagem.

Overrides:
getImageUrl in class DHtmlDataControl
Parameters:
columnName - O nome da coluna que contem a imagem a mostrar.
Returns:
Uma url que contem a imagem armazenada no DataControl, na linha e coluna indicadas.

isDetail

protected java.lang.String isDetail(java.lang.String columnName)
Verifica se este ApplDataControl e um detalhe ou nao


setRefresh

public void setRefresh(boolean v)
Set the value of refresh.

Parameters:
v - Value to assign to refresh.

getFirst

public int getFirst()
Get the value of first.

Returns:
Value of first.

setFirst

public void setFirst(int v)
Set the value of first.

Parameters:
v - Value to assign to first.

getLast

public int getLast()
Get the value of last.

Returns:
Value of last.

getRowNumber

public int getRowNumber()
Get the value of rowNumber.

Returns:
Value of rowNumber.

setRowNumber

public void setRowNumber(int v)
Set the value of rowNumber.

Parameters:
v - Value to assign to rowNumber.

getNFrames

public int getNFrames()
Get the value of nFrames.

Returns:
Value of nFrames.

setNFrames

public void setNFrames(int v)
Set the value of nFrames.

Parameters:
v - Value to assign to nFrames.

getListaNFrames

public int getListaNFrames()
Get the value of listaNFrames.

Returns:
Value of listaNFrames.

setListaNFrames

public void setListaNFrames(int v)
Set the value of listaNFrames.

Parameters:
v - Value to assign to listaNFrames.

getAllChecked

public int getAllChecked()
Get the value of allChecked.

Returns:
Value of allChecked.

setAllChecked

public void setAllChecked(int v)
Set the value of allChecked.

Parameters:
v - Value to assign to allChecked.

getRelatedTables

public java.util.Hashtable getRelatedTables()
Devolve a lista de tabelas que sao detalhe deste DDataControl.

Returns:
A lista de tabelas que sao detalhe deste DDataControl.

addRelatedTable

public void addRelatedTable(java.lang.String table,
                            boolean readAndWrite)
Adiciona uma tabela como detalhe deste DDataControl.

Parameters:
table - O nome de uma tabela.
readAndWrite - true para o caso de o detalhe poder ser apagado.

getState

public int getState()
Get the value of state.

Returns:
Value of state.

setState

public void setState(int v)
Set the value of state.

Parameters:
v - Value to assign to state.

clear

public void clear()
Limpa o DataAccessObject. Todos os registos sao removidos do RecordSet


query

public void query()
Description copied from class: DHtmlDataControl
Efectua um query dos dados do local onde estes se encontram Actualiza as listas de descricoes.

Overrides:
query in class DHtmlDataControl

dump

public void dump()
Overrides:
dump in class DHtmlDataControl

dump

public void dump(java.lang.String _prefix)
Overrides:
dump in class DHtmlDataControl

isCleanBeforeInsert

public boolean isCleanBeforeInsert()
Getter for property cleanBeforeInsert.

Returns:
Value of property cleanBeforeInsert.

setCleanBeforeInsert

public void setCleanBeforeInsert(boolean cleanBeforeInsert)
Setter for property cleanBeforeInsert.

Parameters:
cleanBeforeInsert - New value of property cleanBeforeInsert.