001: /*
002: * Created on 05/06/2006
003: *
004: * Swing Components - visit http://sf.net/projects/gfd
005: *
006: * Copyright (C) 2004 Igor Regis da Silva Simões
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU General Public License
010: * as published by the Free Software Foundation; either version 2
011: * of the License, or (at your option) any later version.
012: *
013: * This program is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016: * GNU General Public License for more details.
017: *
018: * You should have received a copy of the GNU General Public License
019: * along with this program; if not, write to the Free Software
020: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
021: */
022:
023: package br.com.gfp.data;
024:
025: import java.sql.SQLException;
026: import java.util.Map;
027:
028: import br.com.gfpshare.db.Column;
029: import br.com.gfpshare.db.Table;
030:
031: /**
032: * @author Igor Regis da Silva Simoes
033: */
034: @Table(name="MapeamentoDeImportacaoPorHistorico")
035: public class ImportByHistoryMapping extends BasicGFPDataObject {
036: @Column(isPk=false,nome="StringAMapear",readMethodName="getStringAMapear",writeMethodName="setStringAMapear")
037: private String stringAMapear = null;
038:
039: @Column(isPk=false,nome="TipoLancamentoComQueMapear",readMethodName="getTipoLancamentoComQueMapear",writeMethodName="setTipoLancamentoComQueMapear")
040: private Integer tipoLancamentoComQueMapear = null;
041:
042: @Column(isPk=false,nome="ContatoComOQualMapear",readMethodName="getContatoComOQualMapear",writeMethodName="setContatoComOQualMapear")
043: private Integer contatoComOQualMapear = null;
044:
045: @Column(isPk=false,nome="TipoContaValido",readMethodName="getTipoContaValido",writeMethodName="setTipoContaValido")
046: private Integer tipoContaValido = null;
047:
048: @Column(isPk=false,nome="ContaValido",readMethodName="getContaValido",writeMethodName="setContaValido")
049: private Integer contaValido = null;
050:
051: /** Cria uma nova instância de AccoutSaving */
052: public ImportByHistoryMapping() {
053: //Não fazemos nada
054: }
055:
056: /**
057: * Cria uma nova instância de AccoutSaving
058: * @param dados que comporão os objeto
059: */
060: public ImportByHistoryMapping(Map<String, Object> dados) {
061: setDados(dados);
062: }
063:
064: /** Cria uma nova instância de AccoutSaving
065: * @param id
066: */
067: public ImportByHistoryMapping(Integer id) {
068: setId(id);
069: }
070:
071: /** Cria uma nova instância de AccoutSaving
072: * @param saldoInicial
073: */
074: public ImportByHistoryMapping(String stringMapeada) {
075: setStringAMapear(stringMapeada);
076: }
077:
078: /**
079: * @see br.com.gfp.data.CheckingAccount#validate()
080: */
081: public void validate() throws SQLException {
082: //Nada pra validar
083: }
084:
085: public String getAsString(int format) {
086: switch (format) {
087: case AccountSaving.CURTO:
088: return getStringAMapear();
089: case AccountSaving.MEDIO:
090: return getStringAMapear() + " Tipo: "
091: + getTipoLancamentoComQueMapear();
092: case AccountSaving.LONGO:
093: return toString();
094: }
095: return "";
096: }
097:
098: public Integer getContatoComOQualMapear() {
099: return contatoComOQualMapear;
100: }
101:
102: public void setContatoComOQualMapear(
103: Integer persistentContatoComOQualMapear) {
104: this .contatoComOQualMapear = persistentContatoComOQualMapear;
105: }
106:
107: public String getStringAMapear() {
108: return stringAMapear;
109: }
110:
111: public void setStringAMapear(String persistentStringAMapear) {
112: this .stringAMapear = persistentStringAMapear;
113: }
114:
115: public Integer getTipoLancamentoComQueMapear() {
116: return tipoLancamentoComQueMapear;
117: }
118:
119: public void setTipoLancamentoComQueMapear(
120: Integer persistentTipoLancamentoComQueMapear) {
121: this .tipoLancamentoComQueMapear = persistentTipoLancamentoComQueMapear;
122: }
123:
124: public Integer getContaValido() {
125: return contaValido;
126: }
127:
128: public void setContaValido(Integer contaValido) {
129: this .contaValido = contaValido;
130: }
131:
132: public Integer getTipoContaValido() {
133: return tipoContaValido;
134: }
135:
136: public void setTipoContaValido(Integer tipoContaValido) {
137: this.tipoContaValido = tipoContaValido;
138: }
139:
140: }
|