Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/03/2012, 03:15
Avatar de luna690
luna690
 
Fecha de Ingreso: marzo-2012
Ubicación: Barcelona
Mensajes: 61
Antigüedad: 12 años, 2 meses
Puntos: 3
Problema con IF: Campos vacios y null

¿Que tengo mal?

Código:
if ( (
                this.getEan()!=null && !"".equals(this.getEan())) 
                || (this.getISBN()!=null && !"".equals(this.getISBN()) 
              ) 
                && brand==true 
                && this.getId() != null
                && this.getName(locale) != null
                && this.getProduct().getSummary().get(locale) != null
                && this.getCondition() != null
                && this.getConvenientCurrentPrice() != null
                && this.getConvenientFirstDocument() != null
                && this.getConvenientFirstDocument().getBinaryId() != null
                && this.getConvenientFirstDocument().getFilename() != null
                && this.rest(locale) != null
            ) { return true; }
        return false;
Necesito que los campos obligatorios: brand, id, nombre, descripcion del producto, condicion, precio, first-document no sean campos vacios.
Y, necesito que haya uno de los dos campos (ean/isbn) llenos.

Que tengo mal?