Why use: is-interface="false" extends="java.lang.Object"?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Why use: is-interface="false" extends="java.lang.Object"?

Sam Hokin-3
I just came across this class definition in the VCF loader:

    <class name="Consequence" is-interface="false" extends="java.lang.Object">
      <attribute name="description" type="java.lang.String"/>
      <attribute name="peptideAlleles" type="java.lang.String"/>
      <attribute name="polyphenPrediction" type="java.lang.String"/>
      <attribute name="polyphenScore" type="java.lang.Double"/>
      <attribute name="siftPrediction" type="java.lang.String"/>
      <attribute name="siftScore" type="java.lang.Double"/>
      <reference name="transcript" referenced-type="Transcript"/>
      <reference name="snp" referenced-type="SequenceAlteration" reverse-reference="consequences"/>
    </class>

Why does this definition use: is-interface="false" extends="java.lang.Object"? I've never done that. It looks like a normal class to me.
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why use: is-interface="false" extends="java.lang.Object"?

Daniela Butano-2
Hi Sam,
from my understanding if you don't specify the attribute "extends", the
generated java interface will extend InterMineObject (which extends
InterMineFastPathObject, which extends FastPathObject).
In the case below, the generated interface Consequence only extends
FastPathObject.
Maybe it has been set in this way to prevent to load consequence into
the intermineobject table?

Daniela

> I just came across this class definition in the VCF loader:
>
>    <class name="Consequence" is-interface="false"
> extends="java.lang.Object">
>      <attribute name="description" type="java.lang.String"/>
>      <attribute name="peptideAlleles" type="java.lang.String"/>
>      <attribute name="polyphenPrediction" type="java.lang.String"/>
>      <attribute name="polyphenScore" type="java.lang.Double"/>
>      <attribute name="siftPrediction" type="java.lang.String"/>
>      <attribute name="siftScore" type="java.lang.Double"/>
>      <reference name="transcript" referenced-type="Transcript"/>
>      <reference name="snp" referenced-type="SequenceAlteration"
> reverse-reference="consequences"/>
>    </class>
>
> Why does this definition use: is-interface="false"
> extends="java.lang.Object"? I've never done that. It looks like a
> normal class to me.
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why use: is-interface="false" extends="java.lang.Object"?

joe carlson
Hi Sam,

I don’t know about this Consequence code, but in my mine I needed to make homologs in my mine SimpleObjects since I had too many of them. Each InterMineObject uses up 1 id and I had more than 2^31 if them (leaving no room for anything else).

If you have an object which does not need to be referenced by something else, making it a simple object makes loading quicker.


joe

On Mar 30, 2020, at 8:09 AM, [hidden email] wrote:

Hi Sam,
from my understanding if you don't specify the attribute "extends", the generated java interface will extend InterMineObject (which extends InterMineFastPathObject, which extends FastPathObject).
In the case below, the generated interface Consequence only extends FastPathObject.
Maybe it has been set in this way to prevent to load consequence into the intermineobject table?

Daniela

I just came across this class definition in the VCF loader:
  <class name="Consequence" is-interface="false" extends="java.lang.Object">
    <attribute name="description" type="java.lang.String"/>
    <attribute name="peptideAlleles" type="java.lang.String"/>
    <attribute name="polyphenPrediction" type="java.lang.String"/>
    <attribute name="polyphenScore" type="java.lang.Double"/>
    <attribute name="siftPrediction" type="java.lang.String"/>
    <attribute name="siftScore" type="java.lang.Double"/>
    <reference name="transcript" referenced-type="Transcript"/>
    <reference name="snp" referenced-type="SequenceAlteration"
reverse-reference="consequences"/>
  </class>
Why does this definition use: is-interface="false"
extends="java.lang.Object"? I've never done that. It looks like a
normal class to me.
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why use: is-interface="false" extends="java.lang.Object"?

Sam Hokin-3
Thanks, Joe and Daniela! I didn't know about that nice trick! I probably have a number of classes that I could store as "simple
objects" rather than full-fledged InterMineObjects since they are not referenced or searched.

On 3/30/20 9:18 AM, Joe Carlson wrote:

> Hi Sam,
>
> I don’t know about this Consequence code, but in my mine I needed to make homologs in my mine SimpleObjects since I had too many of
> them. Each InterMineObject uses up 1 id and I had more than 2^31 if them (leaving no room for anything else).
>
> If you have an object which does not need to be referenced by something else, making it a simple object makes loading quicker.
>
> https://intermine.readthedocs.io/en/latest/database/performance/data-loading/?highlight=Non-InterMineObjects
>
> joe
>
>> On Mar 30, 2020, at 8:09 AM, [hidden email] <mailto:[hidden email]> wrote:
>>
>> Hi Sam,
>> from my understanding if you don't specify the attribute "extends", the generated java interface will extend InterMineObject
>> (which extends InterMineFastPathObject, which extends FastPathObject).
>> In the case below, the generated interface Consequence only extends FastPathObject.
>> Maybe it has been set in this way to prevent to load consequence into the intermineobject table?
>>
>> Daniela
>>
>>> I just came across this class definition in the VCF loader:
>>>   <class name="Consequence" is-interface="false" extends="java.lang.Object">
>>>     <attribute name="description" type="java.lang.String"/>
>>>     <attribute name="peptideAlleles" type="java.lang.String"/>
>>>     <attribute name="polyphenPrediction" type="java.lang.String"/>
>>>     <attribute name="polyphenScore" type="java.lang.Double"/>
>>>     <attribute name="siftPrediction" type="java.lang.String"/>
>>>     <attribute name="siftScore" type="java.lang.Double"/>
>>>     <reference name="transcript" referenced-type="Transcript"/>
>>>     <reference name="snp" referenced-type="SequenceAlteration"
>>> reverse-reference="consequences"/>
>>>   </class>
>>> Why does this definition use: is-interface="false"
>>> extends="java.lang.Object"? I've never done that. It looks like a
>>> normal class to me.
>>> _______________________________________________
>>> dev mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> https://lists.intermine.org/mailman/listinfo/dev
>>
>> _______________________________________________
>> dev mailing list
>> [hidden email] <mailto:[hidden email]>
>> https://lists.intermine.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why use: is-interface="false" extends="java.lang.Object"?

joe carlson
Another advantage of simple objects is that you can use plain old SQL for mucking with them. No need to worry about the tracker and inheritance tables.

> On Mar 30, 2020, at 10:22 AM, Sam Hokin <[hidden email]> wrote:
>
> Thanks, Joe and Daniela! I didn't know about that nice trick! I probably have a number of classes that I could store as "simple objects" rather than full-fledged InterMineObjects since they are not referenced or searched.
>
> On 3/30/20 9:18 AM, Joe Carlson wrote:
>> Hi Sam,
>> I don’t know about this Consequence code, but in my mine I needed to make homologs in my mine SimpleObjects since I had too many of them. Each InterMineObject uses up 1 id and I had more than 2^31 if them (leaving no room for anything else).
>> If you have an object which does not need to be referenced by something else, making it a simple object makes loading quicker.
>> https://intermine.readthedocs.io/en/latest/database/performance/data-loading/?highlight=Non-InterMineObjects
>> joe
>>> On Mar 30, 2020, at 8:09 AM, [hidden email] <mailto:[hidden email]> wrote:
>>>
>>> Hi Sam,
>>> from my understanding if you don't specify the attribute "extends", the generated java interface will extend InterMineObject (which extends InterMineFastPathObject, which extends FastPathObject).
>>> In the case below, the generated interface Consequence only extends FastPathObject.
>>> Maybe it has been set in this way to prevent to load consequence into the intermineobject table?
>>>
>>> Daniela
>>>
>>>> I just came across this class definition in the VCF loader:
>>>>   <class name="Consequence" is-interface="false" extends="java.lang.Object">
>>>>     <attribute name="description" type="java.lang.String"/>
>>>>     <attribute name="peptideAlleles" type="java.lang.String"/>
>>>>     <attribute name="polyphenPrediction" type="java.lang.String"/>
>>>>     <attribute name="polyphenScore" type="java.lang.Double"/>
>>>>     <attribute name="siftPrediction" type="java.lang.String"/>
>>>>     <attribute name="siftScore" type="java.lang.Double"/>
>>>>     <reference name="transcript" referenced-type="Transcript"/>
>>>>     <reference name="snp" referenced-type="SequenceAlteration"
>>>> reverse-reference="consequences"/>
>>>>   </class>
>>>> Why does this definition use: is-interface="false"
>>>> extends="java.lang.Object"? I've never done that. It looks like a
>>>> normal class to me.
>>>> _______________________________________________
>>>> dev mailing list
>>>> [hidden email] <mailto:[hidden email]>
>>>> https://lists.intermine.org/mailman/listinfo/dev
>>>
>>> _______________________________________________
>>> dev mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> https://lists.intermine.org/mailman/listinfo/dev
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev