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="MapeamentoImportacaoDeContas")
035: public class AccountImportMapping extends BasicGFPDataObject {
036: @Column(isPk=false,nome="StringAMapear",readMethodName="getStringAMapear",writeMethodName="setStringAMapear")
037: private String stringAMapear = null;
038:
039: @Column(isPk=false,nome="TipoContaComQueMapear",readMethodName="getTipoContaComQueMapear",writeMethodName="setTipoContaComQueMapear")
040: private Integer tipoContaComQuelMapear = null;
041:
042: @Column(isPk=false,nome="ContaComQuelMapear",readMethodName="getContaComQueMapear",writeMethodName="setContaComQueMapear")
043: private Integer contaComQuelMapear = null;
044:
045: /** Cria uma nova instância de AccoutSaving */
046: public AccountImportMapping() {
047: // Não fazemos nada
048: }
049:
050: public Integer getContaComQueMapear() {
051: return contaComQuelMapear;
052: }
053:
054: public void setContaComQueMapear(Integer contaComQuelMapear) {
055: this .contaComQuelMapear = contaComQuelMapear;
056: }
057:
058: public Integer getTipoContaComQueMapear() {
059: return tipoContaComQuelMapear;
060: }
061:
062: public void setTipoContaComQueMapear(Integer tipoContaComQuelMapear) {
063: this .tipoContaComQuelMapear = tipoContaComQuelMapear;
064: }
065:
066: /**
067: * Cria uma nova instância de AccoutSaving
068: *
069: * @param dados que comporão os objeto
070: */
071: public AccountImportMapping(Map<String, Object> dados) {
072: setDados(dados);
073: }
074:
075: /**
076: * Cria uma nova instância de AccoutSaving
077: *
078: * @param id
079: */
080: public AccountImportMapping(Integer id) {
081: setId(id);
082: }
083:
084: /**
085: * Cria uma nova instância de AccoutSaving
086: *
087: * @param saldoInicial
088: */
089: public AccountImportMapping(String stringMapeada) {
090: setStringAMapear(stringMapeada);
091: }
092:
093: /**
094: * @see br.com.gfp.data.CheckingAccount#validate()
095: */
096: public void validate() throws SQLException {
097: // Nada pra validar
098: }
099:
100: public String getAsString(int format) {
101: switch (format) {
102: case AccountSaving.CURTO:
103: return getStringAMapear();
104: case AccountSaving.MEDIO:
105: return getStringAMapear() + " Account: "
106: + getTipoContaComQueMapear() + ":"
107: + getContaComQueMapear();
108: case AccountSaving.LONGO:
109: return toString();
110: }
111: return "";
112: }
113:
114: public String getStringAMapear() {
115: return stringAMapear;
116: }
117:
118: public void setStringAMapear(String persistentStringAMapear) {
119: this.stringAMapear = persistentStringAMapear;
120: }
121: }
|