dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20540
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9409: minor fix
------------------------------------------------------------
revno: 9409
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-12-28 11:49:37 +0100
message:
minor fix
modified:
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2012-12-13 11:53:32 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2012-12-28 10:49:37 +0000
@@ -182,7 +182,7 @@
* @param expressions the Criterions for the Criteria.
* @return an object of the implementation Class type.
*/
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
protected final T getObject( Criterion... expressions )
{
return (T) getCriteria( expressions ).uniqueResult();
@@ -194,7 +194,7 @@
* @param expressions the Criterions for the Criteria.
* @return a List with objects of the implementation Class type.
*/
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
protected final List<T> getList( Criterion... expressions )
{
return getCriteria( expressions ).list();
@@ -227,7 +227,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public final T get( int id )
{
T object = (T) sessionFactory.getCurrentSession().get( getClazz(), id );
@@ -237,7 +237,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public final T load( int id )
{
T object = (T) sessionFactory.getCurrentSession().load( getClazz(), id );
@@ -283,21 +283,21 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public Collection<T> getLikeName( String name )
{
return getCriteria().add( Restrictions.ilike( "name", "%" + name + "%" ) ).list();
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public final Collection<T> getAll()
{
return getCriteria().list();
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public final Collection<T> getAllSorted()
{
return getCriteria().addOrder( Order.asc( "name" ) ).list();
@@ -306,11 +306,12 @@
@Override
public final void delete( T object )
{
+ AuditLogUtil.infoWrapper( log, currentUserService.getCurrentUsername(), object, AuditLogUtil.ACTION_DELETE );
sessionFactory.getCurrentSession().delete( object );
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public Collection<T> getBetween( int first, int max )
{
Criteria criteria = getCriteria();
@@ -321,7 +322,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getBetweenOrderderByLastUpdated( int first, int max )
{
Criteria criteria = getCriteria();
@@ -332,7 +333,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public Collection<T> getBetweenByName( String name, int first, int max )
{
Criteria criteria = getCriteria();
@@ -382,21 +383,21 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getByLastUpdated( Date lastUpdated )
{
return getCriteria().add( Restrictions.ge( "lastUpdated", lastUpdated ) ).list();
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getByCreated( Date created )
{
return getCriteria().add( Restrictions.ge( "created", created ) ).list();
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getByLastUpdatedSorted( Date lastUpdated )
{
return getCriteria().add( Restrictions.ge( "lastUpdated", lastUpdated ) ).addOrder( Order.asc( "name" ) ).list();
@@ -411,14 +412,14 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public Collection<T> getByUser( User user )
{
return getCriteria( Restrictions.eq( "user", user ) ).list();
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getAccessibleByUser( User user )
{
//TODO link to interface
@@ -430,7 +431,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getAccessibleByLastUpdated( User user, Date lastUpdated )
{
Criteria criteria = getCriteria();
@@ -440,7 +441,7 @@
return criteria.list();
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getAccessibleLikeName( User user, String name )
{
Criteria criteria = getCriteria();
@@ -451,7 +452,7 @@
}
@Override
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getAccessibleBetween( User user, int first, int max )
{
Criteria criteria = getCriteria();
@@ -462,7 +463,7 @@
return criteria.list();
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
public List<T> getAccessibleBetweenLikeName( User user, String name, int first, int max )
{
Criteria criteria = getCriteria();