}
public Resource toResource(SbiResources r) {
logger.debug("IN");
Resource toReturn = new Resource();
String coumn_name = r.getColumnName();
String name = r.getResourceName();
String table_name = r.getTableName();
String descr = r.getResourceDescr();
String code = r.getResourceCode();
SbiDomains d = r.getType();
String type = d.getValueCd();
Integer resourceId = r.getResourceId();
Integer typeId = d.getValueId();
toReturn.setColumn_name(coumn_name);
logger.debug("Resource columnName setted:" + coumn_name);
toReturn.setName(name);
logger.debug("Resource name setted:" + name);
toReturn.setDescr(descr);
logger.debug("Resource description setted:" + descr);
toReturn.setCode(code);
logger.debug("Resource code setted:" + code);
toReturn.setTable_name(table_name);
logger.debug("Resource table_name setted:" + table_name);
toReturn.setType(type);
logger.debug("Resource type setted:" + type);
toReturn.setTypeId(typeId);
logger.debug("Resource typeID setted");
toReturn.setId(resourceId);
logger.debug("Resource ID setted");
logger.debug("OUT");
return toReturn;
}