Subversion Repositories bacoAlunos

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1586 jmachado 1
package pt.estgp.estgweb.domain;
2
 
3
/**
4
 * Created by jorgemachado on 02/01/17.
5
 */
6
public abstract class OlapFactImpl extends DomainObject
7
{
8
/*
9
    public String serializeEntireFactFields() throws InvocationTargetException, IllegalAccessException {
10
        List<String> fieldsNames = new ArrayList<String>();
11
        List<Method> methods = Arrays.asList(this.getClass().getMethods());
12
        methods.sort(new Comparator<Method>() {
13
            @Override
14
            public int compare(Method o1, Method o2) {
15
                return o1.getName().compareTo(o2.getName());
16
            }
17
        });
18
        StringBuilder builder = new StringBuilder();
19
        for(Method method:methods)
20
        {
21
            if(method.getReturnType() != null && method.getParameters().length == 0 && method.getName().startsWith("get") || method.getName().startsWith("is"))
22
            {
23
                if(isWrapperType(method.getClass()))
24
                {
25
 
26
                }
27
 
28
                fieldsNames.add(method.getName());
29
 
30
            }
31
        }
32
        return null;
33
    }
34
 
35
    private static final Set<Class<?>> WRAPPER_TYPES = getWrapperTypes();
36
 
37
    public static boolean isWrapperType(Class<?> clazz)
38
    {
39
        return WRAPPER_TYPES.contains(clazz);
40
    }
41
 
42
    public static Set<Class<?>> getWrapperTypes()
43
    {
44
        Set<Class<?>> ret = new HashSet<Class<?>>();
45
        ret.add(Boolean.class);
46
        ret.add(Character.class);
47
        ret.add(Byte.class);
48
        ret.add(Short.class);
49
        ret.add(Integer.class);
50
        ret.add(Long.class);
51
        ret.add(Float.class);
52
        ret.add(Double.class);
53
        ret.add(Void.class);
54
        return ret;
55
    }
56
 
57
    @Override
58
    public String[] getFieldsNamesArray() {
59
        return new String[0];
60
    }
61
 
62
    @Override
63
    public String[] getFieldsArray() {
64
        return new String[0];
65
    }
66
 
67
    @Override
68
    public String[] getFieldsNotAllowed() {
69
        return new String[0];
70
    }
71
 
72
    @Override
73
    public boolean canPublishFields() {
74
        return false;
75
    }*/
76
 
77
    public abstract 1.5.0/docs/api/java/lang/String.html">String[] getFields();
78
    public abstract 1.5.0/docs/api/java/lang/String.html">String[] getFieldsValues();
79
}