Examples of AssetGroup


Examples of er.indexing.example.eof.AssetGroup

        EOEditingContext ec = ERXEC.newEditingContext();
        ec.lock();
        try {
            Tag tag = Tag.clazz.allObjects(ec).lastObject();
            Asset asset = Asset.clazz.allObjects(ec).lastObject();
            AssetGroup assetGroup = AssetGroup.clazz.allObjects(ec).lastObject();
            // new DataCreator().createDummyData();
            ERIndex eofStore = ERIndex.indexNamed("AssetInEOFStore");
            ERIndex fileStore = ERIndex.indexNamed("AssetInFileStore");
            EOQualifier tagQualifier = new EOKeyValueQualifier("tags.name", EOQualifier.QualifierOperatorEqual, tag.name());
            EOQualifier groupQualifier = new EOKeyValueQualifier("assetGroup.name", EOQualifier.QualifierOperatorEqual, tag.name());
            log.info("fileStore: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore: " + eofStore.findGlobalIDs(tagQualifier).count());
            log.info("fileStore: " + fileStore.findGlobalIDs(groupQualifier).count());
            log.info("eofStore: " + eofStore.findGlobalIDs(groupQualifier).count());
           
            String newName = "cooltest";
            tagQualifier = new EOKeyValueQualifier("tags.name", com.webobjects.eocontrol.EOQualifier.QualifierOperatorEqual, newName);
            tag.setName(newName + " " + System.currentTimeMillis());
            ec.saveChanges();
           
            assetGroup.setName(newName + "  " + System.currentTimeMillis());
            ec.saveChanges();
            log.info("fileStore 1: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore 1: " + eofStore.findGlobalIDs(tagQualifier).count());
            try {
                if(true) {
View Full Code Here

Examples of er.indexing.example.eof.AssetGroup

        tags.addObject(tag);
      }
      log.info("created tags: " + tags.count());

      for (int i = 0; i < MAX; i++) {
        AssetGroup group = AssetGroup.clazz.createAndInsertObject(ec);
        group.setName(randomWord());
        groups.addObject(group);
      }
      log.info("created groups: " + groups.count());

      for (int i = 0; i < MAX_ASSETS; i++) {
View Full Code Here

Examples of org.blueoxygen.postila.asset.fixedassets.setupadnmaintain.fixedassetsetup.entity.AssetGroup

    }
    if(hasErrors()){
      return INPUT;
    }
   
    AssetGroup assetGroup;
    if(getAssetGroup().getId() == null || "".equalsIgnoreCase(getAssetGroup().getId())){
      assetGroup = new AssetGroup();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      msg = "Successfully Add "+getAssetGroup().getName();
    } else {
      assetGroup = (AssetGroup) manager.getById(AssetGroup.class, getAssetGroup().getId());
      logInfo = assetGroup.getLogInformation();
      msg = "Successfully Edit "+getAssetGroup().getName();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    assetGroup.setLogInformation(logInfo);
    assetGroup.setName(getAssetGroup().getName());
    assetGroup.setDescription(getAssetGroup().getDescription());
    assetGroup.setCommentHelp(getAssetGroup().getCommentHelp());
    assetGroup.setOwned(getAssetGroup().getOwned());
    assetGroup.setDepreciated(getAssetGroup().getDepreciated());
    assetGroup.setOneAssetPerUOM(getAssetGroup().getOneAssetPerUOM());
    assetGroup.setCreateAsActive(getAssetGroup().getCreateAsActive());
   
    manager.save(assetGroup);
    setAssetGroup(assetGroup);
    return SUCCESS;
  }
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.