Projects >> jcommune >>b8b48b905e47fcf88385559b52c0e72354c89531

Chunk
Conflicting content
package org.jtalks.jcommune.model.dao.hibernate;
<<<<<<< HEAD
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.model.dao.hibernate;

import java.util.List;
import org.hibernate.Query;
import org.jtalks.jcommune.model.entity.Persistent;
import org.jtalks.jcommune.model.entity.User;

/**
 * DAO for instances of {@link User}
 * 
 * @author Temdegon
 */
public class UserHibernateDao extends AbstractHibernateDao {

    @Override
    public void saveOrUpdate(Persistent user) {
        getSession().save(user);
    }

    @Override
    public void delete(Long userId) {
        Query query = getSession().createQuery("delete Author where id= :authorId");
        query.setLong("authorId", userId);
        query.executeUpdate();
    }

    @Override
    public User get(Long id) {
        return (User) getSession().load(User.class, id);
    }

    @Override
    public List getAll() {
        return getSession().createQuery("from User").list();
    }
}
=======
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */

import java.util.List;
import org.hibernate.Query;
import org.jtalks.jcommune.model.entity.Persistent;
import org.jtalks.jcommune.model.entity.User;

/**
 * DAO for instances of {@link User}.
 * 
 * @author Pavel Vervenko
 */
public class UserHibernateDao extends AbstractHibernateDao {

    /**
     * {@inheritDoc}
     */
    @Override
    public void saveOrUpdate(Persistent user) {
        getSession().save(user);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void delete(Long userId) {
        Query query = getSession().createQuery("delete User where id= :authorId");
        query.setLong("authorId", userId);
        query.executeUpdate();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public User get(Long id) {
        return (User) getSession().load(User.class, id);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List getAll() {
        return getSession().createQuery("from User").list();
    }
}
>>>>>>> 99d952cb648867aa401cb31efa5ec28989ec05e2
Solution content
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.model.dao.hibernate;

import java.util.List;
import org.hibernate.Query;
import org.jtalks.jcommune.model.entity.Persistent;
import org.jtalks.jcommune.model.entity.User;

/**
 * DAO for instances of {@link User}.
 * 
 * @author Pavel Vervenko
 */
public class UserHibernateDao extends AbstractHibernateDao {

    /**
     * {@inheritDoc}
     */
    @Override
    public void saveOrUpdate(Persistent user) {
        getSession().save(user);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void delete(Long userId) {
        Query query = getSession().createQuery("delete User where id= :authorId");
        query.setLong("authorId", userId);
        query.executeUpdate();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public User get(Long id) {
        return (User) getSession().load(User.class, id);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List getAll() {
        return getSession().createQuery("from User").list();
    }
}
File
UserHibernateDao.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
	}

	/* (non-Javadoc)
<<<<<<< HEAD
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Post;
import org.jtalks.jcommune.service.PostService;

/**
 * @author Snail
 *
 */
public class TransactionalPostService implements PostService {
	private Dao postDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Post persistent) {
		postDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		postDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(Post persistent) {
		postDao.delete(persistent);
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Post get(Long id) {
		return postDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		return postDao.getAll();
	}

}
=======
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Post;
import org.jtalks.jcommune.service.PostService;

/**
 * @author Snail
 *
 */
public class TransactionalPostService implements PostService {
	private Dao postDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Post persistent) {
		postDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		postDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(Post persistent) {
		postDao.delete(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Post get(Long id) {
		return postDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported for this service");
	}

}
>>>>>>> 99d952cb648867aa401cb31efa5ec28989ec05e2
Solution content
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Post;
import org.jtalks.jcommune.service.PostService;

/**
 * @author Snail
 *
 */
public class TransactionalPostService implements PostService {
	private Dao postDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Post persistent) {
		postDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		postDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(Post persistent) {
		postDao.delete(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Post get(Long id) {
		return postDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported for this service");
	}

}
File
TransactionalPostService.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
	}

 * 
<<<<<<< HEAD
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
	public void delete(Topic persistent) {
		topicDao.delete(persistent);		
/**
 * @author Snail
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Topic;
import org.jtalks.jcommune.service.TopicService;

/**
 * @author Snail
 *
 */
public class TransactionalTopicService implements TopicService {
	
	private Dao topicDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Topic persistent) {
		topicDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		topicDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Topic get(Long id) {
		return topicDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		return topicDao.getAll();
	}

}
=======
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Topic;
import org.jtalks.jcommune.service.TopicService;

 */
public class TransactionalTopicService implements TopicService {
	
	private Dao topicDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Topic persistent) {
		topicDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		topicDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(Topic persistent) {
		topicDao.delete(persistent);		
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Topic get(Long id) {
		return topicDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported yet");
	}

}
>>>>>>> 99d952cb648867aa401cb31efa5ec28989ec05e2
Solution content
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.Topic;
import org.jtalks.jcommune.service.TopicService;

/**
 * @author Snail
 *
 */
public class TransactionalTopicService implements TopicService {
	
	private Dao topicDao;

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(Topic persistent) {
		topicDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		topicDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(Topic persistent) {
		topicDao.delete(persistent);		
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public Topic get(Long id) {
		return topicDao.get(id);
	}

	/* (non-Javadoc)
	 * @see org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported yet");
	}

}
File
TransactionalTopicService.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:jcommune/jcommune-service/src/main/java/org/jtalks/jcommune/service/transactional/TtransactionalUserService.java
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public

 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.User;
import org.jtalks.jcommune.service.UserService;

/**
 * @author Snail
 *
 */
public class TtransactionalUserService implements UserService {
	private Dao userDao;

	public TtransactionalUserService(Dao userDao) {
		this.userDao = userDao;
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(User persistent) {
		userDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		userDao.delete(id);
	}
package org.jtalks.jcommune.service.transactional;

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(User persistent) {
		userDao.delete(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public User get(Long id) {
		return userDao.get(id);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		return userDao.getAll();
	}

}
=======
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.User;
import org.jtalks.jcommune.service.UserService;

/**
 * @author Snail
 *
 */
public class TransactionalUserService implements UserService {
	private Dao userDao;

	public TransactionalUserService(Dao userDao) {
		this.userDao = userDao;
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(User persistent) {
		userDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		userDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(User persistent) {
		userDao.delete(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public User get(Long id) {
		return userDao.get(id);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported for this service");
	}

}
>>>>>>> 99d952cb648867aa401cb31efa5ec28989ec05e2:jcommune/jcommune-service/src/main/java/org/jtalks/jcommune/service/transactional/TransactionalUserService.java
Solution content
/* 
 * JTalks for uniting people
 * Copyright (C) 2011  JavaTalks Team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * Also add information on how to contact you by electronic and paper mail.
 * 
 * This file creation date: Apr 12, 2011 / 8:05:19 PM
 * The JTalks Project
 * http://www.jtalks.org
 */
package org.jtalks.jcommune.service.transactional;

import java.util.List;

import org.jtalks.jcommune.model.dao.Dao;
import org.jtalks.jcommune.model.entity.User;
import org.jtalks.jcommune.service.UserService;

/**
 * @author Snail
 *
 */
public class TransactionalUserService implements UserService {
	private Dao userDao;

	public TransactionalUserService(Dao userDao) {
		this.userDao = userDao;
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#saveOrUpdate(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void saveOrUpdate(User persistent) {
		userDao.saveOrUpdate(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		userDao.delete(id);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#delete(org.jtalks.jcommune.model.entity.Persistent)
	 */
	@Override
	public void delete(User persistent) {
		userDao.delete(persistent);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#get(java.lang.Long)
	 */
	@Override
	public User get(Long id) {
		return userDao.get(id);
	}

	/* (non-Javadoc)
	 * @see main.java.org.jtalks.jcommune.service.EntityService#getAll()
	 */
	@Override
	public List getAll() {
		throw new UnsupportedOperationException("This operation is't supported for this service");
	}

}
File
TransactionalUserService.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration