int taxJurisdictionID = dl.getAutoGeneratedKey();
if(taxJurisdictionID > 0){
Vector taxClasses = this.getTaxClasses();
if(taxClasses != null && taxClasses.size() != 0){
for(int i=0; i<taxClasses.size();i++){
DDNameValue taxClassNameValue = (DDNameValue)taxClasses.get(i);
if(taxClassNameValue != null){
int taxClassID = taxClassNameValue.getId();
dl.setSqlQuery("insert into taxmatrix values(?,?,?)");
dl.setInt(1,taxClassID);
dl.setInt(2,taxJurisdictionID);
dl.setInt(3,0);
dl.executeUpdate();
}// end of if(taxClassNameValue != null)
}// end of for(int i=0; i<taxClasses.size();i++)
}// end of if(taxClasses != null && taxClasses.size() != 0)
}// end of if(taxJurisdictionID > 0)
}// end of if (typeClassOrJurisdiction != null && typeClassOrJurisdiction.equals("Jurisdiction"))
if (typeClassOrJurisdiction != null && typeClassOrJurisdiction.equals("taxClass")){
dl.setSqlQueryToNull();
dl.setSqlQueryToNull();
dl.setSqlQuery("insert into taxclass (title) values(?)");
dl.setString(1,taxClassOrJurisdiction);
dl.executeUpdate();
int taxClassID = dl.getAutoGeneratedKey();
if(taxClassID > 0){
Vector taxJurisdiction = this.getTaxJurisdiction();
if(taxJurisdiction != null && taxJurisdiction.size() != 0){
for(int i=0; i<taxJurisdiction.size();i++){
DDNameValue taxJurisdictionNameValue = (DDNameValue)taxJurisdiction.get(i);
if(taxJurisdictionNameValue != null){
int taxJurisdictionID = taxJurisdictionNameValue.getId();
dl.setSqlQuery("insert into taxmatrix values(?,?,?)");
dl.setInt(1,taxClassID);
dl.setInt(2,taxJurisdictionID);
dl.setInt(3,0);
dl.executeUpdate();