public static Object initialize(Class clazz, Object record)
    {
        try
        {
            if (record == null)
            {
                record = createNewInstance(clazz);
            }
            return record;
        }
        catch (Exception e)
        {
            throw new PersistenceException("Error occured while instantiating entity.", e);
        }
    }
public static Object initialize ( Class clazz , Object record ) { try { if ( record == null ) { record = createNewInstance ( clazz ) ; } return record ; } catch ( Exception e ) { throw new PersistenceException ( "Error occured while instantiating entity." , e ) ; } }
Initialize.

@param tr
the tr
@param m
the m
@param entity
the entity
@param tr
@return the object
@throws InstantiationException
the instantiation exception
@throws IllegalAccessException
the illegal access exception