Examples of Parametre


Examples of com.evasion.entity.Parametre

     *
     * @param propertyName nom du parametre recherche.
     * @return objet parametre resultat de la recherche.
     */
    public Parametre findByPropertyName(final String propertyName) {
        Parametre result;
        Query query = (Query) getEntityManager().
                createNamedQuery(Parametre.FIND_PROPERTY);
        query.setParameter(1, propertyName);
        try {
            result = (Parametre) query.getSingleResult();
View Full Code Here

Examples of com.evasion.entity.Parametre

     */
    private Boolean saveParam(final String property,
            final String valeur, final Boolean force) {
        Boolean result = Boolean.FALSE;

        Parametre param = dao.findByPropertyName(property);
        Boolean exist = param != null;
        if (!exist || force) {
            if (exist) {
                param.setValeur(valeur);
                dao.merge(param);
            } else {
                param = new Parametre(property, valeur);
                dao.persist(param);
            }
            dao.flush();
            result = Boolean.TRUE;
        }
View Full Code Here

Examples of com.evasion.entity.Parametre

    public void deleteParametre(String property) {
        if (property == null || property.isEmpty()) {
            throw new IllegalArgumentException("La property ne "
                    + "peut etre vide ou null");
        }
        Parametre param = dao.findByPropertyName(property);
        if (param != null) {
            dao.remove(param);
        }
    }
View Full Code Here

Examples of com.evasion.entity.Parametre

    public String getProperty(String property) {
        if (property == null || property.isEmpty()) {
            throw new IllegalArgumentException("La property ne "
                    + "peut etre vide ou null");
        }
        Parametre result = dao.findByPropertyName(property);
        if (result == null) {
            return null;
        } else {
            return result.getValeur();
        }
    }
View Full Code Here

Examples of org.xrace.model.Parametre

   * @see wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
   */
  @Override
  public Object getDisplayValue(final Object object)
  {
    final Parametre parametre = (Parametre) object;

    return parametre.getNom();
  }
View Full Code Here

Examples of org.xrace.model.Parametre

  private void createTestParametre()
  {

    //les formats suivants (pixels) : 468X60, 234X60, 80X15, 120X240 et 728X90.

    Parametre p;

    p = new Parametre();
    p.setId((long) 100);
    p.setType("FORMAT_PUB");
    p.setNom("468X60");
    p.setValeur1("480");
    p.setValeur2("60");
    p.setDescription("468X60");

    this.getParametreService().save(p);

    p = new Parametre();
    p.setId((long) 101);
    p.setType("FORMAT_PUB");
    p.setNom("234X60");
    p.setValeur1("234");
    p.setValeur2("60");
    p.setDescription("234X60");

    this.getParametreService().save(p);

    p = new Parametre();
    p.setId((long) 102);
    p.setType("FORMAT_PUB");
    p.setNom("80X15");
    p.setValeur1("80");
    p.setValeur2("15");
    p.setDescription("80X15");

    this.getParametreService().save(p);

    p = new Parametre();
    p.setId((long) 103);
    p.setType("FORMAT_PUB");
    p.setNom("120X240");
    p.setValeur1("120");
    p.setValeur2("240");
    p.setDescription("120X240");

    this.getParametreService().save(p);

    p = new Parametre();
    p.setId((long) 104);
    p.setType("FORMAT_PUB");
    p.setNom("728X90");
    p.setValeur1("728");
    p.setValeur2("90");
    p.setDescription("728X90");

    this.getParametreService().save(p);

    //les formats suivants (pixels) : 468X60, 234X60, 80X15, 120X240 et 728X90.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.