/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionBotanique.java |
---|
12,6 → 12,7 |
private static final long serialVersionUID = -6659148189825855729L; |
public static final String PREFIXE = "ccb"; |
public static String[] champsObligatoires = {"ccb_id_collection"}; |
public CollectionBotanique() { |
} |
42,6 → 43,9 |
return PREFIXE; |
} |
protected String[] getChampsObligatoires() { |
return champsObligatoires; |
} |
// ID |
public String getId() { |
return renvoyerValeurCorrecte("id_collection"); |
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionAPersonne.java |
---|
11,6 → 11,7 |
public static final String PREFIXE = "ccap"; |
private Personne personneLiee = null; |
public static String[] champsObligatoires = {"ccap_id_collection", "ccap_id_personne", "ccap_id_role"}; |
public CollectionAPersonne() { |
initialiser(new JSONObject()); |
25,6 → 26,10 |
return PREFIXE; |
} |
protected String[] getChampsObligatoires() { |
return champsObligatoires; |
} |
private void initialiser(JSONObject collectionAPersonneListe) { |
setPersonne(new Personne(collectionAPersonneListe)); |
initialiserModele(collectionAPersonneListe); |
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionAPublication.java |
---|
11,6 → 11,7 |
public static final String PREFIXE = "ccapu"; |
private Publication publicationLiee = null; |
public static String[] champsObligatoires = {"ccapu_id_collection", "ccapu_id_publication"}; |
public CollectionAPublication() { |
initialiser(new JSONObject()); |
25,6 → 26,10 |
return PREFIXE; |
} |
protected String[] getChampsObligatoires() { |
return champsObligatoires; |
} |
private void initialiser(JSONObject collectionAPublicationListe) { |
setPublication(new Publication(collectionAPublicationListe)); |
initialiserChampsPourGrille(); |
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/Collection.java |
---|
1,5 → 1,8 |
package org.tela_botanica.client.modeles.collection; |
import java.util.LinkedList; |
import java.util.List; |
import org.tela_botanica.client.modeles.aDonnee; |
import com.google.gwt.json.client.JSONObject; |
13,6 → 16,7 |
private CollectionAPersonneListe personnesLiees = null; |
private CollectionAPublicationListe publicationsLiees = null; |
private CollectionACommentaireListe commentairesLiees = null; |
public static String[] champsObligatoires = {"cc_id_collection"}; |
public Collection() { |
} |
26,6 → 30,10 |
return PREFIXE; |
} |
protected String[] getChampsObligatoires() { |
return champsObligatoires; |
} |
// BOTANIQUE |
public CollectionBotanique getBotanique() { |
if (botanique == null) { |
96,10 → 104,10 |
// COLLECTION MERE NOM |
public String getCollectionMereNom() { |
return renvoyerValeurCorrecte("collection_mere_nom"); |
return renvoyerValeurCorrecte("_collection_mere_nom_"); |
} |
public void setCollectionMereNom(String collectionMereNom) { |
this.set("collection_mere_nom", collectionMereNom); |
this.set("_collection_mere_nom_", collectionMereNom); |
} |
// CE STRUCTURE |
409,11 → 417,11 |
// +--------------------------------------------------------------------------------------------------------------+ |
// STRUCTURE NOM |
public String getStructureNom() { |
return renvoyerValeurCorrecte("structure_nom"); |
return renvoyerValeurCorrecte("_structure_nom_"); |
} |
// STRUCTURE VILLE |
public String getStructureVille() { |
return renvoyerValeurCorrecte("structure_ville"); |
return renvoyerValeurCorrecte("_structure_ville_"); |
} |
} |
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionAsyncDao.java |
---|
103,6 → 103,7 |
public void modifier(Collection collection) { |
String postDonneesEncodees = construirePost(collection.getId(), collection); |
GWT.log(postDonneesEncodees, null); |
String[] parametres = {collection.getId()}; |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres); |
145,7 → 146,8 |
if (collectionId != null) { |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId); |
} |
Debug.log("id projet:"+collection.getIdProjet()); |
/*Debug.log("id projet:"+collection.getIdProjet()); |
Debug.log("liste projet:"+((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).toString()); |
postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).getAbreviation()); |
postDonnees += "&cc_ce_projet=" + URL.encodeComponent(collection.getIdProjet()) + |
169,7 → 171,8 |
"&cc_ce_specimen_type=" + URL.encodeComponent(collection.getSpecimenType()) + |
"&cc_specimen_type_nbre=" + URL.encodeComponent(collection.getSpecimenTypeNbre()) + |
"&cc_ce_specimen_type_nbre_precision=" + URL.encodeComponent(collection.getSpecimenTypeNbrePrecision()) + |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement()); |
"&cc_ce_specimen_type_classement=" + URL.encodeComponent(collection.getSpecimenTypeClassement());*/ |
postDonnees += "&" + collection.obtenirChainePOST(); |
} |
if (collection.getBotanique() != null) { |
177,7 → 180,7 |
postDonnees += "&ccb_id_collection=" + URL.encodeComponent(collectionId); |
} |
CollectionBotanique collectionBotanique = collection.getBotanique(); |
postDonnees += "&ccb_nbre_echantillon=" + URL.encodeComponent(collectionBotanique.getNbreEchantillon()) + |
/*postDonnees += "&ccb_nbre_echantillon=" + URL.encodeComponent(collectionBotanique.getNbreEchantillon()) + |
"&ccb_ce_truk_type=" + URL.encodeComponent(collectionBotanique.getType()) + |
"&ccb_truk_unite_rangement=" + URL.encodeComponent(collectionBotanique.getUniteRangement()) + |
"&ccb_ce_unite_rangement_etat=" + URL.encodeComponent(collectionBotanique.getUniteRangementEtat()) + |
218,7 → 221,8 |
"&ccb_ce_truk_inventaire_digital=" + URL.encodeComponent(collectionBotanique.getInventaireDigital()) + |
"&ccb_inventaire_digital_pourcent=" + URL.encodeComponent(collectionBotanique.getInventaireDigitalPourcent()) + |
"&ccb_ce_inventaire_etat=" + URL.encodeComponent(collectionBotanique.getInventaireEtat()) + |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes()); |
"&ccb_inventaire_donnee_type=" + URL.encodeComponent(collectionBotanique.getInventaireDonneesTypes());*/ |
postDonnees += "&" + collectionBotanique.obtenirChainePOST(); |
} |
return postDonnees; |
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionACommentaire.java |
---|
10,6 → 10,7 |
private static final long serialVersionUID = 8751553802444398035L; |
public static final String PREFIXE = "ccac"; |
private Commentaire commentaireLiee = null; |
public static String[] champsObligatoires = {"cc_id_collection", "ccac_id_commentaire"}; |
public CollectionACommentaire() { |
initialiser(new JSONObject(), false); |
28,6 → 29,10 |
return PREFIXE; |
} |
protected String[] getChampsObligatoires() { |
return champsObligatoires; |
} |
private void initialiser(JSONObject collectionACommentaireListe, boolean chargerCommentaire) { |
if (chargerCommentaire) { |
setCommentaire(new Commentaire(collectionACommentaireListe, false)); |