Package it.hotel.model.label

Examples of it.hotel.model.label.Label


      }
        return rval;
  }

  private Label createLabel(String descriptor, Object model) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    Label label = null;
    int id = MultiLingualInterceptor.getIdFromModel(model);
   
    String locale = localeContainer.getLocale();
    label= labelManager.getLabel(id, descriptor, locale);
    if (label == null)
    {
      label = new Label();
      label.setCode(descriptor);
      label.setLanguage(locale);
      label.setOwnerId(id);
    }
    return label;
  }
View Full Code Here


      String descriptor = MultiLingualInterceptor.createDescriptorCode(model, field);
     
      int id = getIdFromModel(model);
     
      String locale = localeContainer.getLocale();
      Label label = labelManager.getLabel(id,descriptor,locale);
     
      if (label == null)
      {
        label = new Label();
        label.setText(new String());
      }
     
      setFieldText(model,field,label.getText());
     
    }
  }
View Full Code Here

    h.setId(1);
    HotelManager hmanager = new HotelManager();
    Class cls = HotelManager.class;
    Method m = cls.getMethod("remove", new Class[] {Object.class});
   
    Label label = new Label();
    label.setCode("Hotel.Briefdescription");
    label.setId(1);
    label.setLanguage("it");
    label.setText("this is something");
   
   
    HashMap<String,Label> labelList = new HashMap<String,Label>();
    labelList.put("Hotel.Briefdescription", label);
   
View Full Code Here

    h.setId(1);
    HotelManager hmanager = new HotelManager();
    Class cls = HotelManager.class;
    Method m = cls.getMethod("remove", new Class[] {int.class});
   
    Label label = new Label();
    label.setCode("Hotel.Briefdescription");
    label.setId(1);
    label.setLanguage("it");
    label.setText("this is something");
   
   
    HashMap<String,Label> labelList = new HashMap<String,Label>();
    labelList.put("Hotel.Briefdescription", label);
   
View Full Code Here

     * @return
     */
  public Label getLabel(int ownerid, String code, String language){
  Session session = this.getSessionFactory().getCurrentSession();
  List labels = null;
  Label label = null;
  try {
    Criteria criteria = session.createCriteria(type.getClass());
    for (String field : getSort()) {
      criteria.addOrder(Order.asc(field));
    }
View Full Code Here

   * @param
   */
  @Override
  public void removeLabel(int ownerid, String code, String language) {
   
    Label l = getLabel(ownerid, code, language);
    if (l != null)
    {
      Session session = getSessionFactory().getCurrentSession();
      session.delete(l);
    }
View Full Code Here

TOP

Related Classes of it.hotel.model.label.Label

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.