Revision 1956 trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/instruction/SelectColsAdapter.java

View differences:

SelectColsAdapter.java
9 9
 * @author Fernando Gonz?lez Cort?s
10 10
 */
11 11
public class SelectColsAdapter extends Adapter {
12
    private String text;
12
	private String text;
13 13

  
14
    /**
15
     * Devuelve si se utiliz? el modificado DISTINCT
16
     *
17
     * @return boolean
18
     */
19
    public boolean isDistinct() {
20
        String text = Utilities.getText(getEntity());
14
	/**
15
	 * Devuelve si se utiliz? el modificado DISTINCT
16
	 *
17
	 * @return boolean
18
	 */
19
	public boolean isDistinct() {
20
		String text = Utilities.getText(getEntity());
21 21

  
22
        if (text.trim().startsWith("distinct")) {
23
            return true;
24
        } else {
25
            return false;
26
        }
27
    }
22
		if (text.trim().startsWith("distinct")) {
23
			return true;
24
		} else {
25
			return false;
26
		}
27
	}
28 28

  
29
    /**
30
     * Obtiene las expresiones de los campos
31
     *
32
     * @return
33
     */
34
    public Expression[] getFieldsExpression() {
35
        String text = Utilities.getText(getEntity()).trim();
29
	/**
30
	 * Obtiene las expresiones de los campos
31
	 *
32
	 * @return
33
	 */
34
	public Expression[] getFieldsExpression() {
35
		String text = Utilities.getText(getEntity()).trim();
36 36

  
37
        if (text.endsWith("*")) {
38
            return null;
39
        } else {
40
            return ((SelectListAdapter) getChilds()[0]).getFieldsExpression();
41
        }
42
    }
37
		if (text.endsWith("*")) {
38
			return null;
39
		} else {
40
			return ((SelectListAdapter) getChilds()[0]).getFieldsExpression();
41
		}
42
	}
43 43

  
44
    /**
45
     * Obtiene los alias de los campos
46
     *
47
     * @return
48
     */
49
    public String[] getFieldsAlias() {
50
        String text = Utilities.getText(getEntity()).trim();
44
	/**
45
	 * Obtiene los alias de los campos
46
	 *
47
	 * @return
48
	 */
49
	public String[] getFieldsAlias() {
50
		String text = Utilities.getText(getEntity()).trim();
51 51

  
52
        if (text.endsWith("*")) {
53
            return null;
54
        } else {
55
            return ((SelectListAdapter) getChilds()[0]).getFieldsAlias();
56
        }
57
    }
52
		if (text.endsWith("*")) {
53
			return null;
54
		} else {
55
			return ((SelectListAdapter) getChilds()[0]).getFieldsAlias();
56
		}
57
	}
58 58
}

Also available in: Unified diff