code formatting

This commit is contained in:
Peter Hormanns 2016-11-16 13:25:26 +01:00
parent f934cd3984
commit 77fc48aaa7
3 changed files with 9 additions and 17 deletions

View File

@ -4,19 +4,15 @@ import javax.persistence.EntityManager;
import de.hsadmin.core.model.AbstractEntity;
/**
* Most processor factories need only these methods.
*
* @author peter
*/
public interface EntityProcessorFactory {
public <T extends AbstractEntity> Processor createCreateProcessor(EntityManager em,
T entity) throws ProcessorException;
public interface EntityProcessorFactory
{
public <T extends AbstractEntity> Processor
createCreateProcessor(EntityManager em, T entity) throws ProcessorException;
public <T extends AbstractEntity> Processor createUpdateProcessor(EntityManager em,
T newEntity) throws ProcessorException;
public <T extends AbstractEntity> Processor
createUpdateProcessor(EntityManager em, T newEntity) throws ProcessorException;
public <T extends AbstractEntity> Processor createDeleteProcessor(EntityManager em,
T entity) throws ProcessorException;
public <T extends AbstractEntity> Processor
createDeleteProcessor(EntityManager em, T entity) throws ProcessorException;
}

View File

@ -117,7 +117,6 @@ public class QueueStatusReceiverServlet extends HttpServlet
transaction = new Transaction("statusreceiver");
transaction.beginTransaction();
EntityManager em = transaction.getEntityManager();
// merging detachedQT directly makes Hibernate run into an endless recursion (stack overflow)
em.clear();
QueueTask persistentQT = em.find(QueueTask.class, detachedQT.getId());
persistentQT.assign(detachedQT);

View File

@ -115,10 +115,7 @@ public class PacProcessorFactory implements EntityProcessorFactory {
}
private Processor createNetworkInterfacesProc(final Hive hive) throws ProcessorException {
// VelocityProcessor interfacesProc = new VelocityProcessor("/de/hsadmin/mods/pac/interfaces.vm", hive, "/etc/network/interfaces", true);
final VelocityProcessor pacIPv4Proc = new VelocityProcessor("/de/hsadmin/mods/pac/pac-addr-ipv4.vm", hive, "/etc/network/pac-addr-ipv4", true);
return pacIPv4Proc;
// return new CompoundProcessor(interfacesProc, pacIPv4Proc);
return new VelocityProcessor("/de/hsadmin/mods/pac/pac-addr-ipv4.vm", hive, "/etc/network/pac-addr-ipv4", true);
}
private Processor createIPTablesProc() {