Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BugID: 539 - Controllo della Spesa - spostato controllo e aggiornamen…
…to in fase di proposta def + Consultazione limiti per uo
- Loading branch information
rpucciarelli
committed
Mar 1, 2011
1 parent
66456d6
commit eda2a93
Showing
15 changed files
with
614 additions
and
116 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
sigla-ejb/src/main/java/it/cnr/contab/config00/pdcfin/bulk/VLimiteSpesaDetBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Date 21/02/2011 | ||
*/ | ||
package it.cnr.contab.config00.pdcfin.bulk; | ||
import it.cnr.jada.persistency.Keyed; | ||
public class VLimiteSpesaDetBase extends VLimiteSpesaDetKey implements Keyed { | ||
|
||
// DS_ELEMENTO_VOCE VARCHAR(100) | ||
private java.lang.String ds_elemento_voce; | ||
|
||
// IMPORTO_LIMITE DECIMAL(15,2) NOT NULL | ||
private java.math.BigDecimal importo_limite; | ||
|
||
// IMPEGNI_ASSUNTI DECIMAL(15,2) NOT NULL | ||
private java.math.BigDecimal impegni_assunti; | ||
|
||
// IMPORTO_DISPONIBILE DECIMAL(22,0) | ||
private java.lang.Long importo_disponibile; | ||
|
||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Table name: V_LIMITE_SPESA_DET | ||
**/ | ||
public VLimiteSpesaDetBase() { | ||
super(); | ||
} | ||
public VLimiteSpesaDetBase(java.lang.Integer esercizio, java.lang.String cdCds, java.lang.String tiAppartenenza, java.lang.String tiGestione, java.lang.String cdElementoVoce, java.lang.String fonte) { | ||
super(esercizio, cdCds, tiAppartenenza, tiGestione, cdElementoVoce, fonte); | ||
} | ||
|
||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [ds_elemento_voce] | ||
**/ | ||
public java.lang.String getDs_elemento_voce() { | ||
return ds_elemento_voce; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [ds_elemento_voce] | ||
**/ | ||
public void setDs_elemento_voce(java.lang.String ds_elemento_voce) { | ||
this.ds_elemento_voce=ds_elemento_voce; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [importo_limite] | ||
**/ | ||
public java.math.BigDecimal getImporto_limite() { | ||
return importo_limite; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [importo_limite] | ||
**/ | ||
public void setImporto_limite(java.math.BigDecimal importo_limite) { | ||
this.importo_limite=importo_limite; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [impegni_assunti] | ||
**/ | ||
public java.math.BigDecimal getImpegni_assunti() { | ||
return impegni_assunti; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [impegni_assunti] | ||
**/ | ||
public void setImpegni_assunti(java.math.BigDecimal impegni_assunti) { | ||
this.impegni_assunti=impegni_assunti; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [importo_disponibile] | ||
**/ | ||
public java.lang.Long getImporto_disponibile() { | ||
return importo_disponibile; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [importo_disponibile] | ||
**/ | ||
public void setImporto_disponibile(java.lang.Long importo_disponibile) { | ||
this.importo_disponibile=importo_disponibile; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
sigla-ejb/src/main/java/it/cnr/contab/config00/pdcfin/bulk/VLimiteSpesaDetBulk.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Date 21/02/2011 | ||
*/ | ||
package it.cnr.contab.config00.pdcfin.bulk; | ||
import it.cnr.jada.action.ActionContext; | ||
import it.cnr.jada.bulk.OggettoBulk; | ||
import it.cnr.jada.util.action.CRUDBP; | ||
public class VLimiteSpesaDetBulk extends VLimiteSpesaDetBase { | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Table name: V_LIMITE_SPESA_DET | ||
**/ | ||
public static final java.util.Dictionary fonteKeys = new it.cnr.jada.util.OrderedHashtable(); | ||
|
||
final public static String FONTE_INTERNA = "FIN"; | ||
final public static String FONTE_ESTERNA = "FES"; | ||
|
||
static { | ||
fonteKeys.put(FONTE_INTERNA,"Interna"); | ||
fonteKeys.put(FONTE_ESTERNA,"Esterna"); | ||
} | ||
public VLimiteSpesaDetBulk() { | ||
super(); | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Table name: V_LIMITE_SPESA_DET | ||
**/ | ||
public VLimiteSpesaDetBulk(java.lang.Integer esercizio, java.lang.String cdCds, java.lang.String tiAppartenenza, java.lang.String tiGestione, java.lang.String cdElementoVoce, java.lang.String fonte) { | ||
super(esercizio, cdCds, tiAppartenenza, tiGestione, cdElementoVoce, fonte); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
sigla-ejb/src/main/java/it/cnr/contab/config00/pdcfin/bulk/VLimiteSpesaDetHome.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Date 21/02/2011 | ||
*/ | ||
package it.cnr.contab.config00.pdcfin.bulk; | ||
import java.sql.Connection; | ||
import java.util.List; | ||
|
||
import it.cnr.contab.config00.sto.bulk.Unita_organizzativaBulk; | ||
import it.cnr.contab.config00.sto.bulk.Unita_organizzativa_enteBulk; | ||
import it.cnr.contab.utenze00.bp.CNRUserContext; | ||
import it.cnr.jada.UserContext; | ||
import it.cnr.jada.bulk.BulkHome; | ||
import it.cnr.jada.persistency.PersistencyException; | ||
import it.cnr.jada.persistency.PersistentCache; | ||
import it.cnr.jada.persistency.sql.CompoundFindClause; | ||
import it.cnr.jada.persistency.sql.PersistentHome; | ||
import it.cnr.jada.persistency.sql.SQLBuilder; | ||
public class VLimiteSpesaDetHome extends BulkHome { | ||
public VLimiteSpesaDetHome(Connection conn) { | ||
super(VLimiteSpesaDetBulk.class, conn); | ||
} | ||
public VLimiteSpesaDetHome(Connection conn, PersistentCache persistentCache) { | ||
super(VLimiteSpesaDetBulk.class, conn, persistentCache); | ||
} | ||
public SQLBuilder selectByClause(UserContext usercontext, CompoundFindClause compoundfindclause) throws PersistencyException { | ||
SQLBuilder sql = super.selectByClause(usercontext, compoundfindclause); | ||
sql.addClause("AND","esercizio",SQLBuilder.EQUALS, CNRUserContext.getEsercizio(usercontext)); | ||
PersistentHome uoEnteHome = getHomeCache().getHome(Unita_organizzativa_enteBulk.class); | ||
List result = uoEnteHome.fetchAll( uoEnteHome.createSQLBuilder() ); | ||
String cdsEnte = ((Unita_organizzativaBulk) result.get(0)).getCd_cds(); | ||
|
||
if(CNRUserContext.getCd_cds(usercontext).compareTo(cdsEnte)!=0) | ||
sql.addClause("AND","cd_cds",SQLBuilder.EQUALS, CNRUserContext.getCd_cds(usercontext)); | ||
return sql; | ||
} | ||
} |
107 changes: 107 additions & 0 deletions
107
sigla-ejb/src/main/java/it/cnr/contab/config00/pdcfin/bulk/VLimiteSpesaDetKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Date 21/02/2011 | ||
*/ | ||
package it.cnr.contab.config00.pdcfin.bulk; | ||
import it.cnr.jada.bulk.OggettoBulk; | ||
import it.cnr.jada.persistency.KeyedPersistent; | ||
public class VLimiteSpesaDetKey extends OggettoBulk implements KeyedPersistent { | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Table name: V_LIMITE_SPESA_DET | ||
**/ | ||
public VLimiteSpesaDetKey() { | ||
super(); | ||
} | ||
private java.lang.Integer esercizio; | ||
private java.lang.String cd_cds; | ||
private java.lang.String ti_appartenenza; | ||
private java.lang.String ti_gestione; | ||
private java.lang.String cd_elemento_voce; | ||
private java.lang.String fonte; | ||
|
||
public VLimiteSpesaDetKey(java.lang.Integer esercizio, java.lang.String Cd_cds, java.lang.String tiAppartenenza, java.lang.String tiGestione, java.lang.String cdElementoVoce, java.lang.String fonte) { | ||
super(); | ||
this.esercizio=esercizio; | ||
this.cd_cds=Cd_cds; | ||
this.ti_appartenenza=tiAppartenenza; | ||
this.ti_gestione=tiGestione; | ||
this.cd_elemento_voce=cdElementoVoce; | ||
this.fonte=fonte; | ||
} | ||
public boolean equalsByPrimaryKey(Object o) { | ||
if (this== o) return true; | ||
if (!(o instanceof VLimiteSpesaDetKey)) return false; | ||
VLimiteSpesaDetKey k = (VLimiteSpesaDetKey) o; | ||
if (!compareKey(getEsercizio(), k.getEsercizio())) return false; | ||
if (!compareKey(getCd_cds(), k.getCd_cds())) return false; | ||
if (!compareKey(getTi_appartenenza(), k.getTi_appartenenza())) return false; | ||
if (!compareKey(getTi_gestione(), k.getTi_gestione())) return false; | ||
if (!compareKey(getCd_elemento_voce(), k.getCd_elemento_voce())) return false; | ||
if (!compareKey(getFonte(), k.getFonte())) return false; | ||
return true; | ||
} | ||
public int primaryKeyHashCode() { | ||
int i = 0; | ||
i = i + calculateKeyHashCode(getEsercizio()); | ||
i = i + calculateKeyHashCode(getCd_cds()); | ||
i = i + calculateKeyHashCode(getTi_appartenenza()); | ||
i = i + calculateKeyHashCode(getTi_gestione()); | ||
i = i + calculateKeyHashCode(getCd_elemento_voce()); | ||
i = i + calculateKeyHashCode(getFonte()); | ||
return i; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [esercizio] | ||
**/ | ||
public void setEsercizio(java.lang.Integer esercizio) { | ||
this.esercizio=esercizio; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [esercizio] | ||
**/ | ||
public java.lang.Integer getEsercizio() { | ||
return esercizio; | ||
} | ||
|
||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [fonte] | ||
**/ | ||
public void setFonte(java.lang.String fonte) { | ||
this.fonte=fonte; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [fonte] | ||
**/ | ||
public java.lang.String getFonte() { | ||
return fonte; | ||
} | ||
public java.lang.String getCd_cds() { | ||
return cd_cds; | ||
} | ||
public void setCd_cds(java.lang.String cd_cds) { | ||
this.cd_cds = cd_cds; | ||
} | ||
public java.lang.String getTi_appartenenza() { | ||
return ti_appartenenza; | ||
} | ||
public void setTi_appartenenza(java.lang.String ti_appartenenza) { | ||
this.ti_appartenenza = ti_appartenenza; | ||
} | ||
public java.lang.String getTi_gestione() { | ||
return ti_gestione; | ||
} | ||
public void setTi_gestione(java.lang.String ti_gestione) { | ||
this.ti_gestione = ti_gestione; | ||
} | ||
public java.lang.String getCd_elemento_voce() { | ||
return cd_elemento_voce; | ||
} | ||
public void setCd_elemento_voce(java.lang.String cd_elemento_voce) { | ||
this.cd_elemento_voce = cd_elemento_voce; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.