当前位置: 首页>>代码示例>>Java>>正文


Java ParseObject.getObjectId方法代码示例

本文整理汇总了Java中com.parse.ParseObject.getObjectId方法的典型用法代码示例。如果您正苦于以下问题:Java ParseObject.getObjectId方法的具体用法?Java ParseObject.getObjectId怎么用?Java ParseObject.getObjectId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.parse.ParseObject的用法示例。


在下文中一共展示了ParseObject.getObjectId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: conversationFromSubscription

import com.parse.ParseObject; //导入方法依赖的package包/类
public static ExampleConversation conversationFromSubscription(ParseObject subscription, ParseHelper helper) {
    final ParseObject chatParseObject = subscription.getParseObject(ChatSubscriptionTable.Fields.CHAT);
    if (chatParseObject.isDataAvailable()) {
        final String name = TextUtils.isEmpty(chatParseObject.getString(ChatTable.Fields.NAME)) ? subscription.getString(ChatSubscriptionTable.Fields.NAME) : chatParseObject.getString(ChatTable.Fields.NAME);
        final List<BaseUser> users = Collections.emptyList(); // TODO: Populate!
        int unread = chatParseObject.getInt(ChatTable.Fields.MESSAGE_COUNT) - subscription.getInt(ChatSubscriptionTable.Fields.LAST_SEEN_COUNT);
        final boolean hasLastMessage = chatParseObject.has(ChatTable.Fields.LAST_MESSAGE) && chatParseObject.getParseObject(ChatTable.Fields.LAST_MESSAGE).isDataAvailable();
        final ExampleMessage lastMessage = hasLastMessage ? from(chatParseObject.getParseObject(ChatTable.Fields.LAST_MESSAGE), helper) : null;
        return new ExampleConversation(chatParseObject.getObjectId(),
            name,
            users,
            lastMessage,
            unread);
    }
    else {
        return new ExampleConversation(chatParseObject.getObjectId());
    }
}
 
开发者ID:badoo,项目名称:Chateau,代码行数:19,代码来源:ParseUtils.java

示例2: getEventFromParseObject

import com.parse.ParseObject; //导入方法依赖的package包/类
public static Event getEventFromParseObject(@NonNull ParseObject parseObject){
    ParseGeoPoint location = parseObject.getParseGeoPoint(Event.LOCATION);
    ParseFile parseFile = parseObject.getParseFile(Event.IMAGE);
    return new Event(parseObject.getObjectId(),
            parseObject.getString(Event.TITLE),
            parseObject.getString(Event.DESCRIPTION),
            location != null? location.getLatitude() : Event.INVALID_LOCATION,
            location != null? location.getLongitude() : Event.INVALID_LOCATION,
            parseObject.getString(Event.LOCATION_SUMMARY),
            parseObject.getString(Event.LOCATION_DESCRIPTION),
            parseFile != null? parseFile.getUrl() : null,
            parseObject.getDate(Event.INITIAL_DATE),
            // If end date is null, set it as initial date, so we can use it in our order by
            parseObject.getDate(Event.END_DATE) != null? parseObject.getDate(Event.END_DATE) : parseObject.getDate(Event.INITIAL_DATE),
            parseObject.getInt(Event.TYPE),
            parseObject.getBoolean(Event.ENABLED),
            (parseObject.getNumber(Event.GOING) != null)? parseObject.getNumber(Event.GOING).longValue() : 0,
            parseObject.getString(Event.LINK_URL),
            parseObject.getString(Event.LINK_TEXT),
            parseObject.getUpdatedAt()
    );
}
 
开发者ID:LibertACAO,项目名称:libertacao-android,代码行数:23,代码来源:ParserDtoManager.java

示例3: conversationFromChat

import com.parse.ParseObject; //导入方法依赖的package包/类
public static ExampleConversation conversationFromChat(ParseObject chat, ParseHelper helper) {
    String name = chat.getString(ChatTable.Fields.NAME);
    List<BaseUser> users = Collections.emptyList(); // TODO: Populate!
    int unread = 0;
    return new ExampleConversation(chat.getObjectId(),
        name,
        users,
        from((ParseObject) chat.get(ChatTable.Fields.LAST_MESSAGE), helper),
        unread);
}
 
开发者ID:badoo,项目名称:Chateau,代码行数:11,代码来源:ParseUtils.java

示例4: getView

import com.parse.ParseObject; //导入方法依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent){
    ViewHolder holder ;
    if(convertView == null){
        convertView = LayoutInflater.from(mContext).inflate(R.layout.fragment_home,null);
        holder = new ViewHolder();

        holder.eventNameHP= (TextView) convertView.findViewById(R.id.eventName);
        holder.eventConHP = (TextView) convertView.findViewById(R.id.eventContext);
        holder.imageHP = (ImageView) convertView.findViewById(R.id.eventImage);

        convertView.setTag(holder);


    }
    else{
        holder= (ViewHolder) convertView.getTag();
    }
    ParseObject eventObject = mEvents.get(position);

    String eventName =  eventObject.getString("eventName");
    holder.eventNameHP.setText(eventName);

    String eventCon = eventObject.getString("eventContext");
    holder.eventConHP.setText(eventCon);

    Picasso.with(getContext().
            getApplicationContext()).
            load(eventObject.getParseFile("eventPhoto").
                    getUrl()).noFade().transform(new TransformationCircular()).
            into(holder.imageHP);


    eventid=eventObject.getObjectId();

    return convertView;
}
 
开发者ID:gokcan,项目名称:Volo,代码行数:38,代码来源:EventAdapter.java

示例5: onListItemClick

import com.parse.ParseObject; //导入方法依赖的package包/类
public void onListItemClick(ListView l,View v, int position, long id){
    super.onListItemClick(l, v, position, id);


    ParseObject eventObject = mEvents.get(position);

    String objectId = eventObject.getObjectId();
    String eventName = eventObject.getString("eventName");
    String eventCon = eventObject.getString("eventContext");

    ClikedEventFragment fragment = new ClikedEventFragment();
    Bundle bundle = new Bundle();
    bundle.putString("id", objectId);


    bundle.putString("Context", eventCon);
    fragment.setArguments(bundle);
    FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();


    transaction.replace(R.id.navcontent, fragment, "EVENT_FRAGMENT");
    transaction.addToBackStack(null);

    transaction.commit();
}
 
开发者ID:gokcan,项目名称:Volo,代码行数:26,代码来源:HomeFragment.java

示例6: onListItemClick

import com.parse.ParseObject; //导入方法依赖的package包/类
public void onListItemClick(ListView l,View v, int position, long id){
    super.onListItemClick(l, v, position, id);


    ParseObject eventObject = mParticipatedEvents.get(position);

    String objectId = eventObject.getObjectId();
    String eventName = eventObject.getString("eventName");
    String eventCon = eventObject.getString("eventContext");

    ClikedEventFragment fragment = new ClikedEventFragment();
    Bundle bundle = new Bundle();
    bundle.putString("id", objectId);


    bundle.putString("Context", eventCon);
    fragment.setArguments(bundle);
    FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();


    transaction.replace(R.id.navcontent, fragment, "EVENT_FRAGMENT");
    transaction.addToBackStack(null);

    transaction.commit();
}
 
开发者ID:gokcan,项目名称:Volo,代码行数:26,代码来源:ProfileListFragment.java

示例7: doInBackground

import com.parse.ParseObject; //导入方法依赖的package包/类
@Override
protected String doInBackground(String... params)
{
    userQuery = params[0];
    booksResults.clear();
/*
* Get the parse objects based on the query entered.
*/

    ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Posted");


    query.whereContains("useremail", userQuery);

    try
    {
        Log.w("Parse", "Inside getbooks()");
        List<ParseObject> queryResult = query.find();
        for (ParseObject book : queryResult)
        {

            HashMap<String, String> test = new HashMap<>();

            String dept = book.getString("dept");
            String title = book.getString("Title");
            String author = book.getString("Author");
            String price = book.getString("Price");
            String place = book.getString("Place");
            String desp = book.getString("Description");
            String phone = book.getString("phone");
            String oprice = book.getString("oprice");
            String objId = book.getObjectId();
            String status = book.getString("status");


            test.put("dept", dept);
            test.put("title", title);
            test.put("author", author);
            test.put("price", price);
            test.put("place", place);
            test.put("description", desp);
            test.put("phone", phone);
            test.put("oprice", oprice);
            test.put("objectId",objId);
            test.put("status",status);

            booksResults.add(test);
        }
    }
    catch (ParseException e)
    {

        Log.d("Books", "Error: " + e.getMessage());

    }

    return userQuery;
}
 
开发者ID:karnikram,项目名称:seglio,代码行数:59,代码来源:AccountFragment.java


注:本文中的com.parse.ParseObject.getObjectId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。