=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2012-02-16 15:31:42 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2012-02-17 13:25:29 +0000 @@ -126,11 +126,6 @@ */ private int expiryDays; - /** - * Locking exceptions - */ - private Set lockExceptions = new HashSet(); - // ------------------------------------------------------------------------- // Contructors // ------------------------------------------------------------------------- @@ -448,17 +443,4 @@ { this.expiryDays = expiryDays; } - - @XmlElementWrapper( name = "lockExceptions" ) - @XmlElement( name = "lockException" ) - @JsonProperty - public Set getLockExceptions() - { - return lockExceptions; - } - - public void setLockExceptions( Set lockExceptions ) - { - this.lockExceptions = lockExceptions; - } } === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2012-02-16 18:13:44 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2012-02-17 13:25:29 +0000 @@ -27,7 +27,19 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.apache.commons.lang.Validate; +import static org.hisp.dhis.i18n.I18nUtils.getCountByName; +import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetween; +import static org.hisp.dhis.i18n.I18nUtils.getObjectsBetweenByName; +import static org.hisp.dhis.i18n.I18nUtils.i18n; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hisp.dhis.dataelement.DataElement; @@ -43,10 +55,6 @@ import org.joda.time.DateTime; import org.springframework.transaction.annotation.Transactional; -import java.util.*; - -import static org.hisp.dhis.i18n.I18nUtils.*; - /** * @author Lars Helge Overland * @version $Id: DefaultDataSetService.java 6255 2008-11-10 16:01:24Z larshelg $ @@ -335,32 +343,18 @@ @Override public int addLockException( LockException lockException ) { - Validate.notNull( lockException ); - - DataSet dataSet = lockException.getDataSet(); - - dataSet.getLockExceptions().add( lockException ); - return lockExceptionStore.save( lockException ); } @Override public void updateLockException( LockException lockException ) { - Validate.notNull( lockException ); - lockExceptionStore.update( lockException ); } @Override public void deleteLockException( LockException lockException ) { - Validate.notNull( lockException ); - - DataSet dataSet = lockException.getDataSet(); - - dataSet.getLockExceptions().remove( lockException ); - lockExceptionStore.delete( lockException ); } === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateLockExceptionStore.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateLockExceptionStore.java 2012-02-17 13:13:54 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateLockExceptionStore.java 2012-02-17 13:25:29 +0000 @@ -95,7 +95,7 @@ @Override public Collection getCombinations() { - final String sql = "SELECT DISTINCT datasetid, periodid FROM LockException"; + final String sql = "select distinct datasetid, periodid from LockException"; final Collection lockExceptions = new ArrayList(); @@ -124,7 +124,7 @@ @Override public void deleteCombination( DataSet dataSet, Period period ) { - final String hql = "DELETE FROM LockException WHERE dataSet=:dataSet AND period=:period"; + final String hql = "delete from LockException where dataSet=:dataSet and period=:period"; Query query = getQuery( hql ); query.setParameter( "dataSet", dataSet ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-02-17 12:10:18 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-02-17 13:25:29 +0000 @@ -100,6 +100,7 @@ executeSql( "DROP TABLE datasetlockedperiods" ); executeSql( "DROP TABLE datasetlocksource" ); executeSql( "DROP TABLE datasetlock" ); + executeSql( "DROP TABLE datasetlockexceptions" ); executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" ); executeSql( "ALTER TABLE reporttable DROP column dimension_type" ); executeSql( "ALTER TABLE reporttable DROP column dimensiontype" ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2012-02-16 15:31:42 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2012-02-17 13:25:29 +0000 @@ -63,11 +63,5 @@ - - - - - - === modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2012-02-12 19:37:55 +0000 +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2012-02-17 13:25:29 +0000 @@ -116,8 +116,6 @@ - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockException.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockException.vm 2012-02-14 07:51:50 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/lockException.vm 2012-02-17 13:25:29 +0000 @@ -38,7 +38,7 @@ - +
$i18n.getString( "name" )