ItEr39S16CUConfiguracionMaquinasItEr35S09: Renaming getDescription property to getShortDescription

This commit is contained in:
Óscar González Fernández 2009-12-14 20:59:59 +01:00
parent 1de4dd44dd
commit ebbc0a2a25
11 changed files with 21 additions and 14 deletions

View file

@ -75,11 +75,14 @@ public class Machine extends Resource {
this.name = name;
}
@Override
public String getDescription() {
return description;
}
public String getShortDescription() {
return code + " :: " + name;
}
public void setDescription(String description) {
this.description = description;
}

View file

@ -97,7 +97,7 @@ public abstract class Resource extends BaseEntity{
return satisfactionActives;
}
public abstract String getDescription();
public abstract String getShortDescription();
private interface IPredicate {
public boolean accepts(CriterionSatisfaction satisfaction);

View file

@ -66,11 +66,15 @@ public class Worker extends Resource {
this.nif = nif;
}
@Override
public String getDescription(){
public String getDescription() {
return getFirstName()+" "+getSurname();
}
@Override
public String getShortDescription() {
return getNif() + " :: " + getDescription();
}
public String getFirstName() {
return firstName;
}

View file

@ -47,6 +47,6 @@ public class ResourceFinder extends Finder implements IFinder {
@Override
public String _toString(Object value) {
final Resource resource = (Resource) value;
return (resource != null) ? resource.getDescription() : "";
return (resource != null) ? resource.getShortDescription() : "";
}
}

View file

@ -76,7 +76,7 @@ public class AsignedHoursToOrderElementModel implements
Iterator<WorkReportLine> iterador = listWRL.iterator();
while (iterador.hasNext()) {
WorkReportLine w = iterador.next();
w.getResource().getDescription();
w.getResource().getShortDescription();
w.getOrderElement().getWorkHours();
w.getWorkReport().getDate();
this.asignedDirectHours = this.asignedDirectHours + w.getNumHours();

View file

@ -506,7 +506,7 @@ public class AdvancedAllocationController extends GenericForwardComposer {
Restriction restriction) {
return Row.createRow(messages, restriction,
specificResourceAllocation.getResource()
.getDescription(), 1, Arrays
.getShortDescription(), 1, Arrays
.asList(specificResourceAllocation));
}

View file

@ -426,7 +426,7 @@ class FormBinder {
private List<String> getResourcesDescriptions(List<Resource> resources) {
List<String> resourcesDescriptions = new ArrayList<String>();
for (Resource each : resources) {
resourcesDescriptions.add(each.getDescription());
resourcesDescriptions.add(each.getShortDescription());
}
return resourcesDescriptions;
}

View file

@ -92,7 +92,7 @@ public class SpecificAllocationRow extends AllocationRow {
public static SpecificAllocationRow forResource(Resource resource) {
SpecificAllocationRow result = new SpecificAllocationRow();
result.setName(resource.getDescription());
result.setName(resource.getShortDescription());
result.setResource(resource);
result.setResourcesPerDay(ResourcesPerDay.amount(1));
return result;

View file

@ -202,7 +202,7 @@ public class ResourceLoadModel implements IResourceLoadModel {
.sortedByStartDate(resourceAllocationDAO
.findAllocationsRelatedTo(resource));
return new LoadTimelinesGroup(buildTimeLine(resource, resource
.getDescription(), sortedByStartDate), buildSecondLevel(
.getShortDescription(), sortedByStartDate), buildSecondLevel(
resource, sortedByStartDate));
}

View file

@ -967,7 +967,7 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
if (resource == null || orderElement == null) {
return ITEM;
}
return resource.getDescription() + " - " + orderElement.getCode();
return resource.getShortDescription() + " - " + orderElement.getCode();
}
/**

View file

@ -139,7 +139,7 @@ public class WorkReportModel implements IWorkReportModel {
// Load WorkReportType
workReport.getWorkReportType().getName();
if (workReport.getResource() != null) {
workReport.getResource().getDescription();
workReport.getResource().getShortDescription();
}
if (workReport.getOrderElement() != null) {
workReport.getOrderElement().getCode();
@ -160,7 +160,7 @@ public class WorkReportModel implements IWorkReportModel {
// Load WorkReportLines
for (WorkReportLine workReportLine : workReport.getWorkReportLines()) {
workReportLine.getNumHours();
workReportLine.getResource().getDescription();
workReportLine.getResource().getShortDescription();
workReportLine.getOrderElement().getName();
workReportLine.getTypeOfWorkHours().getName();
@ -252,7 +252,7 @@ public class WorkReportModel implements IWorkReportModel {
for (WorkReport each : workReportDAO.list(WorkReport.class)) {
each.getWorkReportType().getName();
if (each.getResource() != null) {
each.getResource().getDescription();
each.getResource().getShortDescription();
}
if (each.getOrderElement() != null) {
each.getOrderElement().getName();