Package domain

Examples of domain.EventId


      Transaction transaction = databaseSession.beginTransaction();     

      databaseSession.delete(oldEvent);
     
      Event newEvent = new Event();
      newEvent.setId( new EventId() );
      newEvent.getId().setType(eventTypeObject);
      newEvent.getId().setOwner(oldOwner);
      newEvent.getId().setFrom(fromDate);
      newEvent.getId().setTo(toDate);
      newEvent.setDescription(this.description);
View Full Code Here


        EventType eventTypeObject = (EventType) databaseSession.createCriteria(EventType.class).add(Restrictions.eq("id", this.eventType)).uniqueResult();
        if(null == eventTypeObject) {
          return new Response(ResponseStatus.FAIL, "Not valid event type");
        }
       
        EventId eventIdObject = new EventId()
        eventIdObject.setFrom(fromDate);
        eventIdObject.setTo(toDate);
        eventIdObject.setOwner(userObject);
        eventIdObject.setType(eventTypeObject);
       
        PermissionType permisssionTypeObject = (PermissionType) databaseSession.createCriteria(PermissionType.class).add(Restrictions.eq("id", this.permissionType)).uniqueResult();
        if(null == permisssionTypeObject) {
          return new Response(ResponseStatus.FAIL, "Not valid permisssion type");
        }
View Full Code Here

          return (new Response(ResponseStatus.FAIL, "Not valid event type"));
        }
       
        User eventOwner = (User) databaseSession.get(User.class, this.owner);
       
        EventId eventIdObject = new EventId();
        eventIdObject.setFrom(fromDate);
        eventIdObject.setTo(toDate);
        eventIdObject.setOwner(eventOwner);
        eventIdObject.setType(eventTypeObject);
       
        Event eventObject = (Event) databaseSession.get(Event.class, eventIdObject);
       
        if (eventObject == null) {
          throw new IllegalArgumentException("Could not locate event in question!");
View Full Code Here

TOP

Related Classes of domain.EventId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.