Examples of Friend


Examples of com.freewebsys.sns.pojo.Friend

  @Transactional
  public void deleteFriendById(Integer userId, Integer friendId)
      throws FriendException {
    try {
      String hql = " from Friend friend where friend.userId = ? and friend.friend.id = ?";
      Friend friend = (Friend) baseDao
          .findFirstOne(hql, userId, friendId);
      baseDao.delete(friend);
    } catch (Exception e) {
      throw new FriendException("Friend删除异常");
    }
View Full Code Here

Examples of com.freewebsys.sns.pojo.Friend

  @Transactional
  public void saveFriend(Friend friend) throws FriendException {
    try {

      String hql = " from Friend friend where friend.userId = ? and friend.friend.id = ? ";
      Friend friendTemp = (Friend) baseDao.findFirstOne(hql,
          friend.getUserId(), friend.getFriend().getId());
      if (friendTemp == null) {// 特殊情况会提交2次。就记录一次数据。
        friend.setCreateTime(new Date());
        friend.setStatus(0);
        baseDao.save(friend);
View Full Code Here

Examples of com.freewebsys.sns.pojo.Friend

  }

  @Override
  public int findIsFriend(Integer userId, Integer friendId) {
    String hql = " from Friend friend where friend.userId = ? and friend.friend.id = ?";
    Friend friend = (Friend) baseDao.findFirstOne(hql, userId, friendId);
    if (friend == null || friend.getStatus() == null) {
      return -1;
    } else {
      return friend.getStatus().intValue();
    }
  }
View Full Code Here

Examples of com.freewebsys.sns.pojo.Friend

   */
  public void saveFriend() throws Exception {
    int state = friendService.findIsFriend(getSessionUserInfo().getId(),
        friendId);
    if (state == -1) {
      friend = new Friend();
      // 帮定好友用户
      userInfo = new UserInfo();
      userInfo.setId(friendId);
      friend.setFriend(userInfo);
      // 设置我的Id
View Full Code Here

Examples of com.metadot.book.connectr.server.domain.Friend

  public FriendDTO updateFriend(FriendDTO friendDTO) {

    PersistenceManager pm = PMF.getTxnPm();
    if (friendDTO.getId() == null) { // create new Friend
      Friend newFriend = addFriend(friendDTO);
      return newFriend.toDTO();
    }

    // otherwise, do an update of an existing Friend.
    // do this operation under transactional control
    Friend friend = null;
    try {
      for (int i = 0; i < NUM_RETRIES; i++) {
        pm.currentTransaction().begin();
        friend = pm.getObjectById(Friend.class, friendDTO.getId());

        Set<String> origurls = new HashSet<String>(friend.getUrls());
        logger.info("original Friend urls are: " + origurls);

        // delete feed information from the feedids cache
        // only need to do this if the URLs set has changed
        if (!origurls.equals(friendDTO.getUrls())) {
          CacheSupport.cacheDelete(feedids_nmspce, friendDTO.getId());
        }

        friend.updateFromDTO(friendDTO);

        if (!(origurls.isEmpty() && friendDTO.getUrls().isEmpty())) {
          // build task payload:
          Map<String, Object> hm = new HashMap<String, Object>();
          hm.put("newurls", friendDTO.getUrls());
View Full Code Here

Examples of com.mmoscene.h4j.habbohotel.messenger.Friend

            H4J.getLogger(Messenger.class.getName()).error(ex.getMessage());
        }
    }

    public Friend generateFriend(ResultSet set) {
        Friend friend = new Friend();

        try {
            friend.setId(set.getInt("id"));
            friend.setUsername(set.getString("username"));
            friend.setLook(set.getString("look"));
            friend.setMotto(set.getString("motto"));
        } catch(Exception ex) {
            H4J.getLogger(Messenger.class.getName()).error(ex.getMessage());
        }

        return friend;
View Full Code Here

Examples of com.prancingdonkey.model.jaxb.Friend

    @Test
    public void testJaxb() throws Exception
    {
        MuleClient muleClient = new MuleClient(muleContext);

        Friend friend = new Friend();
        friend.setName("John");
        friend.setSurname("Doe");

        MuleMessage result = muleClient.send("vm://jaxb-simple.in", friend, null);
        assertThat(result, is(notNullValue()));
        assertThat(result.getPayload(), is(notNullValue()));
        assertThat(result.getPayload(), is(instanceOf(Friend.class)));
View Full Code Here

Examples of facebook4j.Friend

            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Friend> friends = new ResponseListImpl<Friend>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject friendJSONObject = list.getJSONObject(i);
                Friend friend = new FriendJSONImpl(friendJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(friend, friendJSONObject);
                }
                friends.add(friend);
            }
View Full Code Here

Examples of jodd.json.mock.Friend

    assertAttribute("description", json);
  }

  @Test
  public void testSettersWithoutGettersAreMissing() {
    Friend friend = new Friend("Nugget", "Donkey Rider", "Slim");
    String json = new JsonSerializer().include("*").serialize(friend);
    assertAttribute("nicknames", json);
    assertAttributeMissing("nicknamesAsArray", json);
  }
View Full Code Here

Examples of lineage2.gameserver.model.actor.instances.player.Friend

      {
        int objectId = rset.getInt("f.friend_id");
        String name = rset.getString("c.char_name");
        int classId = rset.getInt("s.class_id");
        int level = rset.getInt("s.level");
        map.put(objectId, new Friend(objectId, name, level, classId));
      }
    }
    catch (Exception e)
    {
      _log.error("CharacterFriendDAO.load(L2Player): " + e, e);
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.