Examples of UnitOfMeasure


Examples of com.google.code.lightssh.project.uom.entity.UnitOfMeasure

    this.dao = dao;
  }
 
  private List<UnitOfMeasure> list(UomType type,Boolean active) {
    ListPage<UnitOfMeasure> page = new ListPage<UnitOfMeasure>( Integer.MAX_VALUE );
    UnitOfMeasure uom = new UnitOfMeasure( );
    uom.setType(type);
    uom.setActive( active );
    page = super.dao.list(page, uom);
   
    return page.getList();
  }
View Full Code Here

Examples of com.google.code.lightssh.project.uom.entity.UnitOfMeasure

  @Override
  public void toggleActive(UnitOfMeasure uom) {
    if( uom == null || uom.getIdentity() == null )
      return;
   
    UnitOfMeasure db_uom = this.get( uom );
    if( db_uom != null ){
      db_uom.setActive( !db_uom.isActive() );
      dao.update( db_uom );
    }
  }
View Full Code Here

Examples of com.pre.entity.base.UnitOfMeasure

    item.getDescription().setLongDescription(descriptionBox.getText());
    item.getDescription().setComment(commentBox.getText());
    if(!item.isLocked()){
      Division divi=dmanager.findByCode(divisionCombo.getText()).get(0);
      item.setDivision(divi);
      UnitOfMeasure uom=uomManager.findByName(uomText.getText()).get(0);
      item.setBasicUnitOfMeasure(uom);
    }
  }
View Full Code Here

Examples of com.pre.entity.base.UnitOfMeasure

    String searchKey=inputEvent.getValue();

    List<UnitOfMeasure> uoms=uomManager.searchByName(searchKey, 0L, 32);
    Iterator<UnitOfMeasure> uomIterator=uoms.iterator();
    while(uomIterator.hasNext()){
      UnitOfMeasure uom=uomIterator.next();
      Listitem item=new Listitem();
      Listcell nameCell=new Listcell(uom.getName());
      Listcell descCell=new Listcell(uom.getDescription().getShortDescription());
      item.appendChild(nameCell);
      item.appendChild(descCell);
      uomList.appendChild(item);
    }
    uomText.open();
View Full Code Here

Examples of com.pre.entity.base.UnitOfMeasure

      manageOption("create");
      return;
    }
    if(!ids.isEmpty()){
     
      final UnitOfMeasure c=manager.find(new Long(ids.get(0)));
     
      cbox.setText(c.getName());
      sbox.setText(c.getDescription().getShortDescription());
      dbox.setText(c.getDescription().getLongDescription());
      cmbox.setText(c.getDescription().getComment());
      if(options.get(0).equals("show")){
        cbox.setDisabled(true);
        sbox.setDisabled(true);
        dbox.setDisabled(true);
        cmbox.setDisabled(true);
      }
      if(options.get(0).equals("edit")){
        cbox.setDisabled(true);
       
        Button okButton=new Button("OK");
        okButton.addEventListener("onClick", new EventListener(){

          public void onEvent(Event event) throws Exception {
            c.getDescription().setShortDescription(sbox.getText());
            c.getDescription().setLongDescription(dbox.getText());
            c.getDescription().setComment(cmbox.getText());
            manager.update(c);
            detach();           
          }
         
        });
View Full Code Here

Examples of com.pre.entity.base.UnitOfMeasure

    Button okButton=new Button("OK");
    okButton.addEventListener("onClick", new EventListener(){

      public void onEvent(Event event) throws Exception {
        //init();
        UnitOfMeasure divi=new UnitOfMeasure();
        divi.setName(cbox.getText());
        BaseDescription description=new BaseDescription();
        divi.setDescription(description);
        divi.getDescription().setShortDescription(sbox.getText());
        divi.getDescription().setLongDescription(dbox.getText());
        divi.getDescription().setComment(cmbox.getText());
        manager.create(divi);
        detach();           
      }
     
    });
View Full Code Here

Examples of com.pre.entity.base.UnitOfMeasure

    UnitOfMeasureManager manager=(UnitOfMeasureManager)WebApplication.lookup(UnitOfMeasureManager.LocalJNDIName);
    List<UnitOfMeasure> divisions=manager.findAll();
    Iterator<UnitOfMeasure> it=divisions.iterator();
    while(it.hasNext()){
      Row row=new Row();
      UnitOfMeasure c=it.next();
      row.appendChild(new Checkbox());
      row.appendChild(new Label(c.getId().toString()));
      row.appendChild(new Label(c.getName()));
      row.appendChild(new Label(c.getDescription().getShortDescription()));
     
      gridRows.appendChild(row);
    }
   
  }
View Full Code Here

Examples of org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.UnitOfMeasure

import org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.UnitOfMeasure;

public class SaveUOM extends UOMForm {
 
  public String execute(){
    UnitOfMeasure uom;
    if(getUnitOfMeasure().getId() != null || !"".equalsIgnoreCase(getUnitOfMeasure().getId())){
      uom = new UnitOfMeasure();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      uom = (UnitOfMeasure) manager.getById(UnitOfMeasure.class, getUnitOfMeasure().getId());
      logInfo = new LogInformation();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    uom.setLogInformation(logInfo);
    uom.setCode(getUnitOfMeasure().getCode());
    uom.setSymbol(getUnitOfMeasure().getCode());
    uom.setName(getUnitOfMeasure().getName());
    uom.setPdefault(getUnitOfMeasure().getPdefault());
    uom.setStandardPrecision(getUnitOfMeasure().getStandardPrecision());
    uom.setCostingPrecision(getUnitOfMeasure().getCostingPrecision());
   
    manager.save(uom);
    setUnitOfMeasure(uom);
    return SUCCESS;
  }
View Full Code Here

Examples of org.zeroexchange.model.resource.good.UnitOfMeasure

    public String getResourceUOM(Resource resource) {
        if(resource == null) {
            return unknownUOMKey;
        }
        if(resource instanceof GoodResource) {
            UnitOfMeasure uom = ((GoodResource)resource).getUnitOfMeasure();
            return uom == null ? unknownUOMKey : uom.name();
        } else if(resource instanceof ServiceResource) {
            return sessionUOMKey;
        } else if(resource instanceof MoneyResource) {
            ZECurrency currency = ((MoneyResource)resource).getCurrency();
            return currency == null ? unknownUOMKey : currency.name();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.