Blame |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.domain;
/**
* Created by jorgemachado on 02/01/17.
*/
public abstract class OlapFactImpl
extends DomainObject
{
/*
public String serializeEntireFactFields() throws InvocationTargetException, IllegalAccessException {
List<String> fieldsNames = new ArrayList<String>();
List<Method> methods = Arrays.asList(this.getClass().getMethods());
methods.sort(new Comparator<Method>() {
@Override
public int compare(Method o1, Method o2) {
return o1.getName().compareTo(o2.getName());
}
});
StringBuilder builder = new StringBuilder();
for(Method method:methods)
{
if(method.getReturnType() != null && method.getParameters().length == 0 && method.getName().startsWith("get") || method.getName().startsWith("is"))
{
if(isWrapperType(method.getClass()))
{
}
fieldsNames.add(method.getName());
}
}
return null;
}
private static final Set<Class<?>> WRAPPER_TYPES = getWrapperTypes();
public static boolean isWrapperType(Class<?> clazz)
{
return WRAPPER_TYPES.contains(clazz);
}
public static Set<Class<?>> getWrapperTypes()
{
Set<Class<?>> ret = new HashSet<Class<?>>();
ret.add(Boolean.class);
ret.add(Character.class);
ret.add(Byte.class);
ret.add(Short.class);
ret.add(Integer.class);
ret.add(Long.class);
ret.add(Float.class);
ret.add(Double.class);
ret.add(Void.class);
return ret;
}
@Override
public String[] getFieldsNamesArray() {
return new String[0];
}
@Override
public String[] getFieldsArray() {
return new String[0];
}
@Override
public String[] getFieldsNotAllowed() {
return new String[0];
}
@Override
public boolean canPublishFields() {
return false;
}*/
public abstract 1.5.0/docs/api/java/lang/String.html">String[] getFields
();
public abstract 1.5.0/docs/api/java/lang/String.html">String[] getFieldsValues
();
}