diff --git a/ganttzk/pom.xml b/ganttzk/pom.xml index 865e33994..c3534a542 100644 --- a/ganttzk/pom.xml +++ b/ganttzk/pom.xml @@ -40,7 +40,7 @@ org.apache.maven.plugins maven-source-plugin - 2.1.2 + 3.0.0 default diff --git a/libreplan-business/src/main/java/org/libreplan/business/advance/entities/AdvanceType.java b/libreplan-business/src/main/java/org/libreplan/business/advance/entities/AdvanceType.java index 447072f60..4a3572d2f 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/advance/entities/AdvanceType.java +++ b/libreplan-business/src/main/java/org/libreplan/business/advance/entities/AdvanceType.java @@ -47,22 +47,30 @@ public class AdvanceType extends BaseEntity implements IHumanIdentifiable{ public static AdvanceType create() { AdvanceType advanceType = new AdvanceType(); advanceType.setNewObject(true); + return advanceType; } public static AdvanceType create(String unitName, - BigDecimal defaultMaxValue, boolean updatable, - BigDecimal unitPrecision, boolean active, boolean percentage) { - return create(unitName, defaultMaxValue, updatable, unitPrecision, - active, percentage, false); + BigDecimal defaultMaxValue, + boolean updatable, + BigDecimal unitPrecision, + boolean active, + boolean percentage) { + + return create(unitName, defaultMaxValue, updatable, unitPrecision, active, percentage, false); } public static AdvanceType create(String unitName, - BigDecimal defaultMaxValue, boolean updatable, - BigDecimal unitPrecision, boolean active, boolean percentage, - boolean qualityForm) { - return create(new AdvanceType(unitName, defaultMaxValue, updatable, - unitPrecision, active, percentage, qualityForm)); + BigDecimal defaultMaxValue, + boolean updatable, + BigDecimal unitPrecision, + boolean active, + boolean percentage, + boolean qualityForm) { + + return create( + new AdvanceType(unitName, defaultMaxValue, updatable, unitPrecision, active, percentage, qualityForm)); } private String unitName; diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/daos/IEntitySequenceDAO.java b/libreplan-business/src/main/java/org/libreplan/business/common/daos/IEntitySequenceDAO.java index 7695680f9..238085afb 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/common/daos/IEntitySequenceDAO.java +++ b/libreplan-business/src/main/java/org/libreplan/business/common/daos/IEntitySequenceDAO.java @@ -41,21 +41,18 @@ public interface IEntitySequenceDAO extends IGenericDAO { List getAll(); - List findEntitySquencesNotIn( - List entitySequences); + List findEntitySquencesNotIn(List entitySequences); - void remove(EntitySequence entitySequence) - throws InstanceNotFoundException, IllegalArgumentException; + void remove(EntitySequence entitySequence) throws InstanceNotFoundException, IllegalArgumentException; - EntitySequence getActiveEntitySequence(EntityNameEnum entityName) - throws InstanceNotFoundException, NonUniqueResultException; + EntitySequence getActiveEntitySequence(EntityNameEnum entityName) throws InstanceNotFoundException, + NonUniqueResultException; String getNextEntityCode(EntityNameEnum entityName); String getNextEntityCodeWithoutTransaction(EntityNameEnum entityName); - boolean existOtherActiveSequenceByEntityNameForNewObject( - EntitySequence entitySequence); + boolean existOtherActiveSequenceByEntityNameForNewObject(EntitySequence entitySequence); Integer getNumberOfDigitsCode(EntityNameEnum entityName); diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/entities/EntityNameEnum.java b/libreplan-business/src/main/java/org/libreplan/business/common/entities/EntityNameEnum.java index f8f127d53..1a417c9d4 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/common/entities/EntityNameEnum.java +++ b/libreplan-business/src/main/java/org/libreplan/business/common/entities/EntityNameEnum.java @@ -49,22 +49,31 @@ import org.libreplan.business.workreports.entities.WorkReportType; */ public enum EntityNameEnum { - ORDER("Project", false), CRITERION("Criterion", true), LABEL("Label", true), MACHINE( - "Machine", true), WORKER("Worker", true), UNIT_TYPE( - "Material unit", - true), CALENDAR("Calendar", true), WORK_HOURS_TYPE( - "Hours type", true), MATERIAL_CATEGORY("Material category", true), WORK_REPORT( - "Timesheet", true), WORKREPORTTYPE("Timesheet template", false), CALENDAR_EXCEPTION_TYPE( - "Calendar exception day", true), COST_CATEGORY("Cost category", - true), RESOURCE_CALENDAR("Resource calendar", true), CRITERION_SATISFACTION( - "Criterion satisfaction", true), RESOURCE_COST_CATEGORY_ASSIGNMENT( - "Resource cost category assignment", true), EXPENSE_SHEET("Expense sheet", true), ISSUE_LOG("Issue log", true), RISK_LOG("Risk log", true); + ORDER("Project", false), + CRITERION("Criterion", true), + LABEL("Label", true), + MACHINE("Machine", true), + WORKER("Worker", true), + UNIT_TYPE("Material unit", true), + CALENDAR("Calendar", true), + WORK_HOURS_TYPE("Hours type", true), + MATERIAL_CATEGORY("Material category", true), + WORK_REPORT("Timesheet", true), + WORKREPORTTYPE("Timesheet template", false), + CALENDAR_EXCEPTION_TYPE("Calendar exception day", true), + COST_CATEGORY("Cost category", true), + RESOURCE_CALENDAR("Resource calendar", true), + CRITERION_SATISFACTION("Criterion satisfaction", true), + RESOURCE_COST_CATEGORY_ASSIGNMENT("Resource cost category assignment", true), + EXPENSE_SHEET("Expense sheet", true), + ISSUE_LOG("Issue log", true), + RISK_LOG("Risk log", true); private String description; private boolean canContainLowBar; - private EntityNameEnum(String description, boolean canContainLowBar) { + EntityNameEnum(String description, boolean canContainLowBar) { this.description = description; this.canContainLowBar = canContainLowBar; } @@ -80,59 +89,47 @@ public enum EntityNameEnum { public IIntegrationEntityDAO getIntegrationEntityDAO() { switch (this) { case ORDER: - return (IIntegrationEntityDAO) Registry.getOrderDAO(); + return Registry.getOrderDAO(); case CRITERION: - return (IIntegrationEntityDAO) Registry - .getCriterionTypeDAO(); + return Registry.getCriterionTypeDAO(); case LABEL: - return (IIntegrationEntityDAO) Registry - .getLabelTypeDAO(); + return Registry.getLabelTypeDAO(); case MACHINE: - return (IIntegrationEntityDAO) Registry.getMachineDAO(); + return Registry.getMachineDAO(); case WORKER: - return (IIntegrationEntityDAO) Registry.getWorkerDAO(); + return Registry.getWorkerDAO(); case UNIT_TYPE: - return (IIntegrationEntityDAO) Registry.getUnitTypeDAO(); + return Registry.getUnitTypeDAO(); case CALENDAR: case RESOURCE_CALENDAR: - return (IIntegrationEntityDAO) Registry - .getCalendarDataDAO(); + return Registry.getCalendarDataDAO(); case WORK_HOURS_TYPE: - return (IIntegrationEntityDAO) Registry - .getTypeOfWorkHoursDAO(); + return Registry.getTypeOfWorkHoursDAO(); case MATERIAL_CATEGORY: - return (IIntegrationEntityDAO) Registry - .getMaterialCategoryDAO(); + return Registry.getMaterialCategoryDAO(); case WORK_REPORT: - return (IIntegrationEntityDAO) Registry - .getWorkReportDAO(); + return Registry.getWorkReportDAO(); case WORKREPORTTYPE: - return (IIntegrationEntityDAO) Registry - .getWorkReportTypeDAO(); + return Registry.getWorkReportTypeDAO(); case CALENDAR_EXCEPTION_TYPE: - return (IIntegrationEntityDAO) Registry - .getCalendarExceptionTypeDAO(); + return Registry.getCalendarExceptionTypeDAO(); case COST_CATEGORY: - return (IIntegrationEntityDAO) Registry - .getCostCategoryDAO(); + return Registry.getCostCategoryDAO(); case CRITERION_SATISFACTION: - return (IIntegrationEntityDAO) Registry - .getCriterionSatisfactionDAO(); + return Registry.getCriterionSatisfactionDAO(); case RESOURCE_COST_CATEGORY_ASSIGNMENT: - return (IIntegrationEntityDAO) Registry - .getResourcesCostCategoryAssignmentDAO(); + return Registry.getResourcesCostCategoryAssignmentDAO(); case EXPENSE_SHEET: - return (IIntegrationEntityDAO) Registry.getExpenseSheetDAO(); + return Registry.getExpenseSheetDAO(); case ISSUE_LOG: - return (IIntegrationEntityDAO) Registry.getIssueLogDAO(); + return Registry.getIssueLogDAO(); case RISK_LOG: - return (IIntegrationEntityDAO) Registry.getRiskLogDAO(); + return Registry.getRiskLogDAO(); default: - throw new RuntimeException("can't handle the code sequence of the " - + description); + throw new RuntimeException("can't handle the code sequence of the " + description); } } diff --git a/libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml b/libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml index f50fa4aaf..2eb4c3e8a 100644 --- a/libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml +++ b/libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml @@ -15,8 +15,7 @@ When the DAO does a query, the pending changes are flushed, causing the validations to be run again. --> - none + none true jvm diff --git a/libreplan-business/src/main/resources/libreplan-business-spring-config.xml b/libreplan-business/src/main/resources/libreplan-business-spring-config.xml index e8f7d79b7..d1d59767b 100644 --- a/libreplan-business/src/main/resources/libreplan-business-spring-config.xml +++ b/libreplan-business/src/main/resources/libreplan-business-spring-config.xml @@ -14,7 +14,7 @@ + p:jndiName="${dataSource.jndiName}" p:resourceRef="true" /> @@ -125,9 +125,7 @@ - + - + diff --git a/libreplan-business/src/main/resources/org/libreplan/business/advance/entities/Advance.hbm.xml b/libreplan-business/src/main/resources/org/libreplan/business/advance/entities/Advance.hbm.xml index edf4c3da2..f7f57af74 100644 --- a/libreplan-business/src/main/resources/org/libreplan/business/advance/entities/Advance.hbm.xml +++ b/libreplan-business/src/main/resources/org/libreplan/business/advance/entities/Advance.hbm.xml @@ -12,17 +12,13 @@ - - + + - + - + @@ -37,14 +33,13 @@ - + - + - + @@ -75,7 +70,7 @@ - + - - + + @@ -138,8 +131,7 @@ column="order_element_template_id" index="idx_advance_assigment_template_on_template"/> - + diff --git a/libreplan-business/src/main/resources/org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml b/libreplan-business/src/main/resources/org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml index eadfb94fb..5e8b6b5de 100644 --- a/libreplan-business/src/main/resources/org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml +++ b/libreplan-business/src/main/resources/org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml @@ -45,9 +45,7 @@ - - org.libreplan.business.externalcompanies.entities.CommunicationType - + org.libreplan.business.externalcompanies.entities.CommunicationType diff --git a/libreplan-business/src/test/java/org/libreplan/business/common/EntitySequenceTest.java b/libreplan-business/src/test/java/org/libreplan/business/common/EntitySequenceTest.java index ef1640421..d7d707a61 100644 --- a/libreplan-business/src/test/java/org/libreplan/business/common/EntitySequenceTest.java +++ b/libreplan-business/src/test/java/org/libreplan/business/common/EntitySequenceTest.java @@ -47,9 +47,7 @@ import org.springframework.transaction.annotation.Transactional; */ @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = { - BUSINESS_SPRING_CONFIG_FILE, - BUSINESS_SPRING_CONFIG_TEST_FILE }) +@ContextConfiguration(locations = {BUSINESS_SPRING_CONFIG_FILE, BUSINESS_SPRING_CONFIG_TEST_FILE }) public class EntitySequenceTest { @Autowired diff --git a/libreplan-business/src/test/java/org/libreplan/business/test/workreports/entities/WorkReportTypeTest.java b/libreplan-business/src/test/java/org/libreplan/business/test/workreports/entities/WorkReportTypeTest.java index 1abbe4d29..9fb2fad9d 100644 --- a/libreplan-business/src/test/java/org/libreplan/business/test/workreports/entities/WorkReportTypeTest.java +++ b/libreplan-business/src/test/java/org/libreplan/business/test/workreports/entities/WorkReportTypeTest.java @@ -44,8 +44,7 @@ import org.springframework.transaction.annotation.Transactional; * @author Susana Montes Pedreira */ @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = { BUSINESS_SPRING_CONFIG_FILE, - BUSINESS_SPRING_CONFIG_TEST_FILE }) +@ContextConfiguration(locations = { BUSINESS_SPRING_CONFIG_FILE, BUSINESS_SPRING_CONFIG_TEST_FILE }) public class WorkReportTypeTest extends AbstractWorkReportTest { @Autowired diff --git a/libreplan-business/src/test/resources/libreplan-business-hibernate-test.cfg.xml b/libreplan-business/src/test/resources/libreplan-business-hibernate-test.cfg.xml index e1676e312..4ac657155 100644 --- a/libreplan-business/src/test/resources/libreplan-business-hibernate-test.cfg.xml +++ b/libreplan-business/src/test/resources/libreplan-business-hibernate-test.cfg.xml @@ -9,11 +9,9 @@ true create-drop - none + none - none + none true jvm diff --git a/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml b/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml index fa7a5ee8b..8cdfe75ea 100644 --- a/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml +++ b/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml @@ -1,16 +1,16 @@ + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"> diff --git a/pom.xml b/pom.xml index 5f5986b93..6c825bb07 100644 --- a/pom.xml +++ b/pom.xml @@ -192,12 +192,12 @@ net.sf.jasperreports jasperreports - 4.7.0 + 6.2.2 net.sf.jasperreports jasperreports-fonts - 4.0.0 + 6.0.0 @@ -242,6 +242,7 @@ + org.hibernate hibernate-core @@ -428,7 +429,7 @@ org.beanshell bsh - 2.0b4 + 2.0b5 runtime @@ -436,7 +437,7 @@ commons-fileupload commons-fileupload - 1.2.1 + 1.3.1 runtime @@ -593,12 +594,12 @@ com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.7.3 + 2.7.4 com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.7.3 + 2.7.4