Examples of save()


Examples of lesson7.storage.DatabaseStorage.save()

        for(int i = 1; i <= 20; i++) {
            Cat cat = new Cat();
            cat.setName("cat" + i);
            cat.setAge(i);
            storage.save(cat);
        }

        cats = storage.list(Cat.class);
        if (cats.size() != 20) throw new Exception("Number of cats in storage should be 20!");
View Full Code Here

Examples of lesson7.storage.Storage.save()

        for(int i = 1; i <= 20; i++) {
            Cat cat = new Cat();
            cat.setName("cat" + i);
            cat.setAge(i);
            storage.save(cat);
        }

        cats = storage.list(Cat.class);
        if (cats.size() != 20) throw new Exception("Number of cats in storage should be 20!");
View Full Code Here

Examples of li.cil.oc.api.network.Node.save()

    public static void writeToNBT(final SimpleComponentImpl self, NBTTagCompound nbt) {
        self.writeToNBT_OpenComputers(nbt);
        final Node node = node(self);
        if (node != null) {
            final NBTTagCompound nodeNbt = new NBTTagCompound();
            node.save(nodeNbt);
            nbt.setTag("oc:node", nodeNbt);
        }
    }
}
View Full Code Here

Examples of lineage2.gameserver.model.items.ItemInstance.save()

          mail.setTopic(StringHolder.getInstance().getNotNull(activeChar, "birthday.title"));
          mail.setBody(StringHolder.getInstance().getNotNull(activeChar, "birthday.text"));
          ItemInstance item = ItemFunctions.createItem(21169);
          item.setLocation(ItemInstance.ItemLocation.MAIL);
          item.setCount(1L);
          item.save();
          mail.addAttachment(item);
          mail.setUnread(true);
          mail.setType(Mail.SenderType.BIRTHDAY);
          mail.setExpireTime((720 * 3600) + (int) (System.currentTimeMillis() / 1000L));
          mail.save();
View Full Code Here

Examples of lineage2.gameserver.model.mail.Mail.save()

          item.save();
          mail.addAttachment(item);
          mail.setUnread(true);
          mail.setType(Mail.SenderType.BIRTHDAY);
          mail.setExpireTime((720 * 3600) + (int) (System.currentTimeMillis() / 1000L));
          mail.save();
          activeChar.setVar(Player.MY_BIRTHDAY_RECEIVE_YEAR, String.valueOf(now.get(Calendar.YEAR)), -1);
        }
      }
    }
    if (activeChar.getClan() != null)
View Full Code Here

Examples of lineage2.loginserver.accounts.Account.save()

    {
      if (Config.AUTO_CREATE_ACCOUNTS && user.matches(Config.ANAME_TEMPLATE) && password.matches(Config.APASSWD_TEMPLATE))
      {
        account.setAllowedIP("");
        account.setPasswordHash(passwordHash);
        account.save();
      }
      else
      {
        client.close(LoginFailReason.REASON_USER_OR_PASS_WRONG);
        return;
View Full Code Here

Examples of lotus.domino.Document.save()

  public void duplicateEnvironment(String id) throws NotesException, IOException {
    Document d = ExtLibUtil.getCurrentDatabase().getDocumentByID(id);
    Document newDoc = ExtLibUtil.getCurrentDatabase().createDocument();
    d.replaceItemValue("name", StringUtil.format("Copy of {0}", d.getItemValueString("Name")));
    d.copyAllItems(newDoc, true);
    newDoc.save();
  }
  public void copyEnvironment(DominoDocument doc, String name) throws NotesException, IOException {
    View v = ExtLibUtil.getCurrentDatabase().getView("AllEnvironments");
    ViewEntry ve = v.getEntryByKey(name);
    if(ve!=null) {
View Full Code Here

Examples of me.neatmonster.spacebukkit.utilities.PropertiesFile.save()

                file.setInt(key, Integer.valueOf(value.toString()));
            else if (type.toLowerCase().equals("string"))
                file.setString(key, value.toString());
            else if (type.toLowerCase().equals("double"))
                file.setDouble(key, Double.valueOf(value.toString()));
            file.save();
            return true;
        }
        return false;
    }
View Full Code Here

Examples of me.prettyprint.hom.EntityManagerImpl.save()

    MyPojo pojo1 = new MyPojo();
    pojo1.setId(UUID.randomUUID());
    pojo1.setLongProp1(123L);
    pojo1.setColor(Colors.RED);

    em.save(pojo1);

    // do some stuff

    MyPojo pojo2 = em.load(MyPojo.class, pojo1.getId());
View Full Code Here

Examples of me.victorhernandez.hellospring.dao.jpa.UserDaoJpa.save()

  private static final long serialVersionUID = -6236373110062737899L;

  public void submit() {
    UserDaoJpa userDao = new UserDaoJpa();
    userDao.save(user);
    FacesMessage message = new FacesMessage("Registro exitoso!");
    FacesContext.getCurrentInstance().addMessage(null, message);
    clearForm();
  }
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.