| Chunk |
|---|
| Conflicting content |
|---|
* @author Vitaliy Kravchenko * @author Pavel Vervenko */ <<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/BranchHibernateDao.java public class BranchHibernateDao extends ParentRepositoryImpl |
| Solution content |
|---|
* @author Vitaliy Kravchenko * @author Pavel Vervenko */ public class BranchHibernateDao extends AbstractHibernateDao |
| File |
|---|
| BranchHibernateDao.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Other |
| Chunk |
|---|
| Conflicting content |
|---|
/**
*
* @author Pavel Vervenko
*/
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/PostHibernateDao.java
public class PostHibernateDao extends AbstractHibernateChildRepository |
| Solution content |
|---|
* * @author Pavel Vervenko */ public class ComponentHibernateDao extends AbstractHibernateDao |
| File |
|---|
| ComponentHibernateDao.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Class signature |
| Chunk |
|---|
| Conflicting content |
|---|
*/
@Override
@SuppressWarnings("unchecked")
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/PostHibernateDao.java
public List |
| Solution content |
|---|
*/
@Override
@SuppressWarnings("unchecked")
public List |
| File |
|---|
| ComponentHibernateDao.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* {@inheritDoc}
*/
@Override
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/PostHibernateDao.java
public int getPostsInTopicCount(long topicId) {
return ((Number) getSession().createQuery("select count(*) from Post p where p.topic = ?")
.setCacheable(true).setLong(0, topicId).uniqueResult()).intValue();
=======
public Set |
| Solution content |
|---|
* {@inheritDoc}
*/
@Override
public Set |
| File |
|---|
| ComponentHibernateDao.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Forum branch that contains topics related to branch theme.
*
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/entity/Branch.java
* @author Vitaliy Kravchenko
* @author Kirill Afonin
=======
* @author Pavel Vervenko
>>>>>>> 7d95ab1c278958efbd5dd67028d5546a63996d02:poulpe/poulpe-model/src/main/java/org/jtalks/poulpe/model/entity/Branch.java
*/
public class Branch extends Entity {
|
| Solution content |
|---|
/**
* Forum branch that contains topics related to branch theme.
*
* @author Pavel Vervenko
*/
public class Branch extends Persistent {
|
| File |
|---|
| Branch.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
private String name;
private String description;
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/entity/Branch.java
private List |
| Solution content |
|---|
private String name;
private String description;
private boolean deleted;
/**
* Set branch name which briefly describes the topics contained in it. |
| File |
|---|
| Branch.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/entity/Branch.java
* @return list of topics
*/
protected List |
| Solution content |
|---|
}
/**
* Check if branch marked is deleted.
* @return deleted
*/
public boolean getDeleted() {
return deleted;
}
/**
* Mark branch as deleted.
* @param deleted
*/
public void setDeleted(boolean deleted) {
this.deleted = deleted;
}
} |
| File |
|---|
| Branch.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
import org.jtalks.poulpe.model.dao.BranchDao; import org.hibernate.Session; import org.hibernate.SessionFactory; <<<<<<< HEAD:jcommune/jcommune-model/src/test/java/org/jtalks/jcommune/model/dao/hibernate/BranchHibernateDaoTest.java import org.jtalks.jcommune.model.dao.BranchDao; import org.jtalks.jcommune.model.entity.Branch; import org.jtalks.jcommune.model.entity.Post; import org.jtalks.jcommune.model.entity.Topic; import org.jtalks.jcommune.model.entity.User; ======= >>>>>>> 7d95ab1c278958efbd5dd67028d5546a63996d02:poulpe/poulpe-model/src/test/java/org/jtalks/poulpe/model/dao/hibernate/BranchHibernateDaoTest.java import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.test.context.ContextConfiguration; |
| Solution content |
|---|
import org.jtalks.poulpe.model.dao.BranchDao; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.test.context.ContextConfiguration; |
| File |
|---|
| BranchHibernateDaoTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
* License as published by the Free Software Foundation; either
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/TopicDao.java
/**
* Copyright (C) 2011 jtalks.org 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.
* Creation date: Apr 12, 2011 / 8:05:19 PM
* The jtalks.org Project
*/
package org.jtalks.jcommune.model.dao;
import org.jtalks.jcommune.model.entity.Topic;
import java.util.List;
/**
* DAO for the {@link Topic} objects.
* Besides the basic CRUD methods it provides a method to load any Topics with associated Posts.
*
* @author Pavel Vervenko
* @author Kirill Afonin
* @author Vitaliy Kravchenko
* @see org.jtalks.jcommune.model.dao.hibernate.TopicHibernateDao
*/
public interface TopicDao extends ChildRepository |
| Solution content |
|---|
/** * Copyright (C) 2011 jtalks.org 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. * Creation date: Apr 12, 2011 / 8:05:19 PM * The jtalks.org Project */ package org.jtalks.poulpe.service; import org.jtalks.poulpe.service.exceptions.NotUniqueException; import org.jtalks.poulpe.model.entity.Branch; import java.util.List; /** * @author Vitaliy Kravchenko * @author Kirill Afonin */ public interface BranchService extends EntityService |
| File |
|---|
| BranchService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Import |
| Interface declaration |
| Method interface |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
T get(Long id) throws NotFoundException;
<<<<<<< HEAD:jcommune/jcommune-service/src/main/java/org/jtalks/jcommune/service/EntityService.java
/**
* Copyright (C) 2011 jtalks.org 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.
* Creation date: Apr 12, 2011 / 8:05:19 PM
* The jtalks.org Project
*/
package org.jtalks.jcommune.service;
import org.jtalks.jcommune.model.entity.Entity;
import org.jtalks.jcommune.service.exceptions.NotFoundException;
/**
* This is generic interface for services which would interact with database entities via DAO object.
* This interface include all base method declaration which straightly based on database CRUD operations.
*
* @author Osadchuck Eugeny
* @author Kirill Afonin
*/
public interface EntityService |
| Solution content |
|---|
/** * Copyright (C) 2011 jtalks.org 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. * Creation date: Apr 12, 2011 / 8:05:19 PM * The jtalks.org Project */ package org.jtalks.poulpe.service; import org.jtalks.poulpe.model.entity.Persistent; import org.jtalks.poulpe.service.exceptions.NotFoundException; /** * This is generic interface for services which would interact with database entities via DAO object. * This interface include all base method declaration which straightly based on database CRUD operations. * * @author Osadchuck Eugeny * @author Kirill Afonin */ public interface EntityService |
| File |
|---|
| EntityService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Import |
| Interface declaration |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
* ChildRepository object implementation.
* {@inheritDoc}
*/
<<<<<<< HEAD:jcommune/jcommune-service/src/main/java/org/jtalks/jcommune/service/transactional/AbstractTransactionalEntityService.java
/**
* Copyright (C) 2011 jtalks.org 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.
* Creation date: Apr 12, 2011 / 8:05:19 PM
* The jtalks.org Project
*/
package org.jtalks.jcommune.service.transactional;
import org.jtalks.jcommune.model.dao.ChildRepository;
import org.jtalks.jcommune.model.entity.Entity;
import org.jtalks.jcommune.service.EntityService;
import org.jtalks.jcommune.service.exceptions.NotFoundException;
/**
* Generic implementation of all entity based services.
* Most of the implementations of the methods are basing on straightforward calls
* of the same named method from DAO interface.
*
* @author Osadchuck Eugeny
* @author Kirill Afonin
*/
public abstract class AbstractTransactionalEntityService |
| Solution content |
|---|
/** * Copyright (C) 2011 jtalks.org 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. * Creation date: Apr 12, 2011 / 8:05:19 PM * The jtalks.org Project */ package org.jtalks.poulpe.service.transactional; import org.jtalks.poulpe.model.dao.Dao; import org.jtalks.poulpe.model.entity.Persistent; import org.jtalks.poulpe.service.EntityService; import org.jtalks.poulpe.service.exceptions.NotFoundException; /** * Generic implementation of all entity based services. * Most of the implementations of the methods are basing on straightforward calls * of the same named method from DAO interface. * * @author Osadchuck Eugeny * @author Kirill Afonin */ public abstract class AbstractTransactionalEntityService |
| File |
|---|
| AbstractTransactionalEntityService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |
| Import |
| Package declaration |
| Chunk |
|---|
| Conflicting content |
|---|
* * @author Pavel Vervenko */ <<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/UserHibernateDao.java public class UserHibernateDao extends ParentRepositoryImpl |
| Solution content |
|---|
* * @author Pavel Vervenko */ public class TransactionalComponentService extends AbstractTransactionalEntityService |
| File |
|---|
| TransactionalComponentService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Class signature |
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
* {@inheritDoc}
*/
@Override
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/UserHibernateDao.java
public User getByUsername(String username) {
return (User) getSession()
.createQuery("from User u where u.username = ?")
.setCacheable(true)
.setString(0, username)
.uniqueResult();
=======
public void deleteComponent(Component component) {
dao.delete(component.getId());
>>>>>>> 7d95ab1c278958efbd5dd67028d5546a63996d02:poulpe/poulpe-service/src/main/java/org/jtalks/poulpe/service/transactional/TransactionalComponentService.java
}
/** |
| Solution content |
|---|
* {@inheritDoc}
*/
@Override
public void deleteComponent(Component component) {
dao.delete(component.getId());
}
/** |
| File |
|---|
| TransactionalComponentService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Cast expression |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* {@inheritDoc}
*/
@Override
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/UserHibernateDao.java
public User getByEncodedUsername(String encodedUsername) {
return (User) getSession()
.createQuery("from User u where u.encodedUsername = ?")
.setCacheable(true)
.setString(0, encodedUsername)
.uniqueResult();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isUserWithUsernameExist(String username) {
return ((Number) getSession()
.createQuery("select count(*) from User u where u.username = ?")
.setCacheable(true)
.setString(0, username)
.uniqueResult()).intValue() != 0;
=======
public void saveComponent(Component component) {
dao.saveOrUpdate(component);
>>>>>>> 7d95ab1c278958efbd5dd67028d5546a63996d02:poulpe/poulpe-service/src/main/java/org/jtalks/poulpe/service/transactional/TransactionalComponentService.java
}
/** |
| Solution content |
|---|
* {@inheritDoc}
*/
@Override
public void saveComponent(Component component) {
dao.saveOrUpdate(component);
}
/** |
| File |
|---|
| TransactionalComponentService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
* {@inheritDoc}
*/
@Override
<<<<<<< HEAD:jcommune/jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/hibernate/UserHibernateDao.java
public boolean isUserWithEmailExist(String email) {
return ((Number) getSession()
.createQuery("select count(*) from User u where u.email = ?")
.setCacheable(true)
.setString(0, email)
.uniqueResult()).intValue() != 0;
=======
public Set |
| Solution content |
|---|
* {@inheritDoc}
*/
@Override
public Set |
| File |
|---|
| TransactionalComponentService.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Return statement |