Package es.ipsa.atril.doc.user

Examples of es.ipsa.atril.doc.user.Document.save()


      Dms oDms = oSes.getDms();
      Document oCredits = oDms.newDocument(oDms.getDocumentType("CustomerAccountCredits"), getDocument());
      oCredits.attribute("account_id").set(getString("account_id"));
      oCredits.attribute("credits_used").set(BigDecimal.ZERO);
      oCredits.attribute("credits_left").set(BigDecimal.ZERO);
      oCredits.save("");
      oAccCredits = new CustomerAccountCredits(oCredits);
      oSes.commit();
    } else {
      oAccCredits = new CustomerAccountCredits(oSes.getDms(), sId);     
    }   
View Full Code Here


    oAttr.set(oNew.getUuid());
    oUsr.getDocument().save("");
    oIdx.indexDocument(oUsr.getDocument());

    Document oOrders = oDms.newDocument(oDms.getDocumentType("Orders"), oNew.getDocument());
    oOrders.save("");
    oIdx.indexDocument(oOrders);
   
    Document oClients = oDms.newDocument(oDms.getDocumentType("Clients"), oNew.getDocument());
    oClients.save("");
    oIdx.indexDocument(oClients);
View Full Code Here

    Document oOrders = oDms.newDocument(oDms.getDocumentType("Orders"), oNew.getDocument());
    oOrders.save("");
    oIdx.indexDocument(oOrders);
   
    Document oClients = oDms.newDocument(oDms.getDocumentType("Clients"), oNew.getDocument());
    oClients.save("");
    oIdx.indexDocument(oClients);

    Document oPayers = oDms.newDocument(oDms.getDocumentType("TaxPayers"), oNew.getDocument());
    oPayers.save("");
    oIdx.indexDocument(oPayers);
View Full Code Here

    Document oClients = oDms.newDocument(oDms.getDocumentType("Clients"), oNew.getDocument());
    oClients.save("");
    oIdx.indexDocument(oClients);

    Document oPayers = oDms.newDocument(oDms.getDocumentType("TaxPayers"), oNew.getDocument());
    oPayers.save("");
    oIdx.indexDocument(oPayers);

    Document oCredits = oDms.newDocument(oDms.getDocumentType("CustomerAccountCredits"), oNew.getDocument());
    oCredits.attribute("account_id").set(oNew.getString("account_id"));
    oCredits.attribute("credits_used").set(0l);
View Full Code Here

    Document oCredits = oDms.newDocument(oDms.getDocumentType("CustomerAccountCredits"), oNew.getDocument());
    oCredits.attribute("account_id").set(oNew.getString("account_id"));
    oCredits.attribute("credits_used").set(0l);
    oCredits.attribute("credits_left").set(0l);
    oCredits.save("");
    oIdx.indexDocument(oCredits);
   
    Log.out.debug("PROFILING: Create CustomerAccount child documents "+String.valueOf((lEnd=new Date().getTime())-lStart)+" ms");
    lStart = lEnd;
   
View Full Code Here

    throws ElementNotFoundException, IOException {
    Scanner oScr = new Scanner();
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType(oScr.getTypeName()), getDocument());
    oDoc.attribute("name").set(sName);
    oDoc.save("");
    oScr.setDocument(oDoc);
    oScr.insertContentFromInputStream(oSes, oConfigProperties, sName+".properties");
    oScr.save(oSes);
    return oScr;
  }
View Full Code Here

        Document oThl = oDms.newDocument(oDms.getDocumentType(oDoc.type().name()+"Thumbnail"), oDoc);
        AttributeMultiValue oAtr = oThl.attribute("width");
      oAtr.set((long) iWidth);
      oAtr = oThl.attribute("height");
      oAtr.set((long) iHeight);
      oThl.save("");
        Item oThi = oThl.item();
        String sItemName = "th"+oDoc.id()+".jpg";
        oThi.setName(sItemName);
        oThi.mimeType("image/jpeg");
        OutputStream oOutStrm = oThi.getOutputStream();
View Full Code Here

        oThi.setName(sItemName);
        oThi.mimeType("image/jpeg");
        OutputStream oOutStrm = oThi.getOutputStream();
        oPipe = new StreamPipe();
        oPipe.between(new ByteArrayInputStream(byThumb), oOutStrm);
        oThl.save("");
        oOutStrm.close();
        Log.out.debug("Thumbnail creation done");
        DAO.log(oSes, oThl, Class.forName("com.zesped.model."+oDoc.type().name()+"Thumbnail"), "INSERT THUMBNAIL", AtrilEvent.Level.INFO, sItemName);
        oSes.disconnect();
        oSes.close();
View Full Code Here

      throw new IllegalArgumentException("E-mail address "+getEmail()+" already belongs to another user");
    }
   
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType("User"), oDms.getDocument(sUsrs));
    oDoc.save("");
    setDocument(oDoc);
   
    AttributeMultiValue oUid = oDoc.attribute("user_id");
    oUid.set(oDoc.id());
    AttributeMultiValue oUuid = oDoc.attribute("user_uuid");
View Full Code Here

    oApr.set("1");
    AttributeMultiValue oStl = oDoc.attribute("can_settle");
    oStl.set("1");
    AttributeMultiValue oPre = oDoc.attribute("can_premium");
    oPre.set("1");
    oDoc.save("");
    oIdx.indexDocument(oDoc);

    put("user_id", oDoc.id());
    put("user_uuid", sNickName);
    put("can_approve", "1");
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.