I see,
Try following:
 Iterator<Map.Entry<Object, OIdentifiable>> iter = (Iterator<Map.Entry<Object,
OIdentifiable>>)ptidIdx.iterator();


On Mon, Mar 24, 2014 at 12:45 PM, prabhat <[email protected]> wrote:

> : error: incompatible types
>             Iterator<Map.Entry<Object, ODocument>> iter =
> ptidIdx.iterator();
>                                                                           ^
>   required: Iterator<Entry<Object,ODocument>>
>   found:    Iterator<Entry<Object,CAP#1>>
>   where CAP#1 is a fresh type-variable:
>     CAP#1 extends Object from capture of ?
> 1 error
>
>
>
>
> On Mon, Mar 24, 2014 at 3:55 PM, Andrey Lomakin 
> <[email protected]>wrote:
>
>> Sorry, but what will be if you try Map.Entry<ORID,ODocument> tm = iter.
>> next();
>>
>>
>> On Mon, Mar 24, 2014 at 11:58 AM, prabhat <[email protected]> wrote:
>>
>>> That was not right syntax but interim.
>>> My error is
>>> --------------------
>>> position: java.lang.ClassCastException:
>>> com.orientechnologies.orient.core.index.sbtree.OSBTreeMapEntryIterator$1$1
>>> cannot be cast to com.orientechnologies.orient.core.record.ORecord
>>> ---------------------------------------
>>> with Syntax
>>>  ORecord tm = (ORecord)iter.next();
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Mar 24, 2014 at 11:51 AM, Andrey Lomakin <
>>> [email protected]> wrote:
>>>
>>>> HI,
>>>> What exception did you get ?
>>>>
>>>>
>>>> On Sun, Mar 23, 2014 at 9:22 PM, Shishya <[email protected]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying POJO for iterating over an index of class. Purpose is to
>>>>> process all docs in classes.
>>>>> But I get cast exception from OSBTreeMapEntryIterator. What would be
>>>>> the right way to get Document from each K,V of iterator?
>>>>> Regards
>>>>>
>>>>> OrientGraphFactory factory = new OrientGraphFactory(
>>>>> "plocal:/dat/odb/orientdb-community-1.7-rc2-SNAPSHOT/databases/"+dbn,
>>>>> "admin","admin").setupPool(1, 10);
>>>>>         factory.getTx().getRawGraph().declareIntent(new
>>>>> OIntentMassiveInsert());
>>>>>         OrientGraph graph = factory.getTx();
>>>>> OIndex<?> ptidIdx = graph.getRawGraph().getMetadata().getIndexManager
>>>>> ().getIndex("idxptid");
>>>>>
>>>>> Iterator<Map.Entry<ORID,ODocument>> iter = ptidIdx.iterator();
>>>>>
>>>>> while (iter.hasNext()) {
>>>>>
>>>>> Map.Entry<ORID,ODocument> tm = iter.next();
>>>>>                     System.out.println("\n"+tm+"");
>>>>> }
>>>>>
>>>>>  --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Andrey Lomakin.
>>>>
>>>> Orient Technologies
>>>> the Company behind OrientDB
>>>>
>>>>  --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "OrientDB" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/orient-database/tWad9-hRLrg/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Andrey Lomakin.
>>
>> Orient Technologies
>> the Company behind OrientDB
>>
>>  --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OrientDB" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/orient-database/tWad9-hRLrg/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to