Skip to content

Commit

Permalink
Fixing bugs with APIs that are only in the search engine
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Jun 2, 2023
1 parent bb19ac7 commit 20071fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/computate/frFR/java/EcrireApiClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3103,6 +3103,8 @@ else if(StringUtils.containsAny(classeApiMethode, classeLangueConfig.getString(C
tl(4, classeLangueConfig.getString(ConfigCles.var_requeteSite), ".set", classeLangueConfig.getString(ConfigCles.var_RequeteApi), "_(", classeLangueConfig.getString(ConfigCles.var_requeteApi), ");");
if(classeApiMethode.equals(classeLangueConfig.getString(ConfigCles.var_PUTFusion)) || classeApiMethode.equals("PUTImport")) {
tl(4, "body.put(\"", classeVarInheritClePrimaire, "\", body.getValue(\"", classeModele ? classeVarClePrimaire : classeVarCleUnique, "\"));");
if(!classeModele)
tl(4, "body.put(\"", classeVarInheritClePrimaire, "\", body.getValue(\"", classeVarCleUnique, "\"));");
}
tl(4, "if(Optional.ofNullable(", classeLangueConfig.getString(ConfigCles.var_requeteService), ".getParams()).map(p -> p.getJsonObject(\"query\")).map( q -> q.getJsonArray(\"var\")).orElse(new JsonArray()).stream().filter(s -> \"", classeLangueConfig.getString(ConfigCles.var_recharger), ":false\".equals(s)).count() > 0L) {");
tl(5, classeLangueConfig.getString(ConfigCles.var_requeteSite), ".get", classeLangueConfig.getString(ConfigCles.var_Requete), "Vars().put( \"", classeLangueConfig.getString(ConfigCles.var_recharger), "\", \"false\" );");
Expand Down Expand Up @@ -3153,13 +3155,13 @@ else if(StringUtils.containsAny(classeApiMethode, classeLangueConfig.getString(C
tl(8, "} else {");
tl(9, "o2.", classeLangueConfig.getString(ConfigCles.var_definir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f, bodyVal);");
tl(9, "o2.", classeLangueConfig.getString(ConfigCles.var_attribuer), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f, bodyVal);");
tl(9, "if(!StringUtils.containsAny(f, \"", classeVarClePrimaire, "\", \"", classeLangueConfig.getString(ConfigCles.var_cree), "\", \"set", classeLangueConfig.getString(ConfigCles.var_Cree), "\") && !Objects.equals(o.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f), o2.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f)))");
tl(9, "if(!StringUtils.containsAny(f, \"", classeModele ? classeVarClePrimaire : classeVarCleUnique, "\", \"", classeLangueConfig.getString(ConfigCles.var_cree), "\", \"set", classeLangueConfig.getString(ConfigCles.var_Cree), "\") && !Objects.equals(o.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f), o2.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f)))");
tl(10, "body2.put(\"set\" + StringUtils.capitalize(f), bodyVal);");
tl(8, "}");
tl(7, "}");
tl(7, "for(String f : Optional.ofNullable(o.get", classeLangueConfig.getString(ConfigCles.var_Sauvegardes), "()).orElse(new ArrayList<>())) {");
tl(8, "if(!body.fieldNames().contains(f)) {");
tl(9, "if(!StringUtils.containsAny(f, \"", classeVarClePrimaire, "\", \"", classeLangueConfig.getString(ConfigCles.var_cree), "\", \"set", classeLangueConfig.getString(ConfigCles.var_Cree), "\") && !Objects.equals(o.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f), o2.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f)))");
tl(9, "if(!StringUtils.containsAny(f, \"", classeModele ? classeVarClePrimaire : classeVarCleUnique, "\", \"", classeLangueConfig.getString(ConfigCles.var_cree), "\", \"set", classeLangueConfig.getString(ConfigCles.var_Cree), "\") && !Objects.equals(o.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f), o2.", classeLangueConfig.getString(ConfigCles.var_obtenir), classeLangueConfig.getString(ConfigCles.var_PourClasse), "(f)))");
tl(10, "body2.putNull(\"set\" + StringUtils.capitalize(f));");
tl(8, "}");
tl(7, "}");
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/computate/frFR/java/EcrireGenClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -5086,14 +5086,14 @@ else if(entiteNomSimple.equals("List") || entiteNomSimple.equals("ArrayList") ||
// codePeupler //
/////////////////
o = wPeupler;
if(classeSauvegarde) {
if(classeIndexe) {
// String nomChamp = entiteVar.toString();
// String varCrypte = entiteVarCrypte.toString();
// String varStocke = entiteVarStocke.toString();
// String varSuggere = entiteVarSuggere.toString();
// String varIncremente = entiteVarIncremente.toString();
// String varCleUnique = entiteVarCleUniqueActuel.toString();
if(entiteCrypte || entiteStocke || entiteCleUnique || entiteSuggere || entiteIncremente) {
if(entiteCrypte || entiteStocke || entiteDocValues || entiteCleUnique || entiteSuggere || entiteIncremente) {
tl(0);

if(entiteSuggere) {
Expand Down

0 comments on commit 20071fd

Please sign in to comment.