Package domain

Examples of domain.RepetitionType


      // New event creation:
      PermissionType permisssionTypeObject = (PermissionType) databaseSession.createCriteria(PermissionType.class)
                                            .add(Restrictions.eq("id", this.permissionType))
                                            .uniqueResult();

      RepetitionType repetitionTypeObject = (RepetitionType) databaseSession.createCriteria(RepetitionType.class)
                                            .add(Restrictions.eq("id", this.repetitionType))
                                            .uniqueResult();
     
      EventType eventTypeObject = (EventType) databaseSession.createCriteria(EventType.class)
                                  .add(Restrictions.eq("id", this.eventType))
View Full Code Here


    if( ! ((Boolean) httpSession.getAttribute("manager")) ) {
     
      return new Response(ResponseStatus.FAIL, "No authorization");
    }
   
    RepetitionType repetitionTypeObject = (RepetitionType) databaseSession.createCriteria(RepetitionType.class).add(Restrictions.eq("id", this.repetitionTypeId)).uniqueResult();
    if(null == repetitionTypeObject)
    {
      return (new Response(ResponseStatus.FAIL, "Not valid repetition type"));
    }
   
View Full Code Here

        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");
        }
       
        RepetitionType repetitionTypeObject = (RepetitionType) databaseSession.createCriteria(RepetitionType.class).add(Restrictions.eq("id", this.repetitionType)).uniqueResult();
        if(null == repetitionTypeObject) {
          return new Response(ResponseStatus.FAIL, "Not valid repetition type");
        }
        if( !DateOperator.isRepetitionPossible(fromDate, toDate, repetitionTypeObject) ) {
          return new Response(ResponseStatus.FAIL, "Repetition is not possible. Make sure there is a sense in the repetition type you choose");
View Full Code Here

          .add(Restrictions.eq("id.type", oldEventTypeObj))
          .add(Restrictions.eq("id.owner", oldOwnerObj))
          .uniqueResult();
      }
     
      RepetitionType noRepeat = (RepetitionType) databaseSession.get(RepetitionType.class, new Long(1));
     
      // Get not repeated event that overlap
      Criteria notRepeatedOverlapCriteria = databaseSession.createCriteria(Event.class)
                          .add(Restrictions.conjunction() // AND
                            .add(Restrictions.eq("repetition", noRepeat))
View Full Code Here

     
      if (currentUser == null) {
        throw new Exception("You are not logged in!");
      }
     
      RepetitionType noRepeat = (RepetitionType) databaseSession.get(RepetitionType.class, new Long(1));
     
      Conjunction notRepeatableEventConjunction = Restrictions.conjunction();
      notRepeatableEventConjunction.add( Restrictions.eq("repetition", noRepeat) );
 
     
View Full Code Here

   
    PermissionType permissionType3 = new PermissionType();
    permissionType3.setDescription("Private");
   
    // load initial repetition-types
    RepetitionType repetitionType1 = new RepetitionType();
    repetitionType1.setDescription("None");
   
    RepetitionType repetitionType2 = new RepetitionType();
    repetitionType2.setDescription("Daily");
   
    RepetitionType repetitionType3 = new RepetitionType();
    repetitionType3.setDescription("Weekly");
   
    RepetitionType repetitionType4 = new RepetitionType();
    repetitionType4.setDescription("Monthly");
   
    RepetitionType repetitionType5 = new RepetitionType();
    repetitionType5.setDescription("Yearly");
   
    Transaction transaction = session.beginTransaction();
    transaction.begin();
   
    try {   
View Full Code Here

TOP

Related Classes of domain.RepetitionType

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.