Search in sources :

Example 1 with InteractionTypeDAO

use of com.autentia.tnt.dao.hibernate.InteractionTypeDAO in project TNTConcept by autentia.

the class DuplicateOfferTest method insertOfferInteraction.

/**
 * Inserta una interaccion en la oferta
 */
private void insertOfferInteraction() {
    final Set<Interaction> interactions = new LinkedHashSet<Interaction>(1);
    final InteractionTypeDAO interactionTypeDAO = (InteractionTypeDAO) SpringUtilsForTesting.getSpringBean("daoInteractionType");
    final InteractionType interactionType = new InteractionType();
    interactionType.setName("interaccion");
    interactionTypeDAO.insert(interactionType);
    final Interaction interaction = new Interaction();
    interaction.setProject(project);
    interaction.setUser(user);
    interaction.setType(interactionType);
    interaction.setOffer(offer);
    interaction.setCreationDate(new Date());
    interaction.setInterest(InteractionInterest.MEDIUM);
    interaction.setDescription("descripcion de la interaccion");
    interactions.add(interaction);
    offer.setInteractions(interactions);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) InteractionType(com.autentia.tnt.businessobject.InteractionType) Interaction(com.autentia.tnt.businessobject.Interaction) Date(java.util.Date) InteractionTypeDAO(com.autentia.tnt.dao.hibernate.InteractionTypeDAO)

Aggregations

Interaction (com.autentia.tnt.businessobject.Interaction)1 InteractionType (com.autentia.tnt.businessobject.InteractionType)1 InteractionTypeDAO (com.autentia.tnt.dao.hibernate.InteractionTypeDAO)1 Date (java.util.Date)1 LinkedHashSet (java.util.LinkedHashSet)1